torchcodec.decoders#
Video Decoding#
For a video decoder tutorial, see: Decoding a video with VideoDecoder.
A single-stream video decoder. |
|
A fast decoder for WAV audio files. |
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.
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#
Important
The low-level APIs are in beta. Their signatures and semantics may still change slightly, in response to user feedback.
These expose the three stages of decoding - demuxing, decoding and conversion -
as separate objects, where VideoDecoder and AudioDecoder do
all three for you. Reach for them when you need to control a stage, skip one, or
run them on different threads. If you just want frames out of a file, use
VideoDecoder.
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. |