LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-12-2003, 01:28 AM   #1
aiims1777
Member
 
Registered: Oct 2003
Location: India
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39

Rep: Reputation: 15
Cool 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.
 
Old 11-12-2003, 02:00 AM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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.

Last edited by megaspaz; 11-12-2003 at 02:01 AM.
 
Old 11-12-2003, 02:05 AM   #3
aiims1777
Member
 
Registered: Oct 2003
Location: India
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39

Original Poster
Rep: Reputation: 15
I am trying to rip and encode from an audio cd directly.
 
Old 11-12-2003, 02:09 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
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?
 
Old 11-12-2003, 02:27 AM   #5
aiims1777
Member
 
Registered: Oct 2003
Location: India
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39

Original Poster
Rep: Reputation: 15
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)
 
Old 11-12-2003, 02:36 AM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
oh. my misunderstanding. here's what i've got on my grip lame encoding options.

-q 0 -b %b %w %m

don't use the --alt-preset option at all. actually it wasn't there in the as a default option either that i can remember.

also, here's the cdparanoia options i'm using. these were just the defaults.

-d %c %t:[.%s]-%t:[.%e] %w

Last edited by megaspaz; 11-12-2003 at 02:38 AM.
 
Old 11-12-2003, 09:29 AM   #7
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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.

Håkan
 
Old 11-13-2003, 01:19 AM   #8
aiims1777
Member
 
Registered: Oct 2003
Location: India
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39

Original Poster
Rep: Reputation: 15
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.
 
Old 11-13-2003, 05:08 AM   #9
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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

Håkan
 
Old 11-15-2003, 01:21 AM   #10
aiims1777
Member
 
Registered: Oct 2003
Location: India
Distribution: Kubuntu Dapper Drake, Edgy Eft;Red Hat Linux 9 Personal Edition
Posts: 39

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kaudiocreator/lame encoder problem iggep Mandriva 4 10-30-2005 04:04 PM
Installing LAME mp3 encoder Valhalla Linux - Software 0 12-09-2004 11:14 AM
DVD Encoder Brother Michael Linux - Newbie 1 11-15-2003 01:16 AM
Installing lame encoder? Seraph Linux - Newbie 1 07-29-2003 05:56 PM
Mpeg4 encoder Nanu Linux - Software 4 04-27-2003 04:44 AM


All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration