LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 11-30-2006, 05:27 PM   #1
_Lukes
LQ Newbie
 
Registered: Jun 2006
Location: Bedzin, Poland
Distribution: Debian
Posts: 16

Rep: Reputation: 0
wav to mp3 - win vs linux


Hi,

Today I had made a test: wave to mp3 conversion. First I've ripped 12 min 20 sec track from cd to wave file and then encoded it under linux using lame and under windows using xing.
And I,m a bit confused, because under linux it took 1 min 50 sec to do this, and under windows only 32 sec. The bitrate was 256 kbps. I have Athlon 1 Ghz with 640 mb ram. Why there's such a big difference?? Is there any possibility to improve encoding under linux ??

Last edited by _Lukes; 11-30-2006 at 05:41 PM.
 
Old 11-30-2006, 05:31 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
Is that time just for the encoding, or for the ripping and encoding?
 
Old 11-30-2006, 05:37 PM   #3
_Lukes
LQ Newbie
 
Registered: Jun 2006
Location: Bedzin, Poland
Distribution: Debian
Posts: 16

Original Poster
Rep: Reputation: 0
Only for encoding
 
Old 11-30-2006, 05:50 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
What options did you use with lame?

There is a quality option. The default level is 5 (on a scale of 0 = best quality/slowest, 9 = worst quality/fastest).

I did some tests encoding a 4.2 MiB wav file with different quality settings. With the default quality level this took about 18 seconds. With the quality set to 9 (worst quality, fastest encoding), the file encoded in about 5 seconds. Here's how to pass the option:
Code:
lame file.wav       # encode with default quality
lame -q 9 file.wav  # encode fastest
To my ears with pretty naff headphones, I really can't tell a difference, but I'm no audiophile.
 
Old 11-30-2006, 05:55 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
Of course, it could also be that lame is badly optimised, or written in a way which doesn't lend itself to performance. Also, lame is typically compiled with gcc, which isn't known for producing the most optimised programs.

It would be instructive to do some profiling of lame, and try building it with the intel compiler (which is said to produce much more optimised programs).

Having apparently criticised gcc, I'd like to make it clear that I think it's a superb project, and I feel all dirty if I use another compiler. I think the benefits of gcc's cross-platform features, and general flexibility more than outweigh the supposed lack of performance. Not to mention the most important part - that it's truly Free.
 
Old 11-30-2006, 06:15 PM   #6
_Lukes
LQ Newbie
 
Registered: Jun 2006
Location: Bedzin, Poland
Distribution: Debian
Posts: 16

Original Poster
Rep: Reputation: 0
Quality setting seems to be a good solution I've encoded 120mb file with in 29 sec now, and I hear no difference either.
Code:
lame --preset 320 -q9
Tomorrow I will try to test everything with self-compiled lame
 
Old 11-30-2006, 06:22 PM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
Quote:
Originally Posted by _Lukes
Tomorrow I will try to test everything with self-compiled lame
I'm doing it now... Didn't notice any difference, but I'm probably not encoding enough data to tell really.

There's no --enable-gprof, so I've been patching up the Makefiles to see if I can't speed it up a little. I probably can't.
 
Old 11-30-2006, 06:34 PM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
There are some crazy function names in lame! It spends most of it's time (about 20%) in a function called L3psycho_anal_ns. Far out. It's beyond me anyhow.
 
Old 12-01-2006, 03:48 AM   #9
_Lukes
LQ Newbie
 
Registered: Jun 2006
Location: Bedzin, Poland
Distribution: Debian
Posts: 16

Original Poster
Rep: Reputation: 0
But is there any possibility to disable this function ??
 
Old 12-01-2006, 05:54 AM   #10
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu (x86), Debian (PPC)
Posts: 3,528

Rep: Reputation: 60
I don't think so - it looks like it's doing some of the heavy lifting. I think without spending some months really researching how lame is working (and the underlying ideas of how mp3 is encoded), trying to optimise the code is not going to be easy. Using the intel compiler might squeeze a few % more performance out of the old chips though, although I don't know how easy it is to drop it in as an alternative to gcc.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ripping cds to mp3 (or wav to mp3) darkleaf Linux - Software 7 04-30-2005 07:23 AM
Need software rip CD or convert .WAV to .MP3 in Linux tho_x_tran Linux - Software 5 09-26-2004 08:57 PM
From .wav to .mp3 how-to Harp00 Linux - Newbie 5 10-23-2003 08:33 PM
mp3 to wav Mojojo Linux - Software 4 06-17-2003 04:04 PM
.wav to .mp3 El Kid Linux - General 8 11-21-2002 10:48 PM


All times are GMT -5. The time now is 09:42 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration