[FFmpeg-user] Use ffmpeg to convert stereo audio to mono

Moritz Barsnick barsnick at gmx.net
Fri Dec 5 10:37:14 CET 2014


> Could we know how ffmpeg determine audio channel number from MP4 file? MP4
> container indicates it's channel count is 2, but ffprobe shows mono as
> expected.

ffprobe probably looks at the actual AAC stream?

Here's a hint:
http://sourceforge.net/p/opencore-amr/mailman/message/31876733/

"The cause for this is that libavformat always writes 2 as number of 
channels in the m4a header regardless of the actual stream."
(This was about HE-AAC, but may be valid here as well.)

Is this causing any issues except your trust in the nature of the file?

I must say I'm not sure whether that is actually true, whether it's
okay for ffmpeg to do so, and whether this is still valid with recent
ffmpeg. I can confirm the behavior though.

Moritz

P.S.: I like adding "other tools" to the confusion, without knowing
what they look at:

$ mediainfo audio_48k_mono.mp4 | grep -Fi chann
Channel(s)                               : 2 channels
Channel(s)_Original                      : 1 channel
Channel positions                        : Front: C
$ mplayer -vo null -ao null audio_48k_mono.mp4 2>/dev/null | grep -F AUDIO
AUDIO: 44100 Hz, 1 ch, s16le, 48.3 kbit/6.85% (ratio: 6040->88200)
$ # vlc says: Codec -> Stream 0 -> Channels: Stereo


More information about the ffmpeg-user mailing list