Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Lame settings to convert mp2 to mp3? (Read 6000 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Lame settings to convert mp2 to mp3?

I want to convert some mp2 files to mp3. I know that from lossy to lossy is not ideal, but I found no other solution.

Source is a DVD (David Gilmour Albert Hall concert), which I want to listen to on my iPod.
I used [Removed per TOS #9] to extract the audio, and which gave me a bunch of VOB files (never understood, nor found the answer on the web, why I got these type of files, and not .ac3 or .mp2 files, although I only extract the audio stream).
I tried renaming the files to .mp2, but this gave errors for about 15 out of 24 files (WMP played them ok, but with the "orange exclamation mark" warning; Foobar played the songs with lots of hiss & distortion in some sections, and ok in the rest of the song).
So I used PVAStrumento to demux the .vob files, and I got very nicely the mp2's, that play without any errors in WMP and Foobar.

The characteristics of the mp2's are:
   MPEG1, Layer 2
   stereo, sampled at 48.0 kHz.
   Bitrate 224 kbps
   Each frame contains 24.0 ms audio (672 bytes)


So now I want these converted to mp3, and my question is: what are the best lame settings for this conversion.

I know that generally VBR is recommended, but in this case I have some doubts (just intuition, I'm no expert): since the source is already a lossy format, does this not prevent the VBR to function properly?

I tried two settings:
--preset insane (filesize was 40% bigger than the source mp2), just to do the, euh, insane ...
-b 224 -h , to keep the bitrate the same, which seems intuitively the best option (and filesize was naturally exactly the same as the mp2).

Any advice on what to use? Or any other/better options.


Another question is about the stereo differences between mp2 and mp3. I have no clue about the difference. Do I have to use any special switch or setting during the conversion?

Lame settings to convert mp2 to mp3?

Reply #1
I know that generally VBR is recommended, but in this case I have some doubts (just intuition, I'm no expert): since the source is already a lossy format, does this not prevent the VBR to function properly?

It doesn't matter whether the source is a lossless or lossy one, hence the recommendation for VBR is still valid.
Quote
Any advice on what to use? Or any other/better options.

The LAME encoder's presets have been highly optimized during the past years, usually causing special switches in the command line either to have no noticeable or rather a negative effect. Therefore my common recommended setting would be the -V 5 --vbr-new preset (though --vbr-new isn't needed in the 3.98 alpha branch, because it uses the new VBR algorithm as default), but due to the sources already being lossy ones in your case -V 2 --vbr-new should be the better option. Carefully listen to the resulting files after encoding, maybe even ABX them vs. the .mp2 source material. If you were able to distinguish them from each other, an even more bitrate-intensive preset would be needed to receive audibly identical results.
Quote
Another question is about the stereo differences between mp2 and  mp3. I have no clue about the difference. Do I have to use any special  switch or setting during the conversion?

Nope. The best possible setting for LAME MP3 is joint stereo, which is automtically used by the presets.

Lame settings to convert mp2 to mp3?

Reply #2
I want to convert some mp2 files to mp3. I know that from lossy to lossy is not ideal, but I found no other solution.

The characteristics of the mp2's are:
   MPEG1, Layer 2
   stereo, sampled at 48.0 kHz.
   Bitrate 224 kbps
   Each frame contains 24.0 ms audio (672 bytes)

So now I want these converted to mp3, and my question is: what are the best lame settings for this conversion.

I know that generally VBR is recommended, but in this case I have some doubts (just intuition, I'm no expert): since the source is already a lossy format, does this not prevent the VBR to function properly?


If you directly convert you will get 48kHz MP3s. That doesn't always work (for example my own MP3-Player throws lots of skips at 48kHz while 44.1kHz is okay). So I would suggest to resample to 44.1kHz. Next, VBR definitely works and it will also compress your files more efficiently than CBR. I recommend using -V0 --vbr-new to keep as much info from the MP2 as possible. Usually, if used with CD-Audio WAV files you will get a mean bitrate at around 224-256kbps. In your case, because you are already using a lossy format (MP2) the algorithms for -V0 will find less compressible data so you can expect in your case an MP3 bitrate between 192-224kbps (good!).

That should do it I would guess: everything works at 44.1kHz, you get almost the original MP2 quality while the MP3 file is as small as possible.

The lame parameters (lame 3.97) for this are as follows:

"lame --mp2input -s 48 --resample 44.1 -V0 --vbr-new -h -Y -m j <inputfile.mp2> <outputfile.mp3>"

The -h parameter tries to fit the psychoacoustic model as much as possible while the -Y parameter essentially throws away noise in the highest frequency band sfb21 as your source was actually CBR (that makes the file smaller)

Lame settings to convert mp2 to mp3?

Reply #3
I've found the most hardware MP3 players will play MP2 directly, but sometimes you have to rename the file extension (e.g. .MP3). I would usually then name the files filename_MP2.mp3. This doesn't solve any problems with 48 kHz playback, in which case you'll need to transcode, so Lame is probably the best route.
Dynamic – the artist formerly known as DickD

Lame settings to convert mp2 to mp3?

Reply #4
For what its worth, foobar2000 plays mp2 files named with an mp3 extension. Unfortunately, in this scenario, tools like mp3shellext will detect them as mp3 files with an incorrect bitrate, and as far as i know directshow decoding will fail even with something like ffdshow because the file is still identified as mp3.  Re-naming the file might not be the best way to get it to play.

Lame settings to convert mp2 to mp3?

Reply #5
Can you confirm that VBR (-V 2 --vbr-new) will be better then CBR (-b 192) for 192 kbps MP2 input?

Resampling from 48 to 44.1 in both cases, source - sat broadcast.

Lame settings to convert mp2 to mp3?

Reply #6
as far as i know directshow decoding will fail even with something like ffdshow because the file is still identified as mp3.

Your DirectShow configuration might be broken. No such behaviour observed here. Mediaplayer very rarely relies on file extensions (only specific filters).

Lame settings to convert mp2 to mp3?

Reply #7
better advice would be to demux the mp2 stream correctly from the DVD to begin with and just keep it in this original format.

it would be weird for the ipod to not support mp2 decoding

you can try the doom9 forum for guides


later