Clip Encoding
Convert extracted clip buffers into compressed media files suitable for storage and training workflows using encoders. NeMo Curator provides both CPU and GPU-based encoders.
Use Cases
- Convert raw clip buffers into a standard format (such as H.264 in MP4) for portability.
- Normalize heterogeneous inputs (encoding formats, bit rates, containers) into a consistent output.
- Reduce storage footprint with controlled quality settings.
Before You Start
If you only need embeddings or analysis and do not require saved media files, you can skip encoding. When writing clips, NeMo Curator produces .mp4 by default.
Quickstart
Use the pipeline stage or the example script flags to encode clips with CPU or GPU encoders.
Pipeline Stage
Script Flags
Encoder Options
On systems with supported NVIDIA GPU hardware and an ffmpeg build with NVENC, h264_nvenc can significantly increase throughput. Refer to the verification steps below to confirm NVENC availability.
Verify ffmpeg/NVENC Support
To use h264_nvenc, confirm that your ffmpeg build includes NVENC support and install the GPU drivers:
Expected output includes entries like V..... h264_nvenc and cuda in the hardware accelerators list. If not present, install an ffmpeg build with NVENC and ensure NVIDIA drivers and CUDA are available.
Configure
Use ClipTranscodingStage to control encoder choice, batching, and acceleration:
Parameters
Refer to the quickstart options in Get Started with Video Curation for command-line flags --transcode-encoder and --transcode-use-hwaccel.
Troubleshooting
- “Encoder not found”: Your
ffmpegbuild may lack the encoder; verify withffmpeg -encoders. - “No NVENC capable devices found”: Install NVIDIA drivers/CUDA and ensure the GPU is visible in
nvidia-smi. - Output mismatch or low quality: Revisit encoder defaults; set explicit bit rate/quality settings as needed, or enable
use_input_bit_rate.