PyTorch Releases TorchCodec 1.0 as Its Media Layer
PyTorch announced TorchCodec 1.0 as the stable home for its media decoding and encoding APIs. The release covers video, audio, and images, adds low-level pipelines for multi-threaded or multi-process decoding, raw YUV access, custom color conversion, and CPU or GPU execution, and supports encoding media from PyTorch tensors. PyTorch also says TorchCodec has been used in production for more than two years and is used by libraries and serving projects including Hugging Face’s datasets, transformers, and LeRobot, as well as vLLM and SGLang.
TorchCodec 1.0 centralizes multimodal media processing in PyTorch and exposes lower-level controls for building and tuning custom decoding pipelines, directly relevant to training and serving video, audio, and image models.

TorchCodec 1.0 is here! TorchCodec started out as a video decoding library with a simple goal: efficiently turning encoded videos into RGB video frame tensors. Since then, it has grown to decode and encode all media, including audio and images. As we described in our previous post, TorchCodec is now where all of PyTorch’s media decoding and encoding lives. Our APIs have been stable for a while, and 1.0 makes it official!
TorchCodec has been used in production for over two years, and it is a key part of many multimodal projects. Hugging Face libraries like datasets, transformers and LeRobot rely on TorchCodec to decode audio and video, from dataset samples to model inputs. vLLM uses TorchCodec to decode the video, audio and images sent to multimodal models, on CPU or GPU. SGLang uses it as its preferred video and audio decoder, including GPU video decoding.
#PyTorch#TorchCodec 1.0#TorchVision#TorchAudio#Hugging Face#transformers#LeRobot#vLLM#SGLang#FFmpeg#NVIDIA NVDEC