Help - Search - Members - Calendar
Full Version: transcoding w/lame 3.96.1 stereo and mono output same filesize?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Slim Backwater
I was just transcoding an MP3 to put onto my cellphone and noticed that the stereo filesize and the mono filesize are the same. Is this right?

I'm using lame 3.96.1 on Ubuntu Edgy Eft

CODE

$ uname -a
Linux mybox 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006 i686 GNU/Linux
$cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.10
DISTRIB_CODENAME=edgy
DISTRIB_DESCRIPTION="Ubuntu 6.10"
$ lame
LAME version 3.96.1 (http://lame.sourceforge.net/)
$ ls -la 01.mp3
-rw------- 1 me    me    6277120 2006-06-21 22:47 01.mp3
$ lame -b 40 --resample 24 -m s 01.mp3 b40s24ms.mp3
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Resampling:  input 44.1 kHz  output 24 kHz
Using polyphase lowpass filter, transition band:  7065 Hz -  7355 Hz
Encoding 01.mp3 to b40s24ms.mp3
Encoding as 24 kHz  40 kbps stereo MPEG-2 Layer III (19.2x) qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
11522/11525 (100%)|    0:19/    0:19|    0:19/    0:19|   14.395x|    0:00
average:  40.0 kbps   LR: 11525 (100.0%)

ReplayGain: -2.2dB
$ lame -b 40 --resample 24 -m j 01.mp3 b40s24mj.mp3
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Resampling:  input 44.1 kHz  output 24 kHz
Using polyphase lowpass filter, transition band:  7065 Hz -  7355 Hz
Encoding 01.mp3 to b40s24mj.mp3
Encoding as 24 kHz  40 kbps j-stereo MPEG-2 Layer III (19.2x) qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
11522/11525 (100%)|    0:22/    0:22|    0:22/    0:22|   12.296x|    0:00
average:  40.0 kbps   LR: 727 (6.308%)   MS: 10798 (93.69%)

ReplayGain: -2.2dB
$ lame -b 40 --resample 24 -m m 01.mp3 b40s24mm.mp3
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
LAME version 3.96.1 (http://lame.sourceforge.net/)
CPU features: MMX (ASM used), SSE, SSE2
Autoconverting from stereo to mono. Setting encoding to mono mode.
Resampling:  input 44.1 kHz  output 24 kHz
Using polyphase lowpass filter, transition band: 10548 Hz - 10839 Hz
Encoding 01.mp3 to b40s24mm.mp3
Encoding as 24 kHz  40 kbps single-ch MPEG-2 Layer III (9.6x) qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
11522/11525 (100%)|    0:13/    0:13|    0:13/    0:13|   20.423x|    0:00
average:  40.0 kbps

ReplayGain: -2.3dB
$ ls -la
-rw------- 1 me    me    6277120 2007-01-20 18:44 01.mp3
-rw-r--r-- 1 me    me    1383000 2007-01-20 18:45 b40s24mj.mp3
-rw-r--r-- 1 me    me    1383000 2007-01-20 18:45 b40s24mm.mp3
-rw-r--r-- 1 me    me    1383000 2007-01-20 18:52 b40s24ms.mp3


Shouldn't the "-m m" file be half the size of the "-m j" and "-m s" ? Or am I just out to lunch?

BTW, if this is completely the wrong place to discuss this, please just give me a nudge, thanks.

._.

Edit:
CODE

$ diff b40s24mj.mp3 b40s24mm.mp3
Binary files b40s24mj.mp3 and b40s24mm.mp3 differ
gib
QUOTE(Slim Backwater @ Jan 20 2007, 13:57) *

Shouldn't the "-m m" file be half the size of the "-m j" and "-m s" ?

No. You specified "-b 40", therefore all of those files will be 40Kb/s.
kjoonlee
Bitrate is filesize divided by playtime. If song length is the same, the same bitrate means the same filesize.
Slim Backwater
QUOTE(gib @ Jan 20 2007, 19:29) *

QUOTE(Slim Backwater @ Jan 20 2007, 13:57) *

Shouldn't the "-m m" file be half the size of the "-m j" and "-m s" ?

No. You specified "-b 40", therefore all of those files will be 40Kb/s.


That makes sense. So if I wanted to save space by dropping to mono, should I also half the bitrate?

That makes too many questions in my head. If I encode stereo @ 40kb/s, but mute one channel during playback, the remaining channel will sound to have half the quality of the same file encoded at mono @ 40?

I've just discovered an entirely new way to consider bitrates. A quadraphonic source @ 40, each individual channel would have 1/4 the bandwidth of the a mono source. If I'm doing a podcast at a fixed bitrate, mono could sound better than stereo (less compression artifacts?) ?

I guess that the origin of my misunderstanding was that I though that -b was not the total bandwidth, but the bandwidth per channel, and that's wrong, it's the total bandwidth.

Wow, that was quite unexpected.

Thanks!
pdq
QUOTE(Slim Backwater @ Jan 20 2007, 20:42) *



So if I wanted to save space by dropping to mono, should I also half the bitrate?




If it had been encoded in a mode in which each channel had received 20 kbps all to itself then that would be correct. However, this mode is almost never used. Even when so-called stereo mode is used, the encoder can still use more bits for one channel some of the time, and more for the other at other times, giving better overall quality for both channels than a 20 kbps mono file.

Even better results are achieved by using what is referred to as joint stereo. In this mode the encoder is able to determine when it is more efficient to encode the stereo as the sum and difference of the signals, giving an even further improvement in quality over 20 kbps mono.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.