Help - Search - Members - Calendar
Full Version: Compile LAME with MSVC and get reasonable speed?
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
kpfleming
I want to compile a custom version of LAME that uses the --pad-id3v2 argument to add 64kb of space to the tag instead of just 128 bytes (this will dramatically speed up my subsequent tagging operations).

The only Windows C compiler I can use without going through the ordeal of installing cygwin is the MSVC compiler included with Visual Studio .NET. I see that john33's compiles are using the Intel compiler, and I've been happy using his 3.96a3 compile, so I'd rather not lose a bunch of speed by switching to a less-optimal compiler.

Can anyone speak to how much performance difference there will be? Or alternatively, if I provide a patch can this sort of functionality be included in the main LAME sources?
john33
I'll provide a compile for you if you provide the patch. wink.gif You can, of course, test it first using the VC compile.
kpfleming
LAME pad size patch

Patch is against 3.95.1, but should apply to any newer 3.x version. It adds:

--pad-id3v2-by n

command-line option, allowing user to specify amount to pad by.
john33
Can you check the link? wink.gif
kpfleming
Duh, I made the file and forgot to upload it. It's there now.

Any chance this can be sent upstream, since you deal with the LAME maintainers all the time biggrin.gif
john33
QUOTE (kpfleming @ Feb 18 2004, 06:24 PM)
Duh, I made the file and forgot to upload it. It's there now.

Any chance this can be sent upstream, since you deal with the LAME maintainers all the time  biggrin.gif

I'll offer it up for inclusion.

What compile do you want? 3.95.1,.etc??
sony666
MS Visual Studio does fine with LAME, but I did not find the inner peace yet to figure out how to build the Assembler configurations dry.gif
kpfleming
I've been using 3.96a3 (even though it's an alpha) with good results, so I'd like to stick with that. I would have made the patch against that version but I didn't see tarballs of any alpha releases on SourceForge.

Thanks for doing the compile for me John, this new feature will save me a ton of time tagging 6000+ tracks after they've been re-encoded. Actually I think I a lot of people could use it, if they put large ID3V2 tags in their files (in my case I include cover art, album notes, etc from allmusic.com).
john33
OK, I should have this done later this evening. I'll post when it's available. wink.gif
john33
QUOTE (sony666 @ Feb 18 2004, 06:56 PM)
MS Visual Studio does fine with LAME, but I did not find the inner peace yet to figure out how to build the Assembler configurations dry.gif

You need a particular version of nasm and, then, the project files should build it just fine. If you don't know which version you need, I can post it for you to d/l. wink.gif
john33
QUOTE (kpfleming @ Feb 18 2004, 06:56 PM)
I've been using 3.96a3 (even though it's an alpha) with good results, so I'd like to stick with that. I would have made the patch against that version but I didn't see tarballs of any alpha releases on SourceForge.

Thanks for doing the compile for me John, this new feature will save me a ton of time tagging 6000+ tracks after they've been re-encoded. Actually I think I a lot of people could use it, if they put large ID3V2 tags in their files (in my case I include cover art, album notes, etc from allmusic.com).

Uploaded and available now at: http://homepage.ntlworld.com/jfe1205/LAME/. I called it lame3.96a3PAD.zip, but you'll see it on the list. smile.gif
kpfleming
And it works a treat... I can now load up a directory full of MP3 in Tag & Rename, click "Write Tags" to create functional ID3V2 tags from the filenames, and it takes no time at all. In addition, importing cover art and album notes is also instant.

Thanks again John, you've saved me a bunch of time! Hopefully the LAME developers will accept this change into the main source and I can upgrade to newer versions (or learn how to build them myself).
kpfleming
OK, well after further testing it doesn't quite work... specifiying a pad size larger than about 9K causes lame.exe to segfault.

I can debug this and produce a better patch, but I can't seem to find the 3.96a3 sources anywhere. Sourceforge only shows 3.95.1, so I assume that 3.96a3 must the HEAD branch of CVS. I'll give it a try.
john33
QUOTE (kpfleming @ Feb 20 2004, 03:16 PM)
I can debug this and produce a better patch, but I can't seem to find the 3.96a3 sources anywhere. Sourceforge only shows 3.95.1, so I assume that 3.96a3 must the HEAD branch of CVS. I'll give it a try.

Yes, it is. wink.gif
kpfleming
OK, patch updated (at same URL). I neglected to ensure that LAME's buffer was large enough. Now the --pad-id3v2-by option will tell you if you try to use a pad size larger than the available buffer space.

I can compile this myself now John, I've got MSVC and nasm installed. Can you let me know what compile options/switches you are using, if any?
john33
If you're using VC6, just load the lame_vc6.dsw project file and run it using the existing settings. Some will be unrecognised as they are for the Intel compiler, but it will still compile OK. Give me a while and I'll do and ICL4.5 compile. wink.gif
kpfleming
The project files seem to work OK in VC7 as well, although there are new optimization options available that I can take advantage of. Don't spend your time doing an ICL build, I can live with a VC7/NASM build, it can't be that much slower sad.gif
john33
Recompiled, uploaded and available at: http://homepage.ntlworld.com/jfe1205/LAME/. It's called lame3.96a3PAD.zip, as before. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.