Video Codec APIs

NVIDIA has provided hardware-accelerated video processing on GPUs for over a decade through the NVIDIA Video Codec SDK.

Video Codec SDK is a comprehensive set of APIs, high-performance tools, sample applications, reusable code, and documentation for hardware-accelerated video encoding and decoding on Windows and Linux.
The NVENCODE and NVDECODE APIs in the NVIDIA Video Codec SDK are C-style APIs, useful for high-performance encoding and decoding using NVENC and NVDEC, respectively. They expose most of the hardware functionality, along with other codec features that are commonly used. Video Codec SDK also provides a set of reusable code in the form of C++ classes built on top of the NVENCODE/NVDECODE APIs, which the applications can easily integrate. NVENCODE/NVDECODE APIs are comprehensive in nature, and expose a large number of codec capabilities, including advanced features.

DirectX and Vulkan Video, on the other hand, provide low-level, hardware-agnostic APIs, and attempt to provide more precise control over resource/memory allocation, task scheduling, and work submission to video hardware engines.

Whether you prefer DirectX or Vulkan, you can combine flexible GPU-accelerated video encoding and decoding with other GPU acceleration, like 3D and AI, using the language of your choice.

The low-level Vulkan Video extensions are also attractive to developers of popular open-source streaming media frameworks such as GStreamer and FFmpeg, both of which are being actively ported to Vulkan Video. The cross-platform availability of Vulkan will enable accelerated GPU processing for these frameworks across multiple platforms without needing to port to multiple proprietary video APIs. Please refer to the Vulkan Video getting started page for more details.

PyNvVideoCodec is another set of APIs introduced in Q4 2023, which provides simple APIs for harnessing video encoding and decoding capabilities on the GPU when working with Python. PyNvVideoCodec is a library that provides Python bindings over C++ APIs for hardware-accelerated video encoding and decoding. Major advantages of PyNvVideoCodec are: simple installation process, easy APIs with advanced features, and direct interoperability with many deep learning frameworks such as PyTorch.

Video Codec SDK, DirectX Video, Vulkan Video, and PyNvVideoCodec provide comprehensive support for GPU-accelerated video workflows. NVIDIA will continue to support these APIs, providing developers multiple options to choose from, and use the ones that best suit their needs.

Video Codec APIs

1 Like