spdl.io¶
Overview¶
Implements the core I/O functionalities.
API Reference¶
Functions
load_audio¶
Load audio from source into buffer. |
load_video¶
Load video from source into buffer. |
load_image¶
Load image from source into buffer. |
load_image_batch¶
Batch load images. |
load_image_batch_nvjpeg¶
[Experimental] Batch load images with nvJPEG. |
sample_decode_video¶
Decode specified frames from the packets. |
demux_audio¶
Demux audio from the source. |
demux_video¶
Demux video from the source. |
demux_image¶
Demux image from the source. |
decode_packets¶
Decode packets. |
decode_packets_nvdec¶
[Experimental] Decode packets with NVDEC. |
streaming_decode_packets¶
Decode the video packets chunk by chunk. |
decode_image_nvjpeg¶
[Experimental] Decode image with nvJPEG. |
get_audio_filter_desc¶
Construct FFmpeg filter expression for preprocessing audio. |
get_video_filter_desc¶
Construct FFmpeg filter expression for preprocessing video/image. |
get_filter_desc¶
Get the filter to process the given packets. |
convert_array¶
Convert the given array to buffer. |
convert_frames¶
Convert the decoded frames to buffer. |
transfer_buffer¶
Move the given CPU buffer to CUDA device. |
transfer_buffer_cpu¶
Move the given CUDA buffer to CPU. |
to_numba¶
Convert to Numba DeviceNDArray or NumPy NDArray. |
to_numpy¶
Convert to NumPy NDArray. |
to_torch¶
Convert to PyTorch Tensor. |
to_jax¶
Convert to JAX Array. |
encode_image¶
Save the given image array/tensor to file. |
demux_config¶
Customize demuxing behavior. |
decode_config¶
Customize decoding behavior. |
encode_config¶
Customize encoding behavior. |
cuda_config¶
Sprcify the CUDA device and memory management. |
cpu_storage¶
Allocate a block of memory. |
load_npz¶
[Experimental] Load a numpy archive file ( |
Classes
Demuxer¶
Demuxer can demux audio, video and image from the soure. |
Packets¶
Packets object. |
AudioPackets¶
Packets object containing audio samples. |
VideoPackets¶
Packets object containing video frames. |
ImagePackets¶
Packets object contain an image frame. |
Frames¶
Frames object. |
AudioFrames¶
Audio frames. |
VideoFrames¶
Video frames. |
ImageFrames¶
Image frames. |
CPUBuffer¶
Buffer implements array interface. |
CUDABuffer¶
CUDABuffer implements CUDA array interface. |
DemuxConfig¶
Demux configuration. |
DecodeConfig¶
Decode configuration. |
EncodeConfig¶
Encode configuration. |
CUDAConfig¶
Specify the CUDA devie and memory management. |
CPUStorage¶
Allocate a block of CPU memory. |
NpzFile¶
A class mimics the behavior of |