Hi all,

The attached patch adds a parameter that enables the user to choose which 
AVC/HEVC NAL units to include in the output.
The parameter is supplied as a bitmask in order to keep things simple.

A short background on why we need it - in our transcoding process, we partition 
the video in chunks, the chunks are
transcoded in parallel and packaged in MPEG-TS container. The transcoded TS 
chunks are then concatenated and
packaged in MP4. These MP4 files are later repackaged on-the-fly to various 
protocols (HLS/DASH etc.) using our
JIT packager.
For performance reasons (can get into more detail if anyone's interested...), 
when packaging the MP4 to DASH/CENC,
we configure the packager to assume that each AVC frame contains exactly one 
NAL unit.
The problem is that the transition through MPEG-TS adds additional NAL units 
(NAL AUD before each frame + SPS/PPS
before each key frame), and this assumption fails.
Using the attached patch we can pass '-nal_types_mask 0x3e' which will make 
ffmpeg output only VCL NALs in the stream.



Attachment: 0001-avformat-movenc-add-param-for-filtering-nal-types.patch
Description: 0001-avformat-movenc-add-param-for-filtering-nal-types.patch

ffmpeg-devel mailing list

Reply via email to