ProductsSelected

TorchCodec 1.0 发布:视频、音频、图像解码编码统一进 PyTorch

Why we picked it

PyTorch 官方的媒体解码库正式到了 1.0,vLLM、SGLang、Hugging Face 都在用它。做视频理解或多模态推理的可以关注,GPU 解码加底层 API 让你不用再在 ffmpeg 和 PyTorch 之间来回折腾。

PyTorch 官方发布 TorchCodec 1.0,这个最初只做视频转 PyTorch tensor 的小库,现在已支持视频、音频和图像的解码与编码,并提供视频和 JPEG 图像的 GPU 解码。

Body

1.0 版本新增底层 API,覆盖解码的每个阶段:可以构建多线程和多进程 pipeline、绕过 demuxer 直接解码数据包、访问原始 YUV 数据、编写自定义颜色转换 kernel。官方还提到可以用 coding agent 自动为特定 workload 调优 pipeline。

生态方面,Hugging Face 的多个库、vLLM 和 SGLang 已经用 TorchCodec 做媒体解码,说明它正在成为推理框架读取多媒体输入的默认底层依赖。对做视频理解、多模态推理服务的开发者来说,GPU 解码加上可定制的 pipeline 意味着解码环节不再需要离开 PyTorch 生态。

Original · PyTorch

TorchCodec 1.0 is out! TorchCodec started as a small library to turn videos into PyTorch tensors. Today it decodes and encodes video, audio and images.

Hugging Face libraries, vLLM and SGLang use TorchCodec to decode media. TorchCodec supports GPU decoding for video and JPEG images.

TorchCodec 1.0 includes low-level APIs that give you control over every stage of decoding. You can build multi-threaded and multi-process pipelines, decode packets without a demuxer, access raw YUV data and write custom color conversion kernels.

A coding agent can auto-tune your pipeline for your workload.

✍️ Nicolas Hug (@hug_nicolas), Scott Schneider (@_scottas), Daniel Flores, Molly Xu (@mollyxu_) and Ahmad Sharif (@ahmadshares)

@Meta

Read more on the PyTorch blog: https://t.co/YeVsZFcENj

GitHub release: https://t.co/AgAQSvnHQn

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Products" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include PyTorch, TorchCodec, vLLM, multimodal.

Source attribution: curated from PyTorch (@PyTorch).

Spotted an error in the summary or translation? Tell us