Difference between revisions of "MP2"

From TMB Wiki
Jump to: navigation, search
(updated conversion to MP3 with the new lame3.98b6+)
(V0 is the recommended setting)
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
==Why Use MP2?==
 
==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.  
+
MP3 should provide superior sound quality to [[MP2]] at the same bitrate so there is no reason to use it for CD ripping or encoding from analogue sources. However since [[MP2]] is the audio format used in DAB and DVB all over the world, the best way to record from these is to use some method to capture the [[MP2]] audio stream straight to disk (e.g. using PCI DVB card). An [[MP2]] created like this will provide a ''perfect'' copy of the original broadcast.
  
==MP2 Recording==
+
==Playback==
 
 
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===
 
===Software Playback===
Line 29: Line 18:
 
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.
 
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.
  
 +
===Tagging===
 +
 +
[[MP2]] files can be tagged like [[MP3]] files.
  
 
==Conversion to MP3==
 
==Conversion to MP3==
Line 34: Line 26:
 
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.
 
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:  
+
* you can simply use the [[LAME]] exe with the following commands using the command-line: lame.exe --mp2input -V 0 file.mp2 file.mp3
** ''lame.exe --mp2input -V1 -q0 file.mp2 file.mp3''  That is fully sufficient in many cases.
+
** the '--resample 44.1' switch could be added to the above to allow you to resample from a 48khz mp2 file to a 44.1khz mp3 file for example.
** ''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).
+
* 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:  
 
  
  
 
===What You Need===
 
===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''
+
* To convert [[MP2]] files to [[MP3]], you'll need to use a [[LAME]] compile that correctly accepts [[MP2]] input for decoding. [[LAME]] versions 3.97 and greater now do this 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''
* [http://wiki.themixingbowl.org/LAME#ALL2LAME ALL2LAME].
+
* [http://wiki.themixingbowl.org/LAME#ALL2LAME ALL2LAME]
 
+
* [[Foobar2000]] can also convert MP2 to many different formats
  
 
===How Do I Configure ALL2LAME and LAME?===
 
===How Do I Configure ALL2LAME and LAME?===
Line 53: Line 44:
 
[[Image:All2lame-dir.jpg]]
 
[[Image: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!
+
As long as ''lame.exe'' is in the same folder, that’s it! You don’t need to configure ALL2LAME any more than that. Easy!
  
  
Line 60: Line 51:
 
* Run ''all2lame.exe'' to start the program and do the following:
 
* 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.
 
** 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 the following line into the 'Switches' box: -V 0
*** ''-V1 --vbr-new''  That is fully sufficient in many cases (see image below).
+
*** You might like to add the following command before the above switch to resample a 48khz mp2 file to a 44.1khz mp3 file: --resample 44.1
*** ''-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.
  
Line 78: Line 68:
  
 
Both [[MP3]] and [[MP2]] files can be losslessly cut and trimmed using:
 
Both [[MP3]] and [[MP2]] files can be losslessly cut and trimmed using:
* [[MP3DirectCut]]
+
* [[MP3DirectCut]] ''recommended tool''
 
* [[MP3Splt]]
 
* [[MP3Splt]]
 
* [[Pcutmp3]]
 
* [[Pcutmp3]]

Latest revision as of 16:30, 9 April 2020

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?

MP3 should provide superior sound quality to MP2 at the same bitrate so there is no reason to use it for CD ripping or encoding from analogue sources. However since MP2 is the audio format used in DAB and DVB all over the world, the best way to record from these is to use some method to capture the MP2 audio stream straight to disk (e.g. using PCI DVB card). An MP2 created like this will provide a perfect copy of the original broadcast.

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.

Tagging

MP2 files can be tagged like MP3 files.

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 the command-line: lame.exe --mp2input -V 0 file.mp2 file.mp3
    • the '--resample 44.1' switch could be added to the above to allow you to resample from a 48khz mp2 file to a 44.1khz mp3 file for example.
  • 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 versions 3.97 and greater now do this 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
  • Foobar2000 can also convert MP2 to many different formats

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 any more 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 the following line into the 'Switches' box: -V 0
      • You might like to add the following command before the above switch to resample a 48khz mp2 file to a 44.1khz mp3 file: --resample 44.1
    • 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: