IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How to get mono from stereo using lame?, lame feature or bug?
newman079
post Apr 29 2012, 18:41
Post #1





Group: Members
Posts: 12
Joined: 31-May 10
Member No.: 81026



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?
Go to the top of the page
+Quote Post
lvqcl
post Apr 29 2012, 18:49
Post #2





Group: Developer
Posts: 3341
Joined: 2-December 07
Member No.: 49183



QUOTE
What's wrong?

-r is wrong.
Use just lame.exe -a -b 128 1.wav 1.mp3
Go to the top of the page
+Quote Post
newman079
post Apr 29 2012, 18:52
Post #3





Group: Members
Posts: 12
Joined: 31-May 10
Member No.: 81026



the problem was in -a
Go to the top of the page
+Quote Post
lvqcl
post Apr 29 2012, 19:08
Post #4





Group: Developer
Posts: 3341
Joined: 2-December 07
Member No.: 49183



What problem? You can use either -a or -m m to convert stereo to mono.
Go to the top of the page
+Quote Post
newman079
post Apr 29 2012, 20:47
Post #5





Group: Members
Posts: 12
Joined: 31-May 10
Member No.: 81026



QUOTE (lvqcl @ Apr 29 2012, 21:08) *
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.
Go to the top of the page
+Quote Post
Takla
post Apr 29 2012, 22:26
Post #6





Group: Members
Posts: 169
Joined: 14-November 09
Member No.: 74931



QUOTE (newman079 @ Apr 29 2012, 19:47) *
QUOTE (lvqcl @ Apr 29 2012, 21:08) *
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
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
       -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.

This post has been edited by Takla: Apr 29 2012, 22:30
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st July 2014 - 22:04