[FFmpeg-devel] h264-parser splits before PPS thus muxing to mp4 fails

Thorsten Jordan tjordan
Wed Jan 30 15:20:36 CET 2008

Baptiste Coudurier schrieb:
> Hi
> Can you update to latest svn please ? movenc.c has changed, so I can't
> see the correspondance with the current code.
i checked the latest svn, some parts got extracted to an extra file
(avc.c was that iirc), but the algorithm and problem stays

> You must pass extradata to mov muxer formatted as NAL units with
> startcodes (annex b) and those nal units must at least contains one sps
> and pps, or raw extradata like mov itself (mkv should work too) contains.
yeah, the movenc expects that the extra data starts with NAL start code
and contains one SPS and PPS. I see no problem on that side, it is
rather the h264 splitter. That fails to let the extra data start with
NAL start code and does abort on SEI NALs, thus aborting before
encountering the PPS.
I don't know what the splitter was supposed to do - if it should the
things above...

> Besides I do think split should extract sps and pps and put them into
> extradata, though maybe splitters are deprecated IIRC, and therefore
> your efforts should be put in a bitstream filter h264 annex b to mp4/mov
> (see mp4_to_annexb bitstream filter already present), which will
> reformat bitstream (startcodecs) and extract sps/pps to extradata.
uh, has ffmpeg such bitstream filters already, also for h264?

Regards, Thorsten

More information about the ffmpeg-devel mailing list