[FFmpeg-devel] [PATCH] allow high audio sample rates in mov/mp4 muxer
Justin Ruggles
justin.ruggles
Mon Sep 6 20:41:28 CEST 2010
Alex Converse wrote:
> On Sun, Jun 13, 2010 at 9:16 PM, Justin Ruggles
> <justin.ruggles at gmail.com> wrote:
>> Michael Niedermayer wrote:
>>
>>> On Sun, Jun 13, 2010 at 12:52:29PM -0400, Justin Ruggles wrote:
>>>> Baptiste Coudurier wrote:
>>>>
>>>>> On 6/12/10 8:26 AM, Justin Ruggles wrote:
>>>>>> Baptiste Coudurier wrote:
>>>>>>
>>>>>>> On 06/10/2010 01:27 PM, Justin Ruggles wrote:
>>>>>>>> Alex Converse wrote:
>>>>>>>>
>>>>>>>>> On Thu, Jun 10, 2010 at 1:54 PM, Justin Ruggles
>>>>>>>>> <justin.ruggles at gmail.com> wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> This patch allows the use of sample rates> 65535 in mov/mp4 (e.g. 96kHz
>>>>>>>>>> and 192kHz). I don't know where to find this info in the MP4 spec, but
>>>>>>>>>> this is how the MPEG-4 ALS Reference Software does it.
>>>>>>>>>>
>>>>>>>>> It might also be a good idea to look at the AAC 88.2/96 kHz test vectors.
>>>>>>>> Well, it seems that it shouldn't be 0, but should be the actual sample
>>>>>>>> rate using more than 16 bits. I guess the reserved value that follows
>>>>>>>> is no longer reserved. I'll send a new patch soon.
>>>>>>> Humm, I don't feel confident about this.
>>>>>>> Can we ask ISO about this ?
>>>>>> Ok, so after some more research, it looks like the reference samples and
>>>>>> the specs are in agreement that the sample rate field is 16.16 fixed
>>>>>> point and that only the low 16 bits of the sample rate are written.
>>>>> Can you please quote the specs ? Just for reference.
>>>> ISO 14496-12 3rd Ed. 2008
>>>> 8.5.2.3 Sample Description Box, Semantics
>>>> SampleRate is the sampling rate expressed as a 16.16 fixed-point number
>>>> (hi.lo)
>>> Numbers 0.0 - 65535.65535 can be expressed as 16.16 fixed point.
>>> Numbers outside this range cannot be expressed as fixed point unless you
>>> define one of the used concepts like "expressed" differently from common
>>> sense.
>>> Thus it follows that in ISO 14496-12 3rd Ed. 2008 the existence of a
>>> Sample Description Box in a file is incompatible with sampling rates
>>> beyond 65535.65535.
>>>
>>> Of course this conclusion can only be drawn if we take the quoted text
>>> litterally and assume the spec is written by a person who used exact
>>> language.
>>> I tend toward asking ISO as well and also to point out that the spec is
>>> unclear either way.
>> The spec is certainly unclear and some ISO references differ:
>>
>> - The reference samples for 96kHz AAC write a value of 30464.0000, which
>> is the low 16 bits of 96000.
>>
>
> I'm seeing 0 for al0[0-2]_96.mp4.
> http://streams.videolan.org/Mpeg_Conformance/ftp.iis.fhg.de/mpeg4audio-conformance/compressedMp4/al00_44.mp4
Maybe I was looking at older test vectors? I'm not sure, but the AAC
reference samples you pointed to do all have 0, which corresponds to the
most recent ALS reference samples. New patch attached. Same as
original patch but smaller.
Thanks,
Justin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: movenc_high_samplerate_3.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100906/f455f18b/attachment.asc>
More information about the ffmpeg-devel
mailing list