Help - Search - Members - Calendar
Full Version: re-encode MP3 while keeping existing tags using LAME
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
krick
I have a handful of 320 CBR MP3 files that I would like to re-encode to 192 CBR for a portable player.

NOTE: I am fully aware that re-compressing already lossy compressed sources will degrade quality and result in less than optimal results.


1) Is there any easy way to do this conversion from a windows command line using LAME?

2) Is there some way to preserve the existing ID3 tags during the conversion?

3) Is there an easier/better/faster way using an existing application (preferably, but not necessarily free).
smkk
Foobar comes to mind. It preserves all tags and you can use command line if you want (or just use the -V presets).
kornchild2002
I knot that foobar2000 can do this and it is absolutely free. foobar2000 is often regarded as a general "tool" when it comes to encoding as it can decode (and thus convert) files from pretty much every source whether it be lossy mp3, lossy WMA, Apple lossless, FLAC, WavPack, WAV, etc. As I said, the application is perfectly free. Just make sure that you download the Lame.exe file (it will be in a Lame.zip file) from RareWares as foobar2000 uses these external exe files for encoding. Oh, foobar2000 will preserve the ID tag information.

Edit: beaten to it by one minute! Damn.
Maggi
Hi Krick,

I reencode all my MP3s for portable use in my car stereo with the Lame output plugin for Winamp

http://out-lame.sourceforge.net/

not only can I keep all existing tags, I also apply replaygain during the conversion

Just make a playlist of your choice, then goto Winamp's prefs > Plug-ins > Output
-> select and configure "Lame MP3 Writer plug-in v1.6.4" to your needs

Can't get easier than that ... smile.gif

Cheers,
Maggi

PS: I manually updated the enclosed lame_enc.dll with v3.98.2
Bodhi
Please folks, stop transcoding!
Maggi
QUOTE (Bodhi @ Feb 27 2009, 10:56) *
Please folks, stop transcoding!


I hear you, but tbh I see no point in playing HQ VBRs in my car.

Using V5 instead, I save a lot of space, resulting in +200 tracks per 1GB SD-card as opposed to ~100 songs per card using the original files.

I also benefit from the applied replaygain, because my car stereo doesn't support it at all.

wink.gif

Cheers,
Maggi
ojdo
I think it's o.k. as you don't share ( emot-cop.gif ) the transcoded files wink.gif
Bodhi
QUOTE (ojdo @ Feb 27 2009, 16:36) *
I think it's o.k. as you don't share ( emot-cop.gif ) the transcoded files wink.gif

LOL laugh.gif

Maggi, what I meant is that you better encode directly from your CDs.
Maggi
QUOTE (Bodhi @ Feb 27 2009, 16:41) *
QUOTE (ojdo @ Feb 27 2009, 16:36) *
I think it's o.k. as you don't share ( emot-cop.gif ) the transcoded files wink.gif

LOL laugh.gif

Maggi, what I meant is that you better encode directly from your CDs.


LOL indeed

do you think I could positively ABX "V5 VBR" MP3s coming from the original CD vs. my "V0 VBRs" ?

biggrin.gif

besides that, like I mentioned before, for my car stereo I'd need replaygain applied to the MP3s

tongue.gif
Bodhi
QUOTE (Maggi @ Feb 27 2009, 17:36) *
do you think I could positively ABX "V5 VBR" MP3s coming from the original CD vs. my "V0 VBRs" ?

I don't know and I don't think so. I'm sure I couldn't but I'd just rather think it's as "less lossy" as possible blink.gif but that's just me rolleyes.gif
krick
QUOTE (Maggi @ Feb 27 2009, 03:31) *
not only can I keep all existing tags, I also apply replaygain during the conversion



Regarding replaygain... How do people feel about MP3Gain?...

http://en.wikipedia.org/wiki/MP3Gain

From what I understand, it actually modifies the MP3 data (in a reversible way) based on RG.
Slipstreem
I think that's what Maggi meant. He could use, say, Foobar2000 to apply the ReplayGain correction directly to the track data. If these are one-off transcodes for the car then he's highly unlikely to want to undo the process at any stage anyway. smile.gif

Cheers, Slipstreem. cool.gif
krick
QUOTE (smkk @ Feb 27 2009, 00:58) *
Foobar comes to mind. It preserves all tags and you can use command line if you want (or just use the -V presets).



By default, Foobar only has a VBR setting for LAME encoding.

What is the command line for converting to 192CBR using LAME?
And do I need to download the lame.exe or lame_enc.dll to use it?
kornchild2002
Just use the lame.exe file. You will need to create a custom encoder to access the command line. Simply right-click on a file and click on Convert To. You should see an option saying "More settings" on the bottom left, click that. You should now see a new window pop up. Click on the Add New button and then select Custom from the options. Specify a file extension (mp3) and press the ... button next to Encoder. Locate your exe file. Under parameters, foobar2000 might have something in there by default. It should be this:
-S --noreplaygain -V 2 --vbr-new - %d

