Help - Search - Members - Calendar
Full Version: how to convert wav to mpeg-1 using LAME?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
rustydomino
hello,

I am trying to convert a short .wav file to mp3 using LAME, to use as a cellphone ring tone. However, LAMEencodes the file to an mpeg-2.5 layer III file, which my phone can't play. How do I force LAME to encode an MPEG-1 file? I might be stupid but I can't figure it out from the LAME documentation or online help.

thanks much!
Mike
Ecronika
QUOTE (rustydomino @ Apr 28 2007, 06:01) *
hello,

I am trying to convert a short .wav file to mp3 using LAME, to use as a cellphone ring tone. However, LAMEencodes the file to an mpeg-2.5 layer III file, which my phone can't play. How do I force LAME to encode an MPEG-1 file? I might be stupid but I can't figure it out from the LAME documentation or online help.

thanks much!
Mike


Choose a bitrate >= 80 KBit/sec should force LAME to use MPEG-1 Layer 3.
rustydomino
OK, I found out how to do it. the source .wav file I had had a sample rate of 11025 Hz, which is what made LAME encode it to mpeg2.5 layer III. To get it to convert to an mpeg1 layer III file, I had to upsample to a sample rate compatible with mpeg1 (e.g., 32, 48, or 44.1 kHz). Now LAME converts this file to mpeg2 (which is OK).

to do this, I downloaded a freeware program called Wavosaur (http://www.wavosaur.com/), which seems to work OK.

cheers,
Mike (off to upload MOnty Python ringtones!)
Ecronika
QUOTE (rustydomino @ Apr 28 2007, 06:55) *
OK, I found out how to do it. the source .wav file I had had a sample rate of 11025 Hz, which is what made LAME encode it to mpeg2.5 layer III. To get it to convert to an mpeg1 layer III file, I had to upsample to a sample rate compatible with mpeg1 (e.g., 32, 48, or 44.1 kHz). Now LAME converts this file to mpeg2 (which is OK).

to do this, I downloaded a lousy shareware program. Are there any open source programs for windows that will do wav file up/downsampling?

thanks,
Mike


QUOTE
Source

--resample 8/11.025/12/16/22.05/24/32/44.1/48 output sampling frequency in kHz

Select output sampling frequency (for encoding only).
If not specified, LAME will automatically resample the input when using high compression ratios.
Nikaki
QUOTE (rustydomino @ Apr 28 2007, 07:55) *
to do this, I downloaded a freeware program called Wavosaur (http://www.wavosaur.com/), which seems to work OK.

You can do the same with the recorder that comes with every version of Windows rolleyes.gif

Start->All Programs->Accessories->Entertainment->Sound Recorder

Load the wave, select "Save as" from the File menu, and press the "Change" button.
Sunhillow
At least former versions of Windows Sound Recorder had a -ahem - not very good resampling algorithm.
Why don't you use LAME's built-in resampler? It is not bad...
Add --resample 32000 or whatever you like to the commandline
rustydomino
QUOTE (Sunhillow @ Apr 28 2007, 10:38) *
At least former versions of Windows Sound Recorder had a -ahem - not very good resampling algorithm.
Why don't you use LAME's built-in resampler? It is not bad...
Add --resample 32000 or whatever you like to the commandline


probably because of the crappy documentation? I quote lame --help:

--resample n output sampling frequency

pretty cryptic for someone who doesn't know what they're doing tongue.gif

Mike
2Bdecided
You want to be grateful there is some documentation!

I've seen open source projects with this level of documentation...

User: "What does this switch so?"
Developer: "Download the source code and look for yourself."

Cheers,
David.
collector
QUOTE
probably because of the crappy documentation? I quote lame --help:
--resample n output sampling frequency

Lame --longhelp: --resample <sfreq> sampling frequency of output file (kHz)

Not so cryptic dry.gif lame --resample 44100 inputfile.wav outputfile.mp3 will result in an outputfile of 44100 Hz
Other parameters you can choose for yourself, I hope
Sunhillow
/me thinks lame is not really made for people who don't hate setup wizards tongue.gif
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-2009 Invision Power Services, Inc.