Skip to content

feat(pai): replace imageio-ffmpeg with PyNvVideoCodec for H.264 decode#122

Merged
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/pynvvideocodec
May 18, 2026
Merged

feat(pai): replace imageio-ffmpeg with PyNvVideoCodec for H.264 decode#122
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/pynvvideocodec

Conversation

@janickm
Copy link
Copy Markdown
Collaborator

@janickm janickm commented May 18, 2026

Summary

  • Replaces imageio-ffmpeg (BSD-2-Clause wrapper bundling GPL ffmpeg binary) with PyNvVideoCodec (MIT license, NVIDIA-maintained) for video decoding in the PAI data converter
  • Uses nvc.SimpleDecoder with CPU host memory output and RGB color format to match existing pipeline expectations
  • Eliminates ffmpeg redistribution licensing concerns for downstream container builds
  • Requires NVIDIA GPU (Turing+) for hardware-accelerated H.264 decode via NVDEC

Testing

Verified end-to-end with:

bazel run //tools/data_converter/pai -- \
    --output-dir=/tmp/pai \
    --camera-id=camera_front_wide_120fov \
    pai-stream-v4 \
    --hf-token=<token> \
    --clip-id=4f14b8f4-4c16-48ce-aa42-02add7cd9f4d \
    --duration-sec=1

Conversion completed successfully with GPU-accelerated decode at ~63 frames/sec.

Replace the GPL-encumbered ffmpeg-based video decoder with NVIDIA's
PyNvVideoCodec (MIT license) for GPU-accelerated H.264 decode in the
PAI data converter. This eliminates ffmpeg redistribution concerns
and leverages NVDEC hardware.

Requires an NVIDIA GPU (Turing+).
@janickm janickm force-pushed the dev/janickm/pynvvideocodec branch from fc8ee01 to ba0ac41 Compare May 18, 2026 12:27
@janickm janickm enabled auto-merge (rebase) May 18, 2026 12:29
@janickm janickm merged commit 711ff8e into NVIDIA:main May 18, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/pynvvideocodec branch May 18, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant