Skip to main content

pynvvideocodec (PyNvVideoCodec) is NVIDIA's Python library for hardware-accelerated video encode/decode on NVIDIA GPUs.

Project description

PyNvVideoCodec

PyNvVideoCodec is NVIDIA's Python-based library that provides simple yet powerful Python APIs for hardware-accelerated video encoding and decoding on NVIDIA GPUs.

PyNvVideoCodec is built on top of the Video Codec SDK and offers encode, decode, and transcode performance on par with it.

The library is distributed under MIT license and is officially supported by NVIDIA.

Features

Current PyNvVideoCodec version supports following features:

Decode Features

  • Decode statistics extraction: Enables extraction of low-level decode statistics—such as QP values, coding-unit types, and motion vectors—from H.264 and H.265 streams. These statistics provide valuable insights into video quality, content complexity, and encoder behaviour.
  • Seek and frame sampling: Provides efficient and flexible methods for fetching video frames in various modes, including sequential, random, periodic, indexed, batched, and sliced, as well as at a specified target frame rate.
  • Decoder caching: Optimizes decoding of short video clips through decoder caching and reconfiguration.
  • Threaded decoder: Supports decoding on separate threads, delivering pre-decoded frames with near-zero latency, enabling high-performance video processing pipelines.
  • Video processing from buffer: Supports video processing from memory buffers, reducing I/O overhead, enabling streaming applications.
  • Low latency decode: Offers zero-latency decoding for video sequences that do not contain B-frames.
  • SEI extraction: Supports the extraction of Supplemental Enhancement Information (SEI) messages, allowing access to additional information such as HDR information, timecodes, and custom user data.
  • Stream metadata access: Enables access to stream metadata, including frame width, height, bit depth, and keyframe indices, to enhance content management.
  • GIL handling: Improved multithreaded performance through better handling of Global Interpreter Lock (GIL) in C++ layer.
  • Multi-GPU decode: Enables multi-GPU decoding to efficiently handle larger workloads.
  • Extended codec support: Supports codecs H.264, HEVC, AV1, VP8, VP9, VC1, MPEG4, MPEG2, and MPEG1
  • 4:2:2 decode: Supports 4:2:2 decoding for both H.264 and HEVC formats on Blackwell GPUs (NV16, P210 and P216 surface formats).
  • Extended output formats : Decode to various output formats including NV12, YUV420, YUV444, NV16, P010, P016 and RGB24(interleaved and planar)

Encode Features

  • Encoder reconfiguration: Supports encoder reconfiguration, enabling dynamic updating of encoding parameters without recreating encoder instances.
  • SEI insertion: Allows insertion of SEI messages during encoding.
  • GIL handling: Improved multithreaded performance through better handling of Global Interpreter Lock (GIL) in C++ layer.
  • Multi-GPU encode: Enables multi-GPU encoding to efficiently handle larger workloads.
  • Codec support: Support encoding to codec H.264, HEVC, and AV1.
  • 4:2:2 encode: Supports 4:2:2 encoding for both H.264 and HEVC formats on Blackwell GPUs (NV16 and P210 surface formats).
  • Extended input formats: Encode from various input formats including NV12, YV12, IYUV, YUV444, YUV420_10BIT, YUV444_10BIT, NV16, P210, ARGB, ABGR, ARGB10, and ABGR10.

Transcode Features

  • Segment-based transcode: Enables transcoding of video segments based on timestamp ranges, ideal for content editing and partial processing.

What's New

v 2.1 (Latest)

  • Decode statistics extraction: Enables extraction of low-level decode statistics—such as QP values, coding-unit types, and motion vectors—from H.264 and H.265 streams. These statistics provide valuable insights into video quality, content complexity, and encoder behaviour.

  • Jupyter notebooks: Added two step-by-step, interactive Jupyter notebook tutorials—one demonstrating the SimpleDecoder API for easy video decoding and flexible frame sampling, and another showcasing the use of ThreadedDecoder in a real-world deep-learning object detection workflow.

  • Enhanced sample applications: Simplified, restructured and enhanced sample applications along with documentation to help developers learn, experiment, and build faster.

  • Enhanced Documentation: Comprehensive API reference and programming guide, enriched with practical code snippets to help developers quickly understand and use the library.

Distribution

PyNvVideoCodec library is distributed in two formats: binary distribution via PyPI and source code distribution via NVIDIA NGC. In both cases, the library and its dependencies can be installed using a single pip install command.

