Trim some codecs from FFmpeg build#162
Conversation
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Greptile SummaryThis PR extends the existing selective FFmpeg codec trimming by disabling five additional software decoders —
Confidence Score: 4/5The change is straightforward and follows the established pattern in this build script; the main risk is that disabling software H.264/HEVC decoders could break CPU-only environments or FFmpeg stream probing, but those are unlikely scenarios for a GPU-first library like DALI. The five new --disable-decoder flags are consistent with the existing selective-disable approach. The AAC removals look clean. The H.264/HEVC removals are paired correctly with the BSFs needed for NVDEC, but removing the software decoders eliminates any CPU fallback path and could interfere with avformat_find_stream_info stream probing on H.264/HEVC content. build_scripts/build_ffmpeg.sh — specifically the interaction between the newly disabled h264/hevc decoders and the still-enabled h264_mp4toannexb/hevc_mp4toannexb BSFs warrants a second look if DALI has any CPU-only test paths. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Video File / Container] --> B[avformat demuxer\nenabled]
B --> C{Codec type}
C -->|H.264| D[h264_mp4toannexb BSF\nenabled]
C -->|HEVC| E[hevc_mp4toannexb BSF\nenabled]
C -->|AAC Audio| F[AAC SW Decoder\ndisabled: aac / aac_fixed / aac_latm]
D --> G[NVDEC Hardware Decoder\ngpu path]
E --> G
C -->|H.264 SW decode| H[H.264 SW Decoder\ndisabled: h264]
C -->|HEVC SW decode| I[HEVC SW Decoder\ndisabled: hevc]
style F fill:#f99,stroke:#c00
style H fill:#f99,stroke:#c00
style I fill:#f99,stroke:#c00
style G fill:#9f9,stroke:#090
Reviews (1): Last reviewed commit: "Trim some codecs from FFmpeg build" | Re-trigger Greptile |
| --disable-decoder=hevc \ | ||
| --disable-decoder=h264 \ |
There was a problem hiding this comment.
Software H.264/HEVC decoders disabled while BSFs remain enabled
The h264_mp4toannexb and hevc_mp4toannexb BSFs are kept (line 56), which suggests the pipeline routes these bitstreams to a hardware decoder (NVDEC). Disabling the software decoders is therefore intentional for the GPU path. However, if FFmpeg calls avformat_find_stream_info() internally — which DALI's demuxer likely does — FFmpeg may attempt to probe the stream by decoding a few packets using the software decoder. With both hevc and h264 decoders disabled, probing such streams could yield incomplete or inaccurate stream metadata (e.g., missing width/height, frame rate, or pixel format). This is also a hard break for any CPU-only test or CI environment that exercises the video decode path without NVDEC available.
There was a problem hiding this comment.
The DALI side rework will be done in a separate PR to the DLAI repo itself. This is fully intentional.
|
Related to NVIDIA/DALI#6352. |
No description provided.