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

Thorsten Jordan tjordan
Wed Jan 30 13:06:47 CET 2008

Thorsten Jordan schrieb:
> Hello,
> i encountered a problem while remuxing h264 material from TS to MP4.
> Video stream is copied, Audiostream transformed from AC3 to AAC, but
> only video matters here.
> The problem is that the input reader uses h264_parser to split the data,
> which exits just after SPS is found (h264_parser.c line 129 ff) but the
> MP4 muxer wants SPS and PPS, thus the assertion in mov_write_avcc_tag
> fails (movenc.c line 478).
i have to correct myself, the parser exits as soon as any NAL type
unequal to 7,8,9 is found (SPS, PPS, access unit delimiter).

In the particular stream there are two NAL type 06 (SEI = Supplemental
enhancement information) between SPS and PPS.
So the parser exits right after SPS, when it sees the SEI.

Maybe it should be extended by ignoring SEI here as well?

Regards, Thorsten

More information about the ffmpeg-devel mailing list