Difference between revisions of "MP2"

From TMB Wiki
Jump to: navigation, search
(updated conversion to MP3 with the new lame3.98b6+)
m
Line 35: Line 35:
  
 
* you can simply use the [[LAME]] exe with the following commands using one of the following the command-lines:  
 
* you can simply use the [[LAME]] exe with the following commands using one of the following the command-lines:  
** ''lame.exe --mp2input -V1 -q0 file.mp2 file.mp3''  That is fully sufficient in many cases.
+
** ''lame.exe --mp2input -V2 -q0 file.mp2 file.mp3''  That is fully sufficient in many cases.
 
** ''lame.exe --mp2input -V1 -q0 --resample 44.1 --lowpass 16  file.mp2 file.mp3''  This is what you want if you have an MP2 file from satellite broadcasts or from digital terrestial broadcasts. This happens quite often. Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file size small (typically below 180kbps for a 192kbps MP2 input file).
 
** ''lame.exe --mp2input -V1 -q0 --resample 44.1 --lowpass 16  file.mp2 file.mp3''  This is what you want if you have an MP2 file from satellite broadcasts or from digital terrestial broadcasts. This happens quite often. Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file size small (typically below 180kbps for a 192kbps MP2 input file).
 
* however, if you do not like the command-line and if you prefer to use a GUI then use the following guide:  
 
* however, if you do not like the command-line and if you prefer to use a GUI then use the following guide:  
Line 61: Line 61:
 
** Drag-drop the [[MP2]] file you want to convert into the white 'Files' area.
 
** Drag-drop the [[MP2]] file you want to convert into the white 'Files' area.
 
** Copy & paste one of the following ''expressions'' into the 'Switches' box:  
 
** Copy & paste one of the following ''expressions'' into the 'Switches' box:  
*** ''-V1 --vbr-new''  That is fully sufficient in many cases (see image below).
+
*** ''-V2 --vbr-new''  That is fully sufficient in many cases (see image below).
 
*** ''-V1 -q0 --lowpass 16 --resample 44.1'' This is what you want if you are dealing with satellite broadcasts or terrestial digital broadcasts (DAB, Freeview, DVB-T). Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file small (typically below 180kbps for a 192kbps MP2 input file).
 
*** ''-V1 -q0 --lowpass 16 --resample 44.1'' This is what you want if you are dealing with satellite broadcasts or terrestial digital broadcasts (DAB, Freeview, DVB-T). Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file small (typically below 180kbps for a 192kbps MP2 input file).
 
** Tick the '+' icon at the end of the 'Switches' box: this will save the command so that you won’t need to type it in again.
 
** Tick the '+' icon at the end of the 'Switches' box: this will save the command so that you won’t need to type it in again.

Revision as of 22:09, 20 January 2008

MP2 (sometimes also called Musicam) is short for MPEG-1 Audio Layer II. MP2 files usually have an extension of .mp2 but sometimes .mpa is used instead. MP2 has largely been superseded by MP3 (MPEG-1 Audio Layer III) for file sharing and CD ripping, but it remains a dominant standard for audio broadcasting in Europe as part of the DAB digital radio and DVB digital television standards.


Why Use MP2?

MP2 is the low-complexity older brother to MP3 and is usually not as efficient as MP3 in keeping sound info in any music file so that for lower bitrates MP3 should be superior to MP2. However, it has its advantages. For example, bitrates at 224kbps and higher should sound better with MP2 because of its low complexity in comparison to MP3. It is also the more robust format in noisy environments and that is the reason why MP2 is used as the audio format in DAB and DVB (all digital broadcasts by satellite, digital cable, etc.) all over the world.

MP2 Recording

The best way to record from satellite or is to use some method to capture the MP2 audio stream straight to disk. An MP2 created like this will provide a perfect copy of the original broadcast. Do this if you want to save the MP2 bitstream and if you have the possibility. Such a straight-to-disk recording is possible in a number of cases. For example, most PCI DVB cards for PC's will allow to save the original MP2 bitstream to disk without modifications. Hardware players / tuners sometimes come with SD-card slots allowing to save the bitstream directly to this card. Some tuners even come with an integrated hard disk to save bitstreams (mostly for recording broadcasted MPEG-II movies but they can save audio .mpa or .mp2 files as well). Cutting of these files can easily be done without decoding (keeping the best possible quality) with MP3DirectCut as MP2 is the 2nd format that can be used with MP3DirectCut to cut MPEG audio files.

