Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39
Rep:
Help with lame encoder
I am having problems encoding mp3 with lame. I downloaded and installed lame. It is in my /usr/bin directory.I use grip for ripping (cdparanoia) and encoding.I am able to encode ogg vorbis using oggenc and the songs play with xmms. When I try using lame as the encoder,an mp3 file is created but is not playable on any mp3 player(even in Windows!)
I have narrowed down my problem to the lame Command line executable setting. I tried -h -b %w %m
--rt3mix %w %m
--alt-preset standard %m %w
None works. When I try playing the mp3 file created like this on xmms,the player keeps showing 128 kbps or 64 kbps alternately and either no sound comes or an unintelligible noise plays.
I shall be grateful if someone could help me with this.
Thanks.
what file are trying to convert using lame? if i remember correctly, the source file should be a *.wav file. and if you're getting fluctuating kbps, then you're using variable bitrate. a simple lame example would be:
lame -q 0 -b 128 filename.wav filename.mp3
q 0 is highest quality but slowest encoding.
b 128 is 128 kbps bitrate.
that %w, etc... stuff i think is for grip and not lame. but i could be wrong. man lame should tell you all the options available.
are you trying to use lame to do the ripping of the cd? that won't work. you need to use something like cdparanoia to rip the cd to a *.wav file and then use lame on that *.wav file. but anyway, can you post the command(s) you're using to rip and encode?
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39
Original Poster
Rep:
I am using cdparanoia to rip the files from the audio cd and then at the same time (using the option Rip and Encode in grip) lame to encode the files.I am doing all this from the grip gui and not using CLI commands.
The commands for the encoder in the grip configure tab are
Encoder lame
Encoder executable /usr/bin/lame
Encoder command line --alt-preset standard %w %m
It is this last line that I haven't got right ( I think)
I disagree. Using "--alt-preset standard" allows for creating very high quality variable bitrate mp3 files while at the same time not using too much storage space. Just make sure you are NOT using v3.93 - use v3.93.1 instead since the presets are broken in the 3.93 release.
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39
Original Poster
Rep:
I think there is some problem with the bitrate.I do get encoded mp3 files using lame but the file produces just noise and the display in xmms keeps fluctuating between 128 kbps 64kbps and so on at 44Hz 36Hz and so on.
Can you tell me how to fix this? I have tried using -b n -B n abr n and also -v -V for vbr but it does not work.
First, make sure you're using a good version of lame.
Second, --alt-preset standard will create variable bitrate mp3's. This means the bitrate will fluctuate depending on exactly how high bitrate is needed for a little segment of a song to sound "very close to CD quality". This means that A) you will see the bitrate flutter about in XMMS and Winamp, and B) that you will never use a higher bitrate than needed, or not high enough bitrate. It's very neat, but some find it confusing at first.
XMMS and Winamp (and Windows Media Player, and CoolPlayer...and...and...and...) all handle variable bitrate mp3's, so your problem is most likely something else. I still think you're using a bad version of lame. I usually build it from source.
Third, in Grip, my encoding options are as follows:
Encoder executable: /usr/local/bin/lame (since I built it myself, otherwise it should be /usr/bin/lame)
Encoder command-line: --alt-preset standard %w %m
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39
Original Poster
Rep:
Dear hw-tph,
I think you are right about my version of lame being bad.I finally got sick of trying to make it encode and downloaded and installed the rpms for NotLame and Bladeenc. And hey presto, I immediately encoded mp3 files using these encoders and now the mp3 files I made play beautifully on xmms and freeamp.
Thanks for your advice and thanks also to megaspaz for all the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.