[FFmpeg-devel] H264: mp4toannexb BSF and streaming

Alexandre Ferrieux alexandre.ferrieux
Wed Aug 18 16:33:49 CEST 2010


On 18/08/2010 16:18, Tomas H?rdin wrote:
> On Wed, 2010-08-18 at 16:06 +0200, Alexandre Ferrieux wrote:
>> On 18/08/2010 15:33, Alexandre Ferrieux wrote:
>>>
>>> What I'm trying to do is understand where these "important" extradata
>>> are in the 3GP chunk hierarchy:
>>>
>>> - either they already in a separate chunk that is non-causal (comes at
>>> the end of the stream), and I'm doomed.
>>>
>>
>> Further experiments with varied clip durations, sadly show that the above holds :(
>>
>> Indeed, the produced .3gp files contain a few O(1) blocks (which deserve the name of 'header' or 'trailer'), but also
>> unfortunately *two* O(N) blocks: 'mdat' for main bitstream, 'moov' for extradata. There being more than one toplevel
>> chunk O(N) in size, with important data in both, wipes any hope of live streaming. Good job, whoever designed that :/
>>
>> -Alex
>
> Isn't the extradata the same if the encoder uses the same settings? What
> I'm getting at is that you could use a LUT of "supported" settings with
> corresponding extradata, and inject a few bytes before the 3GP stream
> starts telling which settings were used? I'm guessing you don't need a
> valid 3GP stream anyway (since one is nigh impossible to create).

Yes, I had hoped something along these lines, but it seems the extradata are not constant, they are different for each 
frame. Essentially they are just as unpredictable as frame data themselves.

Could an H264/quicktime expert explain why they are transmitted separately, *not* interleaved with the frame data (as 
they are in AnnexB format) ?

-Alex




More information about the ffmpeg-devel mailing list