[FFmpeg-devel] h264_annexbtomp4 filter ideas, was: Collection of patches

Thorsten Jordan tjordan
Thu Apr 24 16:23:49 CEST 2008

Michael Niedermayer schrieb:
> wOn Thu, Apr 24, 2008 at 09:10:50AM +0200, Thorsten Jordan wrote:
>> Thorsten Jordan schrieb:
>>> Michael Niedermayer schrieb:
>>>> On Wed, Apr 23, 2008 at 09:15:40AM +0200, Thorsten Jordan wrote:
>>>> [...]
>>> Which brings up the question if there should be never SEI units in
>>> global headers. I found nothing near the SPS/PPS description that
>>> mentions SEI, so they are not used as header extension?
>> If one would solve this by writing a h264_annexbtomp4 bitstream filter,
>> there are some issues:
> The problem is the parser_split() API not h264_annexbtomp4. The world
> is not just .mp4 and .h264, there are other containers needing the headers
> seperated but in annex B format. 
> Besides this the decoder needs the headers as well, they can occur later
> then the first IDR frame the common code will read ahead until the split
> function has filled them in. Your suggested hack of doing this in 
> h264_annexbtomp4 will break decoding of such streams.
ok, if I understood you correctly, you want no annexbtomp4 filter, but a
separate_h264_header-filter, that places the SPS+PPS in extradata
(without any SEI NALUs in between), and removes them from the stream
itself. It would work on annexb format and keep that.
It would place the first SPS/PPS it finds in extradata, and remove them
from the stream, and also any SPS/PPS found later. Alternativly it would
keep later SPS/PPS as split does.

Is this what you had in mind?
And: keep every SPS/PPS after the first or remove them too?

Regards, Thorsten

More information about the ffmpeg-devel mailing list