MP3optimized

From TMB Wiki
Revision as of 22:43, 18 March 2008 by Ojay (talk | contribs)
Jump to: navigation, search

The following are some interesting but also special examples for MP3 optimization solutions. They are all working with a DOS window or the command line interpreter of WinXP.

Using MP3Packer to modify the behavior of MP3 files

Large MP3 files, such as DJ mix sets obtained over the internet via P2P or by internet streaming are usually not error-free: they often have incomplete frames, sync errors, or come as vbr-encoded files while the cue-sheet creation or the CD burning program requires cbr-encoded MP3 files. The solution to all this is MP3packer. It always corrects all MP3 errors it can find. But it can much more:

Convert vbr files to cbr files

Very few hardware MP3 players do not accept vbr MP3 and require cbr encoded files. It is also of advantage for some CD burning solutions to have cbr MP3 files available. And finally - some people are trying to prepare cue-sheets for DJ mixes / sets and they typically find cbr files easier to handle. They all can use mp3packer for this.

  1. mp3packer -i <input>.mp3
  2. mp3packer -b <bitrate> <input>.mp3

The first mp3packer pass prints some info about the vbr MP3 file to the screen. Of particular interest is the last line. It states: "Smallest bitrate for CBR is <bitrate>". The so-found value can be used for the 2nd mp3packer pass. The final result is a cbr encoded MP3 file with the lowest possible cbr bitrate.

Convert cbr files to vbr files

  1. mp3packer <input>.mp3

This can significantly reduce the file size of high bitrate MP3 files losslessly (by up to 10% for cbr 320kbps stereo MP3).

Strip off any unwanted non-stereo info from MP3-files

Meant here is everything that is not pure stereo music, for example id3 or ape tags, non-stereo content such as surround sound overhead etc. It helps to restore the original stereo file without any hassles, errors, etc.

  1. mp3packer -i <input>.mp3
  2. mp3packer -t -s <input>.mp3

OR

  1. mp3packer -i <input>.mp3
  2. mp3packer -b <bitrate> -t -s <input>.mp3

The choice of the above options depends on the value for "Smallest bitrate for CBR is <bitrate>" from the 1st pass of mp3packer. If it is one of 128, 160, 192, 224, or 256, then the second option is probably the right one for the 2nd pass.

Using MP3packer & MP3SX to upgrade MP3 to MP3 Surround

Apart from MP3packer as a program to repair and to modifiy the structure of MP3-files, at least another tool exists that modifies MP3 files (without decoding) to provide some "added value". The tool in question is MP3SX, a tool that extracts the ambience from already existing stereo MP3-files and dispatches the full stereo content to 5.1 speakers.

Both tools together allow extensive manipulation of stereo MP3 files (without decoding them)to optimize and to upgrade existing stereo MP3-files to MP3Surround files that can be played by any software and hardware player. Check the individual pages of the two tools for more details.

For the 5.1 content of the upgraded MP3-files you will need additional players. Check the MP3Surround page for links.

Normal file operations

Upgrade cbr 192kbps stereo MP3 (works only for error-free MP3 files)

  1. mp3SX -if <input>.mp3 -of <output>.mp3

The most simple conversion to MP3 Surround. The resulting file contains 32kbps surround info, is by 17% larger and reports itself as cbr 224kbps stereo MP3.


Upgrade vbr stereo MP3 (works only for error-free MP3 files)

  1. mp3SX -if <input>.mp3 -of <output>.mp3
  2. mp3val -t -nb -f <output.mp3>

Simple like that. The resulting file contains 15kbps surround info. The special thing here is that all versions of mp3SX do not properly write the size information to VBR headers so an additional tool, [mp3val], is necessary to fix the MP3 header!


Upgrade cbr 192kbps stereo MP3 (for files with uncritical MP3 errors)

  1. mp3packer -b 192 -R <input>.mp3
  2. mp3SX -if <input>-vbr.mp3 -of <output>.mp3
  3. mp3val -t -nb -f <output.mp3>

The cbr structure is kept with the -b 192 switch. mp3packer now removes all MP3 errors but keeps it as a 192kbps cbr file. The finally resulting file after the mp3SX pass contains 32kbps surround info, is by 17% larger and reports itself as cbr 224kbps stereo MP3.

'Undocumented, special file operations

Upgrade cbr 256kbps stereo MP3

  1. mp3packer -b 160 <input>.mp3 
  2. mp3SX -if <input>-vbr.mp3 -of <output>.mp3
  3. mp3val -t -nb -f <output.mp3>

Tricky. mp3SX does not accept CBR MP3 files >192kbps so you need to convert it to VBR MP3 first. Be warned: using the mp3SX converter with VBR files is an "undocumented" feature and in combination with mp3packer this might result in lots of stream errors effectively destroying your MP3 file. Check the mp3val screen output for the following line(s): "MPEG stream error - stream successfully resynchronized". If something like this becomes visible - throw the converted file <output.mp3> away - it is broken without any possibility for recovery. If you do not see that error message you are done and everything is fine...

Links