Menu

#450 excessive bitrate on mono sections

Compatibility
closed-invalid
None
5
2017-08-08
2015-06-12
No

Many radio programs have long sections which are essentially mono (i.e. there are two channels, but both channels are the same). Lame apparently fails to recognize these sections as mono and allocates extra bitrate for stereo encoding.

Here is an illustration. First, I produce a file with two identical channels.

$ ffmpeg -i some_stereo_input.m4a -t 300 -ac 1 -y mono.wav
$ ffmpeg -i mono.wav -ac 2 -y dup.wav

I now encode this pseudo-stereo file, dup.wav, in both stereo and mono (-mm) mode, using VBR. Ideally, I expect to get the same bitrate in both modes.

$ lame -V4 dup.wav dup.mp3
LAME 3.100 (alpha 2, Jun 12 2015 14:34:45) 64bits (http://lame.sf.net)
warning: alpha versions should be used for testing only
Using polyphase lowpass filter, transition band: 17226 Hz - 17806 Hz
Encoding dup.wav to dup.mp3
Encoding as 48 kHz j-stereo MPEG-1 Layer III VBR(q=4)
...
kbps MS % long switch short %
101.6 100.0 65.6 12.0 22.4
Writing LAME Tag...done
ReplayGain: +2.6dB

$ lame -V4 -mm dup.wav dup.mp3
LAME 3.100 (alpha 2, Jun 12 2015 14:34:45) 64bits (http://lame.sf.net)
warning: alpha versions should be used for testing only
Autoconverting from stereo to mono. Setting encoding to mono mode.
Using polyphase lowpass filter, transition band: 17226 Hz - 17806 Hz
Encoding dup.wav to dup.mp3
Encoding as 48 kHz single-ch MPEG-1 Layer III VBR(q=4)
...
kbps mono % long switch short %
90.2 100.0 65.6 12.0 22.4
Writing LAME Tag...done
ReplayGain: +2.6dB

Note the non-negligible difference in bitrate: stereo takes 101.6 kbps while mono requires only 90.2 kbps.

Discussion

  • Robert Hegemann

    Robert Hegemann - 2017-08-08
    • status: open --> closed-invalid
    • assigned_to: Robert Hegemann
     
  • Robert Hegemann

    Robert Hegemann - 2017-08-08

    There is not much of a difference, because the 2 channel encode on mono files uses only the mid channel. The side channel is empty on mono audio. The slight increase in bitrate, compared to a 1 channel encode, is due to the overhead the frames need to maintain the infrastucture of 2 channels. (keyword sideinfo)

     

Log in to post a comment.

MongoDB Logo MongoDB