[FFmpeg-devel] [PATCH] movenc.c: Correct behaviour when muxing non-stereo audio in mode != MODE_MOV
Baptiste Coudurier
baptiste.coudurier
Fri Oct 15 10:30:52 CEST 2010
On 10/15/10 12:28 AM, Tomas H?rdin wrote:
> On Thu, 2010-10-14 at 15:29 -0700, Baptiste Coudurier wrote:
>> Hi Tomas,
>>
>> On 10/14/2010 06:01 AM, Tomas H?rdin wrote:
>>> Hi
>>>
>>> Today I noticed that writing mono audio to the mp4 muxer causes it to
>>> claim that the audio is stereo, which causes the audio to play back in
>>> stereo at double speed.
>>>
>>> The culprit turns out to be mov_write_audio_tag() always writing 2 as
>>> the number of channels. Since I don't know the mp4 spec this is either
>>> correct or not. IRC discussion didn't yield a good answer, so I simply
>>> decided to submit two patches
>>
>> Code is correct according to the specs.
>> You'd have to inspect all codecs specifications to prove that they must
>> be set to something else. Example in AC3 specs:
>> "The values of the ChannelCount and SampleSize fields within the
>> AC3SampleEntry Box shall be ignored." Therefore set to default value (2).
>
> So if I understand this correctly, those values (ChannelCount,
> SampleSize, SampleRate) are only used for a few codecs. For all others
> they should be by the decoder. If so, then this is an mp2 decoder issue.
> In other words, Benjamin was probably right:
>
> 14:38 <@merbzt> adding the CODEC_CAP_CHANNEL_CONF capability to the
> codec might fix the probing
>
> I might try that later today. Should work, since the channel count is
> parsed by the decoder.
>
> Patches retracted I guess, and wtf_factor++.
Well, these values could be ignored for mp4, I think.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list