Remove libopenh&libx264 and Add vp9#1930
Merged
Merged
Conversation
Signed-off-by: Dong Hyuk Chang <9426164+thomasdhc@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Dong Hyuk Chang <9426164+thomasdhc@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Dong Hyuk Chang <9426164+thomasdhc@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lback encoder alongside `h264_nvenc`. Update installation instructions and verification steps to reflect the new encoder options. Modify `ClipTranscodingStage` to validate encoder selection and handle encoding options for both encoders. Update relevant documentation and examples to guide users on using the new encoder. Signed-off-by: Ao Tang <aot@nvidia.com>
Signed-off-by: Ao Tang <aot@nvidia.com>
Contributor
Author
|
/ok to test 1e85ff8 |
Signed-off-by: Ao Tang <aot@nvidia.com>
Contributor
Author
|
/ok to test c304db3 |
thomasdhc
approved these changes
May 6, 2026
3 tasks
ayushdg
approved these changes
May 6, 2026
jgerh
reviewed
May 6, 2026
Contributor
jgerh
left a comment
There was a problem hiding this comment.
Completed tech pubs review of .md files and ran standard copyedit checks for consistency and adherence to style guidelines.
|
|
||
| ```{tip} | ||
| **Using a config file**: The example script accepts many command-line arguments. For complex configurations, you can store arguments in a file and pass them with the `@` prefix: | ||
|
|
Contributor
Author
There was a problem hiding this comment.
we already have ```{tip} at L245
Signed-off-by: Ao Tang <aot@nvidia.com>
Contributor
Author
|
/ok to test 288146b |
lbliii
approved these changes
May 6, 2026
Contributor
lbliii
left a comment
There was a problem hiding this comment.
content lgtm, it just needs to migrate into the fern/ folder for 26.04. i can handle that separately
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continue work based on #1918 for adding VP9 as the fallback when nvenc is not avaliable.
Drop bundled libopenh264, add libvpx-vp9 CPU fallback, support BYO H.264
Summary
Curator's bundled FFmpeg no longer ships with
libopenh264(Cisco patent-license redistribution model is incompatible with our distribution). To preserve the ability to transcode video clips on hardware without NVENC (notably A100/H100), this PR:libvpx-vp9as a built-in CPU encoder fallback inClipTranscodingStage. VP9 is BSD-licensed, royalty-free under the WebM patent grant, and produces VP9 in.mp4— no downstream changes required.libopenh264accepted as an opt-in encoder for users who provide their own FFmpeg build. The stage probes at setup and surfaces a clear error pointing to the docs if it's not actually compiled in.libopenh264andlibx264, including the licensing tradeoffs.What changed
Code (
nemo_curator/stages/video/clipping/clip_extraction_stages.py)SUPPORTED_ENCODERS = ("h264_nvenc", "libvpx-vp9", "libopenh264")validator.__post_init__routeslibvpx-vp9to CPU resources (vs GPU for NVENC) and emits a perf advisory recommending NVENC if available.setup()calls_verify_libopenh264_available()whenencoder="libopenh264"— usesshutil.which("ffmpeg")+ffmpeg -hide_banner -encodersgrep; raisesRuntimeErrorwith docs link if the encoder isn't compiled in._add_libvpx_vp9_optionshelper with sensible CRF defaults (-b:v 0 -crf 31 -deadline good -cpu-used 4 -row-mt 1 -tile-columns 2).use_hwaccel=Truewithlibvpx-vp9(CPU encoder)..mp4for all encoders.Tutorial (
tutorials/video/getting-started/video_split_clip_example.py)--transcode-encoderchoices extended to{h264_nvenc, libvpx-vp9, libopenh264}with help text noting libopenh264 requires a user-installed FFmpeg.Tests (
tests/stages/video/clipping/test_clip_transcoding_stage.py)Docs
docs/admin/installation.mdwith two install paths (system FFmpeg vs custom build), licensing caveats, and a note thatlibopenh264is auto-accepted whilelibx264requires extendingSUPPORTED_ENCODERS.docs/curate-video/process-data/transcoding.md,docs/get-started/video.md,docs/curate-video/tutorials/beginner.md, andtutorials/video/getting-started/README.mdto describe the new encoder set.Test plan
--transcode-encoder libvpx-vp9→ 37 valid VP9-in-MP4 clips--transcode-encoder h264_nvenc→ 37 valid H.264-in-MP4 clips--transcode-encoder libopenh264→ raisesRuntimeErrorwith docs link ✓--transcode-encoder libvpx-vp9→ succeeds + warning emitted ✓--transcode-encoder libopenh264→ succeeds, output is H.264 ✓Pipeline-level benchmarks
RTX 6000 Ada × 2, source video with total of 30min. Wall time / output size:
VP9's relative slowdown shrinks as the pipeline gets heavier (10× transcode-only → 2.7× full caption pipeline) because downstream GPU work amortizes the encode cost. NVENC remains the right default when available; VP9 is a viable A100/H100 fallback if users accept the throughput hit.
Notes for reviewers
.mp4for all three encoders. PyAV/FFmpeg consume VP9-in-MP4 fine; downstream stages (embedding, motion filter, captioning, writer) are codec-agnostic.libx264is intentionally still rejected by the validator. The BYO docs explain how to enable it (it's GPL-tainting).