docs(26.04): port SME video encoder docs (VP9 + BYO H.264)#1926
Conversation
Mirror PR NVIDIA-NeMo#1918 doc edits in the latest 26.04 fern pages. The SME PR edited the deprecated docs/ tree; this updates the equivalent fern/ pages so the 26.04 site reflects h264_nvenc as the only supported encoder. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Greptile SummaryThis PR ports the SME-authored encoder rework docs from
Confidence Score: 3/5Multiple quickstart examples across video.mdx, split-dedup.mdx, and transcoding.mdx switch to h264_nvenc but omit the required hwaccel flag/parameter, leaving users with a broken NVENC configuration. The installation.mdx BYO H.264 section references install_h264_support.sh, a script that does not yet exist in the repository. Several command and code examples now specify h264_nvenc without the accompanying use_hwaccel=True / --transcode-use-hwaccel flag that NVENC requires to engage hardware encoding. A user copying any of those quickstarts will get a silently wrong pipeline. On top of that, the recommended BYO H.264 fix points to a script that has not been forward-ported to main, so the Recommended path errors out immediately. These issues are spread across three files and the installation guide, making the PR's primary user-facing guidance unreliable until the companion code lands. installation.mdx (references non-existent install_h264_support.sh and mismatches the actual install_ffmpeg.sh behaviour), video.mdx and split-dedup.mdx (h264_nvenc quickstarts missing --transcode-use-hwaccel), transcoding.mdx (Pipeline Stage quickstart missing use_hwaccel=True) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User runs ClipTranscodingStage] --> B{GPU has NVENC silicon?}
B -- Yes --> C["encoder='h264_nvenc'\nuse_hwaccel=True"]
B -- No A100/H100 --> D["encoder='libvpx-vp9'\nuse_hwaccel=False\nOutputs VP9 in .mp4"]
B -- Need H.264 SW --> E{install_h264_support.sh available?}
E -- Yes --> F["Run: bash install_h264_support.sh --with-libopenh264\nThen encoder='libopenh264'"]
E -- No --> G[Script not yet ported to main — blocked]
C --> H[NVENC high-throughput H.264]
D --> I[CPU VP9 encode]
F --> J[CPU H.264 via OpenH264]
style G fill:#f66,color:#fff
style E fill:#fa0,color:#000
Reviews (6): Last reviewed commit: "Merge branch 'main' into lbliii/port-sme..." | Re-trigger Greptile |
| <Tab title="Debian/Ubuntu (Script)"> | ||
|
|
||
| Use the maintained script in the repository to build and install `FFmpeg` with `libopenh264` and NVIDIA NVENC support. The script enables `--enable-libopenh264`, `--enable-cuda-nvcc`, and `--enable-libnpp`. | ||
| Use the maintained script in the repository to build and install `FFmpeg` with NVIDIA NVENC support. The script enables `--enable-cuda-nvcc` and `--enable-libnpp`. |
There was a problem hiding this comment.
Script description no longer matches the actual script contents
docker/common/install_ffmpeg.sh still installs libopenh264-dev via apt and passes --enable-libopenh264 to the FFmpeg configure step. The updated prose saying the script "enables --enable-cuda-nvcc and --enable-libnpp" is now inaccurate — it omits --enable-libopenh264, which the script still sets. Until the script itself is updated (noted as out-of-scope here), the old description is more accurate.
| Use the maintained script in the repository to build and install `FFmpeg` with NVIDIA NVENC support. The script enables `--enable-cuda-nvcc` and `--enable-libnpp`. | |
| Use the maintained script in the repository to build and install `FFmpeg` with `libopenh264` and NVIDIA NVENC support. The script enables `--enable-libopenh264`, `--enable-cuda-nvcc`, and `--enable-libnpp`. |
| <Tab title="Debian/Ubuntu (Script)"> | ||
|
|
||
| Use the maintained script in the repository to build and install `FFmpeg` with `libopenh264` and NVIDIA NVENC support. The script enables `--enable-libopenh264`, `--enable-cuda-nvcc`, and `--enable-libnpp`. | ||
| Use the maintained script in the repository to build and install `FFmpeg` with NVIDIA NVENC support. The script enables `--enable-cuda-nvcc` and `--enable-libnpp`. |
There was a problem hiding this comment.
Same script description mismatch as in
installation.mdx
The install_ffmpeg.sh script still includes libopenh264-dev and --enable-libopenh264 in the build. Describing it as only enabling --enable-cuda-nvcc and --enable-libnpp is incorrect until that script is actually updated.
| Use the maintained script in the repository to build and install `FFmpeg` with NVIDIA NVENC support. The script enables `--enable-cuda-nvcc` and `--enable-libnpp`. | |
| Use the maintained script in the repository to build and install `FFmpeg` with `libopenh264` and NVIDIA NVENC support. The script enables `--enable-libopenh264`, `--enable-cuda-nvcc`, and `--enable-libnpp`. |
- beginner.mdx: pair h264_nvenc with use_hwaccel=True (NVENC requires hardware acceleration; previous use_hwaccel=False would fail or silently fall back). - install_ffmpeg.sh: drop libopenh264-dev apt package and the --enable-libopenh264 configure flag so the script matches the doc claims about NVENC-only support. Addresses Greptile review feedback on NVIDIA-NeMo#1926. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
- Revert install_ffmpeg.sh changes (those belong with NVIDIA-NeMo#1918 / a follow-up code PR, not this docs-only port). - Rewrite the install script description in installation.mdx and video.mdx so it accurately reflects the script's current behavior (still enables --enable-libopenh264) while making clear that Curator's transcoding stage only supports h264_nvenc. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
| pipe = Pipeline(name="transcode_example") | ||
| pipe.add_stage(FixedStrideExtractorStage(clip_len_s=10.0, clip_stride_s=10.0)) | ||
| pipe.add_stage(ClipTranscodingStage(encoder="libopenh264", encode_batch_size=16, encoder_threads=1, verbose=True)) | ||
| pipe.add_stage(ClipTranscodingStage(encoder="h264_nvenc", encode_batch_size=16, encoder_threads=1, verbose=True)) |
There was a problem hiding this comment.
The quickstart Pipeline Stage example was updated to
h264_nvenc but omits use_hwaccel=True. The Configure section directly below and the beginner.mdx tutorial both pair h264_nvenc with use_hwaccel=True, and the parameter table explicitly notes "Enable when using GPU encoders like h264_nvenc." A reader copying this quickstart will get a silently misconfigured pipeline that may fail to engage NVENC.
| pipe.add_stage(ClipTranscodingStage(encoder="h264_nvenc", encode_batch_size=16, encoder_threads=1, verbose=True)) | |
| pipe.add_stage(ClipTranscodingStage(encoder="h264_nvenc", use_hwaccel=True, encode_batch_size=16, encoder_threads=1, verbose=True)) |
PR NVIDIA-NeMo#1918 was superseded by NVIDIA-NeMo#1930, which expanded the encoder story beyond an h264_nvenc-only model: - Adds libvpx-vp9 as a built-in CPU fallback encoder for non-NVENC GPUs (A100/H100). VP9-in-MP4, BSD-licensed. - Restores libopenh264 as an opt-in BYO encoder accepted by ClipTranscodingStage when a user-installed FFmpeg provides it. The stage probes at setup and raises with a docs link if missing. - Curator's bundled FFmpeg now ships with libvpx-vp9 in place of libopenh264; install script description updated accordingly. Doc updates: - installation.mdx: new "Bring-Your-Own H.264 Software Encoder (Advanced)" section with system FFmpeg / custom build options, SUPPORTED_ENCODERS extension, GPL caveat for libx264. - get-started/video.mdx: A100/H100 NVENC-less callout; CLI table lists all three encoders with BYO link. - transcoding.mdx: encoder table grows to 3 rows (NVENC, VP9, BYO); new "Need software H.264?" callout linking to BYO section; param descriptions updated. - tutorials/beginner.mdx: encoder line and code comment now mention libvpx-vp9 fallback for non-NVENC GPUs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
|
|
||
| ### Bring-Your-Own H.264 Software Encoder (Advanced) | ||
|
|
||
| Curator's default FFmpeg build deliberately excludes software H.264 encoders (`libopenh264`, `libx264`, `libx265`). If your environment permits these encoders and you want H.264 software encoding (for example, on GPUs without an NVENC encoder block such as A100 or H100), you can install them yourself. |
There was a problem hiding this comment.
The new BYO H.264 section opens with a claim that contradicts the actual script.
docker/common/install_ffmpeg.sh already installs libopenh264-dev via apt and passes --enable-libopenh264 to the configure step — so libopenh264 is bundled in the default Curator FFmpeg build. The "Option 2" instructions that follow ("add libopenh264-dev to the apt list and --enable-libopenh264 to the configure flags") would be adding flags that are already present, misleading users into thinking a rebuild is required when the encoder is already available out of the box.
| Curator's default FFmpeg build deliberately excludes software H.264 encoders (`libopenh264`, `libx264`, `libx265`). If your environment permits these encoders and you want H.264 software encoding (for example, on GPUs without an NVENC encoder block such as A100 or H100), you can install them yourself. | |
| Curator's default FFmpeg build includes `libopenh264` but excludes `libx264` and `libx265`. If your environment requires `libx264` or `libx265`, or you want to use a different system-installed FFmpeg, you can configure them yourself. |
| --transcode-encoder h264_nvenc \ | ||
| --verbose |
There was a problem hiding this comment.
The encoder was changed from
libopenh264 (CPU, no hwaccel needed) to h264_nvenc (GPU/NVENC), but --transcode-use-hwaccel was not added. Without this flag the CLI defaults to use_hwaccel=False, which disables the hardware acceleration path that NVENC requires — the same pairing issue that was fixed in beginner.mdx for the Python API. The transcoding.mdx Script Flags quickstart correctly includes --transcode-use-hwaccel alongside h264_nvenc.
| --transcode-encoder h264_nvenc \ | |
| --verbose | |
| --transcode-encoder h264_nvenc \ | |
| --transcode-use-hwaccel \ | |
| --verbose |
Mirrors the docs/ delta from PR NVIDIA-NeMo#1959 ("Update FFmpeg and video processing support") into fern/versions/v26.04/pages/. PR NVIDIA-NeMo#1959 edited docs/ which is deprecated — this carries the same changes into the fern site. - Rename "Bring-Your-Own H.264 Software Encoder (Advanced)" → "Software H.264/HEVC/AV1 Codec Support (Advanced)"; the section now also covers the software-decoder side, not just the encoder side. - Add an upfront <Warning> in installation.mdx and video.mdx explaining that H.264/HEVC/AV1 inputs need a software decoder even with NVENC/NVDEC, because ffprobe runs in CPU-only Ray actors. Both link to the bundled install_h264_support.sh runtime installer. - Restructure the Codec Support section to three options (bundled installer, system FFmpeg, custom rebuild) and mention software h264/hevc/av1 decoders alongside the libopenh264 / libx264 encoder bullets. - transcoding.mdx: encoder table + parameter description point at the install_h264_support.sh path; new troubleshooting note for SoftwareCodecMissingError. - All cross-references migrated to the new #software-h264hevcav1-codec-support-advanced anchor. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
suiyoubi
left a comment
There was a problem hiding this comment.
LGTM! Thanks for helping with the docs change
Signed-off-by: Ayush Dattagupta <ayushdg95@gmail.com>
| #### Option 1: Run the bundled installer inside the container (Recommended) | ||
|
|
||
| The repository ships a runtime opt-in script that recompiles FFmpeg with software h264/hevc/av1 decoders enabled, optionally including the `libopenh264` encoder. It runs **inside an existing container** — no image rebuild required. | ||
|
|
||
| ```bash | ||
| # Inside the container — adds h264/hevc/av1 software decoders only (LGPLv3): | ||
| bash /opt/Curator/docker/common/install_h264_support.sh | ||
|
|
||
| # Same plus the libopenh264 software h264 ENCODER, so --transcode-encoder=libopenh264 works: | ||
| bash /opt/Curator/docker/common/install_h264_support.sh --with-libopenh264 | ||
| ``` | ||
|
|
||
| The build takes ~5–10 minutes, replaces `/usr/local/bin/{ffmpeg,ffprobe}` in place, and pins to the same FFmpeg tag as the image build. Script source: [docker/common/install_h264_support.sh](https://github.com/NVIDIA-NeMo/Curator/blob/main/docker/common/install_h264_support.sh). |
There was a problem hiding this comment.
install_h264_support.sh referenced but does not exist in the repository
docker/common/install_h264_support.sh is cited as the "Recommended" fix in three separate pages (installation.mdx, video.mdx, transcoding.mdx), but git ls-files docker/common/ confirms only install_ffmpeg.sh, install_etcd_nats.sh, and install_haproxy.sh exist. A user following the recommended path will immediately hit bash: /opt/Curator/docker/common/install_h264_support.sh: No such file or directory. The PR description acknowledges companion code from r1.2.0 needs forward-porting but names only install_ffmpeg.sh — install_h264_support.sh appears to be a net-new script that hasn't been ported yet.
9a4e7c5 to
f6410d9
Compare
|
/ok to test f6410d9 |
Summary
Ports SME-authored doc edits for the video transcoding encoder rework into the latest 26.04 fern pages.
Origin: the SME work landed across two PRs targeting
r1.2.0:This PR mirrors #1930's docs delta into
fern/versions/v26.04/pages/.What's in #1930 that we ported
libvpx-vp9as a built-in CPU fallback encoder for non-NVENC GPUs (A100/H100). VP9-in-MP4, BSD-licensed.libopenh264as an opt-in BYO encoder accepted byClipTranscodingStagewhen a user-installed FFmpeg provides it. The stage probes at setup and raises with a docs link if missing.SUPPORTED_ENCODERSextension instructions, and GPL caveat forlibx264.Files changed
Scope
This PR is docs-only. The companion code changes from #1930 (
SUPPORTED_ENCODERSvalidator, libopenh264 setup probe, libvpx-vp9 routing inClipTranscodingStage) and theinstall_ffmpeg.shscript update live onr1.2.0and need to be forward-ported tomainseparately. Until that lands, these docs describe behavior the code onmaindoes not yet have.Test plan
h264_nvenc,libvpx-vp9, andlibopenh264(BYO) with correct hwaccel guidance🤖 Generated with Claude Code