14 March, 2005, 08:33:03 PM

What it does:Attempts to save space by storing frame data in the smallest possible frame. Usually MP3s are already stored in the most efficient way possible. However, for high-bitrate CBR files (like --preset insane) there can be a lot of wasted space

psyllium has made a great Windows GUI for this program. The GUI thread is here. Many people will find it easier to use than the CLI, and it has a few more features too (recursive directory support, 2-pass CBR).

Features:* Can make --preset insane files up to 10% smaller LOSSLESSLY (depending on the LAME version used)* Squeezes out all the padding it can from any MP3 (Will not produce a larger file, unless you use the -b switch or something goes wrong)* Writes valid LAME/XING header for proper VBR seeking* Many people also use this backwards, to losslessly turn VBR into larger CBR files to humor players which can't handle VBR* Includes a brute-force compression optimization option as of 1.10 to further compress files* Now supports Unicode file names and paths* Support for encoding an entire directory of files* Works on Windows, Linux, 64-bit Linux, Linux through WINE, and should work perfectly on any other platform with an OCaml port* GPL, so anybody can tweak it as long as it stays GPL

A few caveats:* The program will always output an MP3 that doesn't use CRCs, even if the input file uses CRC. This is primarily laziness on my part, but nobody really needs them, and it saves 600 bits per second... (it's a feature, not a bug!)* The 32-bit version will not process files larger than 1GB. The 64-bit version has a much higher limitation (4EB) which is unlikely to be encountered.* There seems to be an incompatibility with the multi-threaded repacking code and 32-bit Windows XP. If you run across an error, try adding "--workers 0" to the command line.

Sounds pretty cool. I wouldn't have thought there'd be that much to squeeze out (I don't know much about mp3's), but if it works as well as you say it does (I'm'a have to see for my self ) and it doesn't damage playability I'm betting this will become quite the popular little app.

Sounds pretty cool. I wouldn't have thought there'd be that much to squeeze out (I don't know much about mp3's), but if it works as well as you say it does (I'm'a have to see for my self ) and it doesn't damage playability I'm betting this will become quite the popular little app.

Thank you for all your hard work .[a href="index.php?act=findpost&pid=282493"][{POST_SNAPBACK}][/a]

Well, most of the time there isn't anything to squeeze out. But on some files, most notably high-bitrate CBR files, there can be quite a bit of dead space.

@solaris:Do you know which encoder/settings were used for your test files?

So, basically this program turns a CBR file into a VBR file, correct? Pointing newbies who don't understand/trust VBR might be interested in reading this![a href="index.php?act=findpost&pid=282495"][{POST_SNAPBACK}][/a]

Yes, although it would be slightly more accurate to say that it turns any MP3 into a VBR file.

... actually, there's still a possibility that the resultant file is CBR, but that's extremely unlikely. It would indicate that the input file didn't use the bit reservoir, which is quite bad for an encoder to do.

Hmm... I guess the most accurate way to characterize the program is:* At every frame, it picks the smallest frame size which can hold all the dataor perhaps simply:* In the resultant file, dependancy on the bit reservoir is minimized

Although both of these definitions can be invalidated if you use some of the command line options. It looks like my little Perl script is pretty hard to define

Someone who knows both perl and something like C can translate, but bla why bother. Here is the perl to get for windows. Install it, and then:Run "perl mp3packer.pl in.mp3 out.mp3" to repack OR run "perl mp3packer.pl -h" to see other options

Someone who knows both perl and something like C can translate, but bla why bother. Here is the perl to get for windows. Install it, and then:Run "perl mp3packer.pl in.mp3 out.mp3" to repack OR run "perl mp3packer.pl -h" to see other options[a href="index.php?act=findpost&pid=282556"][{POST_SNAPBACK}][/a]

Well, you could use perlcc. Won't be as easy in this case because of the module that needs to be included. So you'd need to build the shared library first.

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl 1.mp3 2.mp3Constant name 'HASH(0x1832adc)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl -hConstant name 'HASH(0x1832ae0)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>

Wtf.I'm using ActivePerl as recommended by Klyith, what am I doing wrong?

I used winamp diskwrite plugin.Ran crc32 and md5 check on the files and they did not match,also the size of the 2 decoded wavs where not identical either.

Is the wav from mp3packer shorter than the original? If so, it might be related to the last frame of the mp3 being truncated because of the removal of padding.(just speculating, haven't tested mp3packer for myself, yet)

I used winamp diskwrite plugin.Ran crc32 and md5 check on the files and they did not match,also the size of the 2 decoded wavs where not identical either.

Is the wav from mp3packer shorter than the original? If so, it might be related to the last frame of the mp3 being truncated because of the removal of padding.(just speculating, haven't tested mp3packer for myself, yet)Omion, any idea?

Quote

and id3v2 tags are removed from the file.

Which saves another few bytes! Great feature for a packer, isn't it? [a href="index.php?act=findpost&pid=283218"][{POST_SNAPBACK}][/a]

The file should have the exact same number of frames, with the same data in them, and the same gapless settings. If they're not, either the program's wrong or the decoder's not producing identical output. This may be the case if the decoder is using dithering, which will add random (not reproducible) noise.

@ sven_Bent:If you have Foobar, run the "bit-compare tracks" function on the two files. If you don't have Foobar, then could you run the SAME mp3 through the Winamp diskwriter plugin twice, and see if they match up. (If they don't, then your output is dithering)

About the ID3V2 tags, the repacker doesn't save anything before the first valid MP3 frame. It only saves the non-MP3 data after the end. This means that some versions of the ID3v2 tag will not be stored. (I think 2.4 is stored at the end... ID3 tags are a mess... )

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl 1.mp3 2.mp3Constant name 'HASH(0x1832adc)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl -hConstant name 'HASH(0x1832ae0)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>

Wtf.I'm using ActivePerl as recommended by Klyith, what am I doing wrong?[a href="index.php?act=findpost&pid=283209"][{POST_SNAPBACK}][/a]

What version of Perl are you using? Run "perl -v" and it should say something like "This is perl, v5.8.5 built for MSWin32-x86-multi-thread"

Line 16 is where the first constant is defined.Try saving and running the following:

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl 1.mp3 2.mp3Constant name 'HASH(0x1832adc)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>perl mp3packer.pl -hConstant name 'HASH(0x1832ae0)' has invalid characters at mp3.pm line 16BEGIN failed--compilation aborted at mp3.pm line 19.Compilation failed in require at mp3packer.pl line 25.

C:\Files\progs\Lame stuff\mp3packer>

Wtf.I'm using ActivePerl as recommended by Klyith, what am I doing wrong?[a href="index.php?act=findpost&pid=283209"][{POST_SNAPBACK}][/a]

I think I know the problem. Some versions of Perl don't allow multiple constants to be defined at the same time. It should be fairly easy to fix... I'll do it as soon as I can. [Edit: Should be fixed now. Download version 0.02 and try it out.]