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

Thorsten Jordan tjordan
Fri Feb 1 09:35:51 CET 2008


Michael Niedermayer schrieb:
> On Wed, Jan 30, 2008 at 01:06:47PM +0100, Thorsten Jordan wrote:
>> Thorsten Jordan schrieb:
>>> Hello,
>>>
>> 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?
here is a dump of it, some SEI after SPS and some after PPS
00000000  00 00 00 01 09 10 00 00  00 01 67 4d 40 28 89 99
00000010  80 f0 08 8b 01 f7 01 01  01 f0 00 00 03 00 10 00
00000020  00 03 03 29 40 00 00 00  01 06 00 01 c0 80 00 00
00000030  00 01 06 06 01 a4 80 00  00 00 01 68 ea 8f 20 00
00000040  00 00 01 06 01 01 32 80  00 00 00 01 61 b8 3d 94

or the SPS SEI datas directly (after the 0x06)
00 01 c0 80
06 01 a4 80

and the PPS's SEI
01 01 32 80

> 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!
I haven't yet used the bitstream filter API and i have no plans to use
malloc, atm i only patched the abort condition in the h264 splitter to
abort when the startcode is unequal to 6,7,8,9 instead of 7,8,9.

I don't know if that would cause trouble elsewhere, but here it works so
far...

-- 
Greetings, Thorsten




More information about the ffmpeg-devel mailing list