Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi all:

now, i am use Lame open source code to convert wave file into mp3 file, but, i meet a hard matter.

When sample bit of wave is 8, Lame can not convert it into mp3 succssfully, there are very big noise and no clear voice. Lame can convert 16 sample bit wave file.

Do you meet the same question? or my lame version is too low, my lame version is 1.91 likely.

Thanks!
BR,
Aaron
Posted
Updated 1-Apr-15 6:00am
v2
Comments
Jochen Arndt 1-Apr-15 12:48pm    
Version 1.91?
Or did you mean 3.91?
Even that is from 2001. So you should try a newer version.
However, you should not expect getting a good result with 8 bit samples.
The result will always be inferior to the PCM source.
Albert Holguin 6-May-15 19:10pm    
8bit PCM is pretty common... not the best but common nonetheless

MP3 is not meant for that. Use 16 bit sample rate. A 128kbit mp3 just consumes 16KBytes/second. Alternatively, if you are looking for a real lo-fi sound just try mp3 with 64kbit setting.
 
Share this answer
 
Look at the user doc for lame[^]. Do a search for bitwidth and you'll find this:

Quote:
Input options for raw PCM:
-r read the input file as a raw (headerless) PCM stream
-s n input sampling frequency in kHz (Default 44.1Khz)
--signed input is signed (default)
--unsigned input is unsigned
--bitwidth w input bit width is w (default 16)
-x swap bytes of input file
--little-endian input is little-endian (default)
--big-endian input is big-endian
-a downmix stereo file to mono file for mono encoding.
Needed with RAW input for the -mm mode to do the downmix.


Possible that bitwidth is defaulting to 16 causing the data to be interpreted incorrectly... try setting that to 8.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900