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

Tomas Härdin tomas.hardin
Fri Oct 15 09:28:54 CEST 2010

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101015/e79b2861/attachment.pgp>

More information about the ffmpeg-devel mailing list