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 MP3 command-line questions (Read 8630 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME MP3 command-line questions

Hi,

I am new to LAME and trying to work out a script. So far I have the following (have not changed title/artist etc. yet):
Using 3.98.2 so do not need to add "--vbr-new and -h", correct?

Code: [Select]
lame -V 0 --tt "title" --ta "artist" --tl "album" --ty "year" --tc "comment" --tn "track[/total]" --tg "genre" --ti "file" --tv "id=value" sample.wav sample1.mp3


My question is though, what are the correct ID3Tags for copyright and URL?
And do I need to specify stereo, joint-stereo, or duel-channel? If so, how do you do that?
Was also interested to know, when using VBR, are you able to configure it so say it uses a minimum bit-rate of 128, an average bit-rate of 192, and a maximum bit-rate  of 256? And again if so, how would you do that?

Now in regards to batch encoding. I did some searching and came across the below script:

Code: [Select]
@echo off
rem WinXP CMD file to encode all WAV files in a folder to MP3s via LAME.EXE..
rem Make sure this cmd file resides in the same folder as LAME.EXE.
rem
rem The argument to this cmd file should be the full path to the folder containing the WAV files.

rem Display our arguments..
echo Full Arg: %1
echo Drive: "%~d1"
echo Path: "%~p1"
echo Name: "%~n1"
echo Ext: "%~x1"
rem Change to arg drive and path
%~d1
cd "%1"
cd

rem Encode with Lame..
for %%z in (*.wav) do "%~dp0lame.exe" --preset standard "%%z" "%%~nz.mp3"

pause

:end


How it should work is that you name the above file something.cmd and move it into the folder with lame.exe.
Then create a shortcut, the move it to your desktop, now you should be able to just drag and drop your folder with the .wav tracks onto the .cmd file and it will batch encode them to .mp3.
I have not tried it yet because I was unsure where to add my encode settings from the first part of this thread to the batch encode script. Would think it would replace the "--preset standard" part.
Could anyone help?

Thanks

 

LAME MP3 command-line questions

Reply #1
My question is though, what are the correct ID3Tags for copyright and URL?

http://www.id3.org/id3v2.3.0

And do I need to specify in the above script stereo, joint-stereo, or duel-channel? If so, how do you do that?

Unless you wish to negatively affect your sound quality or create files that are larger than necessary to obtain the same quality, you should let Lame encode channel information as it sees fit.

Was interested to know, when using VBR, are you able to configure it so say use a minimum bit-rate of 128, an average bit-rate of 192, and a maximum bit-rate  of 256? And again if so, how would you do that?

http://lame.cvs.sourceforge.net/*checkout*...html/index.html

Lastly, -h is not necessary in the command line you specified; it does nothing.

LAME MP3 command-line questions

Reply #2
My question is though, what are the correct ID3Tags for copyright and URL?

http://www.id3.org/id3v2.3.0


A lot of information there, but would it be this then?:
--tcop "copyright" or maybe --tc "copyright"
--tcom "url" or maybe --tu "url"

And do I need to specify in the above script stereo, joint-stereo, or duel-channel? If so, how do you do that?

Unless you wish to negatively affect your sound quality or create files that are larger than necessary to obtain the same quality, you should let Lame encode channel information as it sees fit.


Alright then.

Was interested to know, when using VBR, are you able to configure it so say use a minimum bit-rate of 128, an average bit-rate of 192, and a maximum bit-rate  of 256? And again if so, how would you do that?

http://lame.cvs.sourceforge.net/*checkout*...html/index.html


Based on that information, it would seem it would be:
-V 0 -B 256
But wouldn't that just mean max bit-rate of 256 and not minimum bit-rate of 128 and average bit-rate of 192?

Lastly, -h is not necessary in the command line you specified; it does nothing.


I am using 3.98.2 so it would seem I do not need to add "--vbr-new or -h", correct?
Based on what  you said, it would seem to be "Yes."

And last, any comments on the batch script questions I posted?

Thanks

LAME MP3 command-line questions

Reply #3
You can specify both the minimum and maximum bitrates for variable bitrate encoding (-b for minimum and -B for maximum), but this is generally discouraged. Let Lame pick the optimum bitrate for each frame.

You can not specify an average bitrate with VBR. If you really want to specify the average bitrate, which is also generally discouraged, then what you want is ABR instead.

LAME MP3 command-line questions

Reply #4
You can specify both the minimum and maximum bitrates for variable bitrate encoding (-b for minimum and -B for maximum), but this is generally discouraged. Let Lame pick the optimum bitrate for each frame.

You can not specify an average bitrate with VBR. If you really want to specify the average bitrate, which is also generally discouraged, then what you want is ABR instead.


Reason why I was looking into those is because I want to use VBR, but have more control then just 0 through 9.
But sounds like it is best to let LAME do its own thing.

So are these the correct tags for ID3?
--tcop "copyright" or maybe --tc "copyright"
--tcom "url" or maybe --tu "url"

Code: [Select]
@echo off
rem WinXP CMD file to encode all WAV files in a folder to MP3s via LAME.EXE..
rem Make sure this cmd file resides in the same folder as LAME.EXE.
rem
rem The argument to this cmd file should be the full path to the folder containing the WAV files.

rem Display our arguments..
echo Full Arg: %1
echo Drive: "%~d1"
echo Path: "%~p1"
echo Name: "%~n1"
echo Ext: "%~x1"
rem Change to arg drive and path
%~d1
cd "%1"
cd

rem Encode with Lame..
for %%z in (*.wav) do "%~dp0lame.exe" --preset standard "%%z" "%%~nz.mp3"

pause

:end


And where would I add my script into the above code?
Should it replace "--preset standard"?

lame -V 0 --tt "title" --ta "artist" --tl "album" --ty "year" --tc "comment" --tn "track[/total]" --tg "genre" --ti "file" --tv "id=value" sample.wav sample1.mp3

LAME MP3 command-line questions

Reply #5
By the way: "--preset (fast) standard" is "-V 2", and "-V 0" is "--preset (fast) extreme".
And if you want average bitrate to be about 192 kbps, you should use "-V 2".

LAME MP3 command-line questions

Reply #6
By the way: "--preset (fast) standard" is "-V 2", and "-V 0" is "--preset (fast) extreme".
And if you want average bitrate to be about 192 kbps, you should use "-V 2".


So something like this:

for %%z in (*.wav) do "%~dp0lame.exe" --preset standard "%%z" "%%~nz.mp3"

To this:

for %%z in (*.wav) do "%~dp0lame.exe" --preset (fast) extreme --tt "title" --ta "artist" --tl "album" --ty "year" --tc "comment" --tn "track[/total]" --tg "genre" --ti "file" --tv "id=value" "%%z" "%%~nz.mp3"

LAME MP3 command-line questions

Reply #7
lvqcl was trying to explain to you how -V 2 and -V 0 compared to older Lame command line entries.  Stick to using -V values.  So use either -V 2 or -V 0, don't use the old --preset (fast) extreme command unless you are using a version of Lame that is older than 3.97.

LAME MP3 command-line questions

Reply #8
Seraphic: if you want to get MP3s with (approximate) bitrate ~200 kbps, use
Code: [Select]
for %%z in (*.wav) do "%~dp0lame.exe" -V 2 --tt "title" --ta "artist" --tl "album" --ty "year" --tc "comment" --tn "track[/total]" --tg "genre" --ti "file" --tv "id=value" "%%z" "%%~nz.mp3"

With "-V 0" insread of "-V 2" you'll get ~260 kbps.

kornchild2002: thanks.

LAME MP3 command-line questions

Reply #9
I hope I didn't overstep my boundaries by speaking for you.  I just knew what you were trying to get across with your post.

LAME MP3 command-line questions

Reply #10
Quote
I hope I didn't overstep my boundaries by speaking for you. I just knew what you were trying to get across with your post.

I feel that my english isn't as good, so I don't mind if someone makes things more clear.

LAME MP3 command-line questions

Reply #11
Seraphic: if you want to get MP3s with (approximate) bitrate ~200 kbps, use
Code: [Select]
for %%z in (*.wav) do "%~dp0lame.exe" -V 2 --tt "title" --ta "artist" --tl "album" --ty "year" --tc "comment" --tn "track[/total]" --tg "genre" --ti "file" --tv "id=value" "%%z" "%%~nz.mp3"

With "-V 0" insread of "-V 2" you'll get ~260 kbps.

kornchild2002: thanks.


Thanks everyone for your help.
Alright, I'll give the above script a go and see how it goes.
It would seem the batch encoder script was written for an older version of Lame, so hope there are no issues when using it with the newest version.

My last question is in regards to URL and Copyright ID3Tags.
They are not listed on the Lame ID3Tag page. So are these correct then?:
--tcop "copyright" or maybe --tc "copyright"
--tcom "url" or maybe --tu "url"

LAME MP3 command-line questions

Reply #12
I had a chance to try the script today and it works really well.
Was able to do a batch encode of over fifty tracks.

Just trying to figure out the correct ID3Tages for Composer, Copyright, and URL.
If anyone knows what they are it would be appreciated if you would post them.

Thanks