pynvvideocodec
pynvvideocodec (PyNvVideoCodec) is NVIDIA's Python library for hardware-accelerated video encode/decode on NVIDIA GPUs.
What it is and what it does
PyNvVideoCodec is NVIDIA's official Python library for offloading video encode, decode, and transcode operations to NVIDIA GPUs. It wraps the Video Codec SDK and exposes a Python API for hardware-accelerated video processing, eliminating CPU bottlenecks in video pipelines. The library supports decoding from H.264, HEVC, AV1, VP8, VP9, VC1, MPEG4, MPEG2, and MPEG1 streams, with flexible frame access modes (sequential, random, batched, sliced) and output to multiple formats including NV12, YUV420, YUV444, and RGB24. Encoding supports H.264, HEVC, and AV1 codecs from various input formats.
The package is designed for high-throughput video processing on data centers (DGX Spark) and edge devices (Jetson), with features like multi-GPU decode/encode, in-memory video processing from Python byte buffers, threaded decoding with near-zero latency, and segment-based transcoding. It handles GIL contention in multithreaded scenarios and extracts low-level decode statistics (QP values, motion vectors) from H.264 and H.265 streams.
Use it for:
- Decode video files or streams on GPU for real-time computer vision pipelines without CPU overhead.
- Transcode video segments by timestamp range for content editing or partial processing workflows.
- Process video directly from memory buffers (S3, network streams) without writing temporary files.
- Extract decode statistics and SEI metadata from H.264/H.265 streams for quality analysis.
- Build multi-GPU video processing pipelines on Jetson or DGX systems for edge AI applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyNvVideoCodec provides hardware-accelerated video encoding, decoding, and transcoding on NVIDIA GPUs through Python APIs, supporting multiple codecs and output formats.
Yes, if you have an NVIDIA GPU and need to encode, decode, or transcode video in Python. The package is actively maintained, MIT-licensed, has no Python runtime dependencies, and is officially supported by NVIDIA. Medium install friction is acceptable given the GPU-specific nature. Verify that your GPU and drivers meet the Video Codec SDK requirements before installing.
Install
pynvvideocodec on PyPI
pip
pip install pynvvideocodecuv
uv add pynvvideocodecpoetry
poetry add pynvvideocodecInstalling pynvvideocodec
Before you install
Medium install friction due to platform-specific wheels (x86_64, aarch64, Windows) and likely GPU driver dependencies. Actively maintained with a recent release (17 days old). No runtime Python dependencies to manage.
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install pynvvideocodec
import pynvvideocodec
# Decode a video file
decoder = pynvvideocodec.PyNvDecoder(input_file='video.mp4')
frame = decoder[0] # Fetch first frame
Requires an NVIDIA GPU with Video Codec SDK support and appropriate GPU drivers installed; Python 3.8 or later.
Verify before relying
- Whether specific NVIDIA GPU models or compute capabilities are required for encode/decode operations.
- Whether the package requires NVIDIA Video Codec SDK to be separately installed on the system.
- Performance characteristics and throughput for typical video resolutions and codecs.
- Compatibility with specific versions of NVIDIA drivers.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 17 days since the last release |
| First released | |
| Downloads | 700,409/month — #5,294 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pynvvideocodec-2.2.0-cp310-cp310-manylinux_2_28_aarch64.whl; pynvvideocodec-2.2.0-cp310-cp310-manylinux_2_28_x86_64.whl; pynvvideocodec-2.2.0-cp310-cp310-win_amd64.whl; pynvvideocodec-2.2.0-cp311-cp311-manylinux_2_28_aarch64.whl; pynvvideocodec-2.2.0-cp311-cp311-manylinux_2_28_x86_64.whl; pynvvideocodec-2.2.0-cp311-cp311-win_amd64.whl; pynvvideocodec-2.2.0-cp312-cp312-manylinux_2_28_aarch64.whl; pynvvideocodec-2.2.0-cp312-cp312-manylinux_2_28_x86_64.whl; pynvvideocodec-2.2.0-cp312-cp312-win_amd64.whl; pynvvideocodec-2.2.0-cp313-cp313-manylinux_2_28_x86_64.whl; pynvvideocodec-2.2.0-cp313-cp313-manylinux_2_34_aarch64.whl; pynvvideocodec-2.2.0-cp313-cp313-win_amd64.whl; pynvvideocodec-2.2.0-cp314-cp314-manylinux_2_28_x86_64.whl; pynvvideocodec-2.2.0-cp314-cp314-manylinux_2_34_aarch64.whl; pynvvideocodec-2.2.0-cp314-cp314-win_amd64.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
nvidia-nvimgcodec-cu12nvImageCodec provides GPU-accelerated codec…
permissive · top 15,000 on PyPI
torchcodecTorchCodec decodes and encodes videos, audio,…
unclear · top 5,000 on PyPI
cyscaleCython-accelerated encoder and decoder for the…
permissive · top 15,000 on PyPI
bencode.pyEncodes and decodes bencode format, the binary…
unclear · top 15,000 on PyPI
decordDecord decodes video and audio files with…
permissive · top 5,000 on PyPI
decord2Decord2 decodes video and audio files with…
permissive · top 15,000 on PyPI
ntgcallsNTgCalls provides Python bindings to a C++…
unclear · top 15,000 on PyPI
numcodecsNumcodecs provides buffer compression and…
permissive · top 5,000 on PyPI
python-ffmpegProvides a Python binding for FFmpeg with both…
permissive · top 15,000 on PyPI
edk2-pytool-libraryProvides Python classes and utilities for UEFI…
unclear · top 15,000 on PyPI