The 2nd best way to record digital broadcasts in MP2 format is to use a receiver / decoder / set-top box with a cable connection between the receiver output plug and the input plug of the soundcard of your PC. The preferred and noise-free connection in these cases would be via optical SPDIF connectors on both sides of the line. A very good and noise-free sound-card should be used. Reset all equalizer settings on both sides of the line before recording. Then use a Wave- and MP3-recorder such as Audacity, record the raw stream directly from the audio input and save it to disk as a .wav file. You can now cut the resulting .wav file with Audacity; you can also export the modified stream directly into the preferred MP3-format.

Tagging

MP2 files can be tagged like MP3 files with the same tagging programs.


MP2 Playback

Software Playback

The MPEG-1 specifications say that a MP3 decoder must be able to decode Layer I & II too, so any MP3 player should play MP2 files. MP2 support is probably even wider then MP3 support since it is the audio format used in .mpg files too.

Hardware Playback

In theory all hardware MP3 players should be able to play MP2, but in practice this does not always seem to be the case. Some have no problems playing MP2 files (even if this isn't mentioned anywhere in the players specifications), some will only play them if you give it an .mp3 extension, and others won't play them at all.

If your hardware player only plays MP2 files with an .mp3 extension it might be worth asking the manufacturer if this could be fixed with a firmware update. Try to remember to rename it back to .mp2 before sharing it again, as there are some technical differences between MP2 and MP3 that mean things like Replaygain only work with real MP3 files. Using a double extension like (e.g. radio_mix.mp2.mp3) might help you remember.


Conversion to MP3

Remember that converting from MP2 to MP3 (or any other lossy format) will always result in a (small) loss of quality, so it's best to only convert when you have a really good reason to do so.

  • you can simply use the LAME exe with the following commands using one of the following the command-lines:
    • lame.exe --mp2input -V2 -q0 file.mp2 file.mp3 That is fully sufficient in many cases.
    • lame.exe --mp2input -V1 -q0 --resample 44.1 --lowpass 16 file.mp2 file.mp3 This is what you want if you have an MP2 file from satellite broadcasts or from digital terrestial broadcasts. This happens quite often. Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file size small (typically below 180kbps for a 192kbps MP2 input file).
  • however, if you do not like the command-line and if you prefer to use a GUI then use the following guide:


What You Need

  • To convert MP2 files to MP3, you'll need to use a LAME compile that correctly accepts MP2 input for decoding. LAME version 3.98 (beta b6 and newer) now do as standard, so no special lame.exe fixed for decoding is required. See the LAME page for instructions on how to get the lame.exe
  • ALL2LAME.


How Do I Configure ALL2LAME and LAME?

  • First extract the All2Lame.zip file: it actually doesn’t have an installer, you just run the file.
  • Next, move your lame.exe into the ALL2LAME folder. Your folder should now look something like:

All2lame-dir.jpg

As long as lame.exe is in the same folder, that’s it! You don’t need to configure ALL2LAME anymore than that. Easy!


How Does It Work?

  • Run all2lame.exe to start the program and do the following:
    • Drag-drop the MP2 file you want to convert into the white 'Files' area.
    • Copy & paste one of the following expressions into the 'Switches' box:
      • -V2 --vbr-new That is fully sufficient in many cases (see image below).
      • -V1 -q0 --lowpass 16 --resample 44.1 This is what you want if you are dealing with satellite broadcasts or terrestial digital broadcasts (DAB, Freeview, DVB-T). Those broadcasts have by default a "built-in" lowpass at 16kHz and a sampling frequency of 48khz. Resampling to 44.1kHz results in standard 44.1kHz MP3 files (some hardware players have problems with 48kHz files) while the additional lowpass at 16kHz removes noise >16kHz and keeps the file small (typically below 180kbps for a 192kbps MP2 input file).
    • Tick the '+' icon at the end of the 'Switches' box: this will save the command so that you won’t need to type it in again.

It should now look like this:

All2lame-gui.jpg

  • It's now ready. Click the 'Encode' button and a window will pop up that looks like this:

All2lame-cmd.jpg

  • Congratulations, that means it's working! An MP3 will be created in the same folder as the MP2 file. You can whack that on your ipod and jump around like they do in the adverts.

Editing

Both MP3 and MP2 files can be losslessly cut and trimmed using: