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 convert wav to mpeg-1 using LAME? (Read 7668 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to convert wav to mpeg-1 using LAME?

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

how to convert wav to mpeg-1 using LAME?

Reply #1
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.

how to convert wav to mpeg-1 using LAME?

Reply #2
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!)

how to convert wav to mpeg-1 using LAME?

Reply #3
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.

how to convert wav to mpeg-1 using LAME?

Reply #4
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

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

Load the wave, select "Save as" from the File menu, and press the "Change" button.

how to convert wav to mpeg-1 using LAME?

Reply #5
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

how to convert wav to mpeg-1 using LAME?

Reply #6
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

Mike

how to convert wav to mpeg-1 using LAME?

Reply #7
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.

how to convert wav to mpeg-1 using LAME?

Reply #8
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      lame --resample 44100  inputfile.wav  outputfile.mp3 will result in an outputfile of 44100 Hz 
Other parameters you can choose for yourself, I hope

 

how to convert wav to mpeg-1 using LAME?

Reply #9
/me thinks lame is not really made for people who don't hate setup wizards