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

Michael Niedermayer michaelni
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
this exactly?
Also a changed API must not do a memcpy() or malloc() where it isnt needed
currently!
(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
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080131/9e2081d3/attachment.pgp>



More information about the ffmpeg-devel mailing list