[FFmpeg-devel] h264-parser splits before PPS thus muxing to mp4 fails
Thu Jan 31 23:29:21 CET 2008
On Wed, Jan 30, 2008 at 01:06:47PM +0100, Thorsten Jordan wrote:
> 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?
This depends ...
If the SEI is part of the global header it should be included with PPS&SPS
if it is not the spliter API will have to be changed. What kind of SEI is
Also a changed API must not do a memcpy() or malloc() where it isnt needed
(and using the bitstream filter API or even an actual bitstream filter for
the split() might also be a good idea)
That is the cleaner and simpler the better.
A patch is welcome!
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel