[FFmpeg-devel] [PATCH] movenc.c: Correct behaviour when muxing non-stereo audio in mode != MODE_MOV

Baptiste Coudurier baptiste.coudurier
Fri Oct 15 00:29:10 CEST 2010

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).

Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org

More information about the ffmpeg-devel mailing list