torchcodec.decoders#
Video Decoding#
For a video decoder tutorial, see: Decoding a video with VideoDecoder.
The VideoDecoder class is a high-level entry point for video decoding.
For low-level control over the decoding process, see Low-level decoding APIs for video and audio.
A single-stream video decoder. |
Metadata of a single video stream. |
CUDA decoding utils:
Context Manager to set the CUDA backend for |
|
Set the maximum number of NVDEC decoders that can be cached (per GPU). |
|
Get the capacity of the per-device NVDEC decoder cache. |
Information about CPU fallback status. |
Audio Decoding#
For an audio decoder tutorial, see: Decoding audio streams with AudioDecoder.
The AudioDecoder class is a high-level entry point for audio decoding.
For low-level control over the decoding process, see Low-level decoding APIs for video and audio.
A single-stream audio decoder. |
|
A fast decoder for WAV audio files. |
Metadata of a single audio stream. |
Image Decoding#
Decode an image into a |
|
Decode a JPEG image into a |
|
Decode a PNG image into a |
|
Decode a WebP image into a |
|
Decode a GIF image into a |
|
Decode an AVIF image into a |
|
Decode an HEIC/HEIF image into a |
Color mode for image decoding. |
Low-level decoding APIs for video and audio#
Important
The low-level APIs are in beta. Their signatures and semantics may still change slightly, in response to user feedback. Please share your feedback!
These APIs expose the three stages of decoding as separate objects: demuxing, decoding and conversion.
Reach for them when you need to control a stage, skip one, or run them on
different threads. If you just want RGB frames out of a file,
VideoDecoder and AudioDecoder are easier to use.
For tutorials, see:
Demuxing#
Reads one or more video and audio streams from a container, and produces their compressed |
|
A video stream followed by a |
|
An audio stream followed by a |
Describe a container and every stream in it, without decoding anything. |
Decoding#
Decodes the compressed |
|
Decodes the compressed |
Conversion#
Turn |
Data types#
One compressed packet of one stream, as a |
|
One decoded video frame, exactly as the decoder produced it. |
What the packets of a video stream say about its frames, as returned by a scan ( |
|
One decoded audio frame's samples, exactly as the decoder produced them. |
Metadata#
Container-level metadata, as reported by the header. |
|
Metadata of a container and of every stream in it. |
|
Metadata of a single video stream, as reported by the container header. |
|
Metadata of a single audio stream, as reported by the container header. |
|
Metadata of a single stream, as reported by the container header. |