Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to get mono from stereo using lame? (Read 8774 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to get mono from stereo using lame?

I have 16 bit stereo 96 kHz source wav file with duration 2:45 min. I want to get mono mp3 file. When I try this: lame.exe -r -s 96 --bitwidth 16 -m m -q 5 -o -b 128 --cbr "1.wav" "1.mp3" I get 128 kbps, 48000 Hz Mono mp3 file with duration 5:31 min. What's wrong?

How to get mono from stereo using lame?

Reply #1
Quote
What's wrong?

-r is wrong.
Use just  lame.exe -a -b 128 1.wav 1.mp3

How to get mono from stereo using lame?

Reply #2
the problem was in -a

How to get mono from stereo using lame?

Reply #3
What problem? You can use either -a or -m m to convert stereo to mono.

 

How to get mono from stereo using lame?

Reply #5
What problem? You can use either -a or -m m to convert stereo to mono.

-m m without -a  does not make mono from stereo.


Yes it does.  The lame man page gives full description and some examples as well.  All you need do to convert stereo to mono is use '-m m'.  I quite often encode stereo audio book CDs to mono using "--resample 22.05 -m m --abr 64" and unsurprisingly I end up with a mono track around 64 kbps at samplerate 22.05.  Here is the relevant part of mediainfo output to illustrate this:
Code: [Select]
Audio
Format                           : MPEG Audio
Format version                   : Version 2
Format profile                   : Layer 3
Duration                         : 3mn 20s
Bit rate mode                    : Variable
Bit rate                         : 64.0 Kbps
Channel(s)                       : 1 channel
Sampling rate                    : 22.05 KHz
Compression mode                 : Lossy
Stream size                      : 1.50 MiB (100%)
Writing library                  : LAME3.99r
Encoding settings                : -m m -V 4 -q 3 -lowpass 11 --abr 64


The error in your command line is that you set -s 96.  From the lame man page:

Code: [Select]
       -s sfreq
              sfreq = 8/11.025/12/16/22.05/24/32/44.1/48

              Required only for raw PCM input files.  Otherwise it will be determined from  the  header  of  the
              input file.

              LAME  will automatically resample the input file to one of the supported MP3 samplerates if neces?
              sary.


As you can see lame doesn't support 96 KHz, so you need to remove -s 96 and use "--resample 48" (or any of the supported sample rates 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48).

btw you shouldn't use "-r" or "--bitwidth" unless the source is raw pcm.  wav isn't raw pcm.