This package on PyPI contains Python WHLs of the PyNvVideoCodec library and sample applications that demonstrate the use of the PyNvVideoCodec API. To install these please open the shell prompt, and run the following command.

$ pip install pynvvideocodec

Sample Applications and Documents

  • A package containing PyNvVideoCodec source code, Python sample applications and documentation can be downloaded from NVIDIA NGC.
  • For your convenience, the documents are also accessible online at PyNvVideoCodec Online Documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pynvvideocodec-2.1.0-cp312-cp312-win_amd64.whl (38.5 MB view details)

Uploaded CPython 3.12Windows x86-64

pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl (36.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl (46.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pynvvideocodec-2.1.0-cp311-cp311-win_amd64.whl (38.5 MB view details)

Uploaded CPython 3.11Windows x86-64

pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl (36.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl (46.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pynvvideocodec-2.1.0-cp310-cp310-win_amd64.whl (38.5 MB view details)

Uploaded CPython 3.10Windows x86-64

pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl (36.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl (46.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_x86_64.whl (36.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_aarch64.whl (46.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

File details

Details for the file pynvvideocodec-2.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 09cdd222c761855cde9b05ddc13d21893473cebae50077eca20b4eac0fed8acb
MD5 39eddd245bba13784d72558bc4b9d299
BLAKE2b-256 0d59639cc6ba3a0cc9ff37b64b8bcc6ab063e562bd21c8d0b7294e215f8929ff

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c317fbad725b1b81936b863edcd98920bc4be423b9965719657030359d7afe29
MD5 7258ce6a29cd688453463c55e2d77920
BLAKE2b-256 67dd99ab1d310aaadc7e20d434cf27b387a5a0878f1dfbb3788c365905647c7b

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 af7e44d13cfb524626c72d947f12a3b192cfa1deb4b598a7778bd4aa1e6fd4ac
MD5 8664de256e040699d3d71f777d00791a
BLAKE2b-256 8fe721cf5d01286aebfacad92f3a78f24c05b373d9bce754b689c5bb3a81bc9d

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ee5d2dc56ac5ca8d223fa6fe8f57c67faf5ee1c9360216d9194cfbcd3f9d3948
MD5 8bc2f38e58494706f572ae3613215d82
BLAKE2b-256 e5290cb89a9cb860ecb0c96fc44a1aec7096909fe725c1fe9ca014e12fe2f994

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d653240ce835e9ab531a4d61350a4af54f7f7859e5392e1323c030ffcfc8ff0
MD5 60b2d6a6e329c857b726be50156be912
BLAKE2b-256 6716cf18b6346db08364fd8dcad5364bf6ce1c9a5ebe41be833801d18a1193e9

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b8d9b47b5c910953d6c24fa60fd7bf6ac57f3d4a20831fcaf35e039349a91d42
MD5 8086a1fd73db533ce5f654d024a031b8
BLAKE2b-256 70a803cb3acbdcb571bfdf350106742860a0ac13d263a4b647e22de6c7d07d73

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c35887e294613825c9011dc1b6962d0c0374049b1ce8939cee97db5d82b28e8
MD5 165b9cab08744fe0e328bb5d40a1b522
BLAKE2b-256 0576708dcea92b6b3cd5d8e9079350c2787b2b59bb7d032d63fe658c0ce5fd74

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e1ecef741e1943978911998aa1a9d683be8b005957646db6c9b0d53f943f9af
MD5 a038e9840aa79620c3f7eaac69691145
BLAKE2b-256 bb7a9e1153108c71beaa8c8fbe1932c0c340ead6182dbcda97097e3c407b3e09

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e778af3319a759c1728065e9e4682f591c44dedbbc90c1ca71d025dce65d6a58
MD5 a551609b7ee783296ac62e3462e5fd6e
BLAKE2b-256 8edc20f1b50cb7c3ede43f2330fbc74bc6a0a7fd2b267a9b8220af90a0985b53

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 133b47336cd9b3a161707b02d2ceb9e5af387cb9833335d60c16eddf7322b3ea
MD5 66356ca1130cacc7328c7b42a5dcbec4
BLAKE2b-256 ef4e6400898bcd18d17b6f72385cac879e88abd398b4e58832455d142f9ae616

See more details on using hashes here.

File details

Details for the file pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pynvvideocodec-2.1.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 34ddbb22230f4963f5b25b41af0a1579c3731fb95c79993502dd014a4dec7fd6
MD5 8156a4b46bac878157303b2cb36cbb34
BLAKE2b-256 e5010dea33319e4a3a933719f2e345d8a4b00a754eacf6b1b109e40bd455f5eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page