Shane N
Jul 4 2007, 11:31
I'm working on a web program that utilizes lame and sox for converting an uLaw wav to an MP3 for a flash player to use. I started developing this on a linux platform, and for even large wav files, it wouldn't take very long to encode them. However, once I switched over to windows, it literally tripled the encoding time.
Is there a way to speed this up significantly?
C:\xampp\sox.exe "C:\xampp\htdocs\tmp.wav" -t wav -s -w - | C:\xampp\lame.exe - --resample 44.1 -
I wouldn't be surprised if Windows was a bit slower because of all the bloat, but I suspect there's more than the operating system involved if it's slowed by a factor of 3. Are you using the same versions of the software? Are your Linux binaries compiler-optimized and your Windows binaries aren't?
rudefyet
Jul 5 2007, 11:46
I'm surprised it's not the other way around, from personal experience linux is always slower, mainly due to the fact ICL is a much more optimized compiler then gcc. Perhaps gcc has caught up though...
Make sure whatever builds your using are compiled with ASM optimizations, It'll display what ASM optimizations it's using if it's been compiled right (SSE SSE2 MMX 3dnow)
Mitch 1 2
Jul 6 2007, 03:39
Shane,
Get the latest ffmpeg build from
http://ffdshow.faireal.net/mirror/, and extract it (in your case, probably to C:\xampp\). Get the latest LAME build (at the moment it's 3.98b4) from
http://www.rarewares.org/, and extract that too.
Then you can use the following:
C:\xampp\ffmpeg.exe -vn -i "C:\xampp\htdocs\tmp.wav" -ar 44100 -acodec pcm_s16le -f wav - | C:\xampp\lame.exe - -
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.