Registry / devops / pynvvideocodec

pynvvideocodec

JSON →
library2.1.0pypypi✓ verified 30d ago

PyNvVideoCodec is NVIDIA's Python library for hardware-accelerated video encoding and decoding on NVIDIA GPUs. It wraps the NVIDIA Video Codec SDK and provides high-performance encode/decode operations directly from Python. Current version 2.1.0, requires Python >=3.8 and an NVIDIA GPU with supported drivers. Release cadence is irregular, tied to SDK updates.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from PyNvVideoCodec import CreateDecoder
from PyNvVideoCodec import CreateEncoder
from PyNvVideoCodec import CreateTranscoder

Basic encode and decode a single frame. Requires an NVIDIA GPU with proper drivers.

from pynvvideocodec import PyNvEncoder, PyNvDecoder, EncodeConfig, DecodeConfig import numpy as np # Encode example enc_config = EncodeConfig( codec='h264', width=1920, height=1080, framerate=30, bitrate=5000000 ) encoder = PyNvEncoder(enc_config) frame = np.zeros((1080, 1920, 3), dtype=np.uint8) encoded = encoder.encode(frame) # Decode example dec_config = DecodeConfig(codec='h264', width=1920, height=1080) decoder = PyNvDecoder(dec_config) decoded = decoder.decode(encoded) print('Success')
Debug
Known footguns
breakingCUDA context must be initialized before creating encoder/decoder. Failure results in segmentation fault.
breakingThe module path changed from 'nvidia.video_codec' to 'pynvvideocodec' in v2.0.0. Old imports break.
gotchaEncodeConfig and DecodeConfig are required; missing them causes AttributeError or silent failure.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
7 hits · last 30 days
gptbot
3
Resources

No resource links recorded.