Help - Search - Members - Calendar
Full Version: problems with .raw to .mp3 using lame commandline
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
Tinobee
hey guys,

i used sox for joining several .wav files to 1 big (4.36GB) .raw file. later i tried to encode this .raw to .mp3 using lame on commandline window. my commandline is

lame -r -s 48000 -V0 -m s -p old.raw new.mp3

after submitting it starts but its estimatet total encoding time of ~3Min is far too less. i checked the encoded mp3. it shows the right sampling rate and bit rate BUT it gets hardcore distorted and i cannot figure out my mistake.

chance you could help me out please?

and what does this technically mean?
QUOTE
infile and/or outfile can be "-", which means
i dont understand the words stdin and stdout. and cannot find infos in lame commandline documentation. what's that mean? where to use it? and how should its commandline look like? probably like this? lame -.wav -.raw ?

regards, tinobee
Egor
QUOTE(Tinobee @ Sep 6 2006, 06:37) *
and what does this technically mean?
QUOTE
infile and/or outfile can be "-", which means
i dont understand the words stdin and stdout. and cannot find infos in lame commandline documentation. what's that mean? where to use it? and how should its commandline look like? probably like this? lame -.wav -.raw ?

Hi, there is an article in Wikipedia:
Standard streams
Streams and piping are used to "stream" output directly to the encoder, avoiding large temporal wav file. Command line would look like "lame - -", but you will have to stream data to and from the encoder. In Windows you can do it in such a way:
>type audio.wav | lame -V0 - - > audio.mp3
More info on pipe and stream redirection is available in Windows Help system. You shouldn't use piping to encode on a regular basis from command line.


Your command line for raw is correct, but there is probably a bug in lame. Lame required RAW to be signed and big-endian on my Intel machine, and with little-endian RAW it produced noise.

Edit: also, filesize over 4 GB may be an issue.

Edit2: try the -x switch Gabriel pointed out.
greynol
QUOTE(Egor @ Sep 5 2006, 21:33) *
You shouldn't use piping to encode on a regualar basis from command line.

Why is this?
Egor
QUOTE(greynol @ Sep 6 2006, 12:42) *
QUOTE(Egor @ Sep 5 2006, 21:33) *
You shouldn't use piping to encode on a regualar basis from command line.
Why is this?

'Cause it's ridiculous (you have a filename to specify, but go another, harder way). And because lame doesn't write vbr header when it encodes to stdout.
greynol
It seemed to me that you were speaking about piping in general (IOW, not just about Lame). Needless to say, I was thinking that there might be profound consequences.
Gabriel
QUOTE(Tinobee @ Sep 6 2006, 01:37) *

lame -r -s 48000 -V0 -m s -p old.raw new.mp3

after submitting it starts but its estimatet total encoding time of ~3Min is far too less. i checked the encoded mp3. it shows the right sampling rate and bit rate BUT it gets hardcore distorted and i cannot figure out my mistake.


Is your raw content really 48kHz?



QUOTE(Egor @ Sep 6 2006, 06:33) *

Your command line for raw is correct, but there is probably a bug in lame. Lame required RAW to be signed and big-endian on my Intel machine, and with little-endian RAW it produced noise.

-x
Egor
QUOTE(Gabriel @ Sep 6 2006, 14:17) *
QUOTE(Egor @ Sep 6 2006, 06:33) *
Your command line for raw is correct, but there is probably a bug in lame. Lame required RAW to be signed and big-endian on my Intel machine, and with little-endian RAW it produced noise.
-x

Thanks, I completely missed the "force byte-swapping of input" euphemism smile.gif . BTW, shouldn't little-endian be the default one?
Tinobee
QUOTE
Is your raw content really 48kHz?
jup! is this a problem?
Egor
QUOTE(Tinobee @ Sep 8 2006, 20:42) *
QUOTE
Is your raw content really 48kHz?
jup! is this a problem?

Nope, try adding the -x switch to your command line. Gabriel just asked to confirm smile.gif (btw, if your audio was 44k, but you accidently specified 48k, that will cause only pitch change and not white noise.)
Tinobee
worked perfect now!

the missin -x added made all running perfectly! got the wished result out now!

thanks for support!

tinobee
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.