Simply take out the -V 2 --vbr-new option and change that to whatever setting you want (you would use -b 192). So your command line should look like this:
-S --noreplaygain -b 192 - %d

You can also change the Display info if you want. You don't have to change the "Format is" or "Highest BPS" options. Click OK when you are done. You should now see your new 192kbps setting in the list of available "converters." One thing you might want to change id the ID3 tag that foobar2000 uses. By default, it uses ID3v2.4. I have found that 2.4 support is lacking and still not perfect. You might want to change it to v2.3 or v2.2 for compatibility.

I forgot to mention a program called dBpowerAMP. It can actually convert your mp3 files through Windows Explorer. Simply right-click on your files and it can convert them (using Lame) to various settings preserving the tags. dBpowerAMP is not free but many people find it easier to use than foobar2000 and EAC (dBpowerAMP can even sucurely rip audio CDs). You can download a 14 day trial from their website.
pdq
QUOTE (krick @ Feb 27 2009, 14:36) *
What is the command line for converting to 192CBR using LAME?

You do know that you can get smaller files with the same or better quality as 192CBR by using VBR?
Slipstreem
The only valid reason I can think of for not at least trying VBR would be if the player in question is broken, ie, known to be unable to play VBR files properly. I'd be inclined to try encoding at -V3, or even -V5 before assuming that the encodings won't be suitable. VBR will nearly always give you smaller files than CBR for the same perceived quality.

As is often the case with recommended presets (certainly with Foobar2000), if it ain't broke, don't fix it. smile.gif

Cheers, Slipstreem. cool.gif
krick
QUOTE (kornchild2002 @ Feb 27 2009, 15:27) *
One thing you might want to change id the ID3 tag that foobar2000 uses. By default, it uses ID3v2.4. I have found that 2.4 support is lacking and still not perfect. You might want to change it to v2.3 or v2.2 for compatibility.


Thanks, I'm almost there... Where is the option to change the ID3v2 version? I dug all through the options and I can't find anything that lets me specify the sub-version.

Also, how do I get it to re-use the same filename as the original? In the converter setup dialog, I see...

Name format: %title%

I assume I need to change this to something like %file name%, %filename%, or %f%, but I can't find any documentation that says what the allowable values are.
Nick.C
If the files are tagged, my standard single-track filenaming foobar string is:
CODE
[[%album artist% - ][$char(91)%date%$char(93)] %album%\][%discnumber%-]%tracknumber% - %artist% - %title%
which places the resulting files in separate sub-folders of the main destination folder, e.g. "Mike Oldfield - [1973] Tubular Bells" then a list of tracks
tpijag
Krick

There is a help file with Foobar that will get you started with allowable field tag names

[main menu] Help > Titleformatting help

terry
krick
QUOTE (tpijag @ Feb 27 2009, 18:14) *
Krick

There is a help file with Foobar that will get you started with allowable field tag names

[main menu] Help > Titleformatting help

terry



Thanks. The right formatting string the existing filename is: %filename_ext%
smkk
QUOTE (krick @ Feb 27 2009, 23:36) *
Where is the option to change the ID3v2 version?

Preferences>advanced>mp3>preferred tag writing scheme. By default foobar writes id3v2.4 tags, with compatibility mode enabled it writes id3v2.3 instead.

QUOTE (krick @ Feb 28 2009, 00:37) *
The right formatting string the existing filename is: %filename_ext%

%filename_ext% would rename the file to something like "My File.mp3.mp3", you probably want to use %filename%.
krick
QUOTE (smkk @ Feb 27 2009, 21:26) *
QUOTE (krick @ Feb 28 2009, 00:37) *
The right formatting string the existing filename is: %filename_ext%

%filename_ext% would rename the file to something like "My File.mp3.mp3", you probably want to use %filename%.


Yeah, I noticed that right after posting that there was a double .mp3 extension. D'oh!
Maggi
QUOTE (Bodhi @ Feb 27 2009, 18:34) *
QUOTE (Maggi @ Feb 27 2009, 17:36) *
do you think I could positively ABX "V5 VBR" MP3s coming from the original CD vs. my "V0 VBRs" ?

I don't know and I don't think so. I'm sure I couldn't but I'd just rather think it's as "less lossy" as possible blink.gif but that's just me rolleyes.gif


that approach wouldn't work in my case at all, because I would end up having to rip +200 tracks from CD to wav, apply Wav-Gain and then encode them to MP3 with some extra effort for generating proper ID3 tags

my approach is simply use WinAmp, the MAD decoder plugin with replaygain set to "track" and output via out_lame plugin


QUOTE (Slipstreem @ Feb 27 2009, 19:23) *
I think that's what Maggi meant. He could use, say, Foobar2000 to apply the ReplayGain correction directly to the track data. If these are one-off transcodes for the car then he's highly unlikely to want to undo the process at any stage anyway. smile.gif

Cheers, Slipstreem. cool.gif


spot on ... cool.gif

I use MP3Gain for adding track and album ReplayGain values into the APE tag of each MP3 and let WinAmp play in shuffle mode, until my SD-CARD is filled up

Cheers,
Maggi
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.