VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    How do I use Lame command line? First, where do I download the Lame command line from? I always wanted to use it but never knew how. I wanted to use it to encode video audio to MP3. Or if I wanted to redo the encoding to MP3 at 48000kHz with a bitrate with let's say 160 or 224 or 256. How do I use the Lame command line? Thank you for any replies.
    Quote Quote  
  2. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    It's here.

    http://www.rarewares.org/

    Look under MP3/LAME Bundles.
    All command line switches explained in the files in the zip.

    My standard command line.
    Code:
    "c:\VidAud\Lame\lame.exe" --preset cbr 256 "audio.wav" "audio.mp3"
    Quote Quote  
  3. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    Not sure if this will help you any but this

    http://www.pazera-software.com/products/lame-front-end/

    claims to be a GUI front end to lame - best of all it's free!! and makes selecting all the options etc easy.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Originally Posted by IKnowNothing
    Not sure if this will help you any but this

    http://www.pazera-software.com/products/lame-front-end/

    claims to be a GUI front end to lame - best of all it's free!! and makes selecting all the options etc easy.
    Or LameXP. The best lame gui. .
    Quote Quote  
  5. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    It's not working. This is the message I get from run then cmd.


    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>"c: \Lame MP3\lame.exe" --alt present cbr 256
    == resample 48 "sound.wav" "sound.mp3"
    The system cannot find the path specified.

    H:\Documents and Settings\baseball>
    Quote Quote  
  6. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    It didn't go through because I didn't have it on c: now it's on I and here is the message:



    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>"c: \Lame MP3\lame.exe" --alt present cbr 256
    == resample 48 "sound.wav" "sound.mp3"
    The system cannot find the path specified.

    H:\Documents and Settings\baseball>"c: \:ame MP3\Lame.exe" --alt present cbr 256
    -- resample 48
    The system cannot find the path specified.

    H:\Documents and Settings\baseball>I:

    I:\>"Lame MP3\Lame.exe" --alt present cbr 256 --resample 48
    Lame MP3\Lame.exe: unrecognized option --alt

    I:\>"Lame MP3\:ame.exe" --present cbr 256 --resample 48
    The filename, directory name, or volume label syntax is incorrect.

    I:\>
    Quote Quote  
  7. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Whoa!

    My code example wrong. (Note to self. Cut & paste is more accurate than your memory)

    Should have been:
    "c:\VidAud\Lame\lame.exe" --alt-preset standard cbr 256 "audio.wav" "audio.mp3"

    In one case you have == signs instead of -- (hyphens)

    In another you have --alt preset. Should be --alt-preset. (hyphen missing)

    All will be good.
    Quote Quote  
  8. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I am still getting it wrong.



    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>I:

    I:\>"Lame MP3\Lame.exe" --cbr -b 224 --resample 48 "sound.wav" "sound.mp3"
    Could not find "sound.wav".

    I:\>"Lame MP3\Lame.exe" --alt-standard cbr 256 resample 48 "sound.wav" "sound.mp
    3"
    Lame MP3\Lame.exe: unrecognized option --alt-standard

    I:\>"Lame MP3\Lame.exe" alt-present standard cbr 256 resample 48 "sound.wav" "so
    und.mp3"
    Lame MP3\Lame.exe: excess arg cbr

    I:\>








    Originally Posted by pcspeak
    Whoa!

    My code example wrong. (Note to self. Cut & paste is more accurate than your memory)

    Should have been:
    "c:\VidAud\Lame\lame.exe" --alt-preset standard cbr 256 "audio.wav" "audio.mp3"

    In one case you have == signs instead of -- (hyphens)

    In another you have --alt preset. Should be --alt-preset. (hyphen missing)

    All will be good.
    Quote Quote  
  9. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    wow

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>I:

    I:\>"Lame MP3\Lame.exe" --alt-preset standard cbr 256 --resample 48 "sound.wav"
    "sound.mp3"
    Lame MP3\Lame.exe: excess arg sound.wav

    I:\>

    STILL not right
    Quote Quote  
  10. VH Wanderer Ai Haibara's Avatar
    Join Date
    Jan 2006
    Location
    Somewhere on VideoHelp...
    Search Comp PM
    Are the quote marks around the input and output filenames necessary? I don't see an indication of that in lame.exe's help, offhand.

    Also, something you could do is copy lame.exe to the directory with the files you're trying to convert (either that, or add the Lame program directory to the PATH, which isn't really for beginners.) That way, you can just type

    lame (options) (input) (output)

    ...where (options) are the options, (input) is the input file, and... but you probably already guessed all that.
    If cameras add ten pounds, why would people want to eat them?
    Quote Quote  
  11. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I have no clue what you mean by (options)? No I have no way of guessing






    Originally Posted by Ai Haibara
    Are the quote marks around the input and output filenames necessary? I don't see an indication of that in lame.exe's help, offhand.

    Also, something you could do is copy lame.exe to the directory with the files you're trying to convert (either that, or add the Lame program directory to the PATH, which isn't really for beginners.) That way, you can just type

    lame (options) (input) (output)

    ...where (options) are the options, (input) is the input file, and... but you probably already guessed all that.
    Quote Quote  
  12. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Here is another copy but again not working



    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>I:

    I:\>Apollo 13\Lame.exe options sound.wav sound.mp3
    'Apollo' is not recognized as an internal or external command,
    operable program or batch file.

    I:\>
    Quote Quote  
  13. VH Wanderer Ai Haibara's Avatar
    Join Date
    Jan 2006
    Location
    Somewhere on VideoHelp...
    Search Comp PM
    No. no. I was talking about removing the quote marks from the input/output filenames, only. Actually, I was asking pcspeak if putting quotes around the filenames was really necessary, all the time.

    Where do you have lame.exe installed?

    The 'options' are the little - or -- commands you see before the filenames, like -h or -V, that tell lame what, exactly, to do.

    Some examples of the options (quoted from one of the files in the lame package. I've made the options bold so you can see what I'm talking about.):

    Fixed bit rate 128kbps encoding:
    lame sample.wav sample.mp3

    Fixed bit rate jstereo 128kbps encoding, high quality (recommended):
    lame -h sample.wav sample.mp3

    Average bit rate 112kbps encoding:
    lame --abr 112 sample.wav sample.mp3

    Fast encode, low quality (no psycho-acoustics):
    lame -f sample.wav sample.mp3

    Variable bitrate (use -V n to adjust quality/filesize):
    lame -h -V 6 sample.wav sample.mp3
    Also, you need to tell lame.exe exactly what files to process. The example command lines you've been using tell lame to look for files named sound.wav (or "sound.wav", with the quotes) and audio.wav. The file I just quoted uses sample.wav. Since I don't think all your files are named sound.wav (or any of the other above names), you'll want to change it for each file.

    Example:
    lame --cbr -b 224 --resample 48 The4thInning.wav The4thInning.mp3
    If cameras add ten pounds, why would people want to eat them?
    Quote Quote  
  14. Member
    Join Date
    Feb 2004
    Location
    Pleasant Hill, CA
    Search Comp PM
    Originally Posted by rocky12
    I have no clue what you mean by (options)?
    Options are all this:
    --alt-preset standard cbr 256

    In other words all the stuff in the command line before the input file.

    And, you know there's documentation that came with Lame, right? It includes some examples as well as a complete CL reference.

    Another reference that I've used (since I tend to use Lame as my encoder within EAC) is:
    http://www.hydrogenaudio.org/forums/index.php?showtopic=28124
    And the Wiki:
    http://wiki.hydrogenaudio.org/index.php?title=Lame

    Jim
    Quote Quote  
  15. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Before trying to go further, I think you'd better start learning
    how to use the command-line interface and everything related to it ---
    paths, prompt, current working directory, environment variables, etc.

    Quote Quote  
  16. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    I done exactly what you said and this is the message I get



    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    H:\Documents and Settings\baseball>I:

    I:\>cd Apollo 13

    I:\Apollo 13>lame --cbr -b 224 --resample 48 sound.wav sound.mp3
    Unsupported data format: 0x0055

    I:\Apollo 13>








    Originally Posted by Ai Haibara
    No. no. I was talking about removing the quote marks from the input/output filenames, only. Actually, I was asking pcspeak if putting quotes around the filenames was really necessary, all the time.

    Where do you have lame.exe installed?

    The 'options' are the little - or -- commands you see before the filenames, like -h or -V, that tell lame what, exactly, to do.

    Some examples of the options (quoted from one of the files in the lame package. I've made the options bold so you can see what I'm talking about.):

    Fixed bit rate 128kbps encoding:
    lame sample.wav sample.mp3

    Fixed bit rate jstereo 128kbps encoding, high quality (recommended):
    lame -h sample.wav sample.mp3

    Average bit rate 112kbps encoding:
    lame --abr 112 sample.wav sample.mp3

    Fast encode, low quality (no psycho-acoustics):
    lame -f sample.wav sample.mp3

    Variable bitrate (use -V n to adjust quality/filesize):
    lame -h -V 6 sample.wav sample.mp3
    Also, you need to tell lame.exe exactly what files to process. The example command lines you've been using tell lame to look for files named sound.wav (or "sound.wav", with the quotes) and audio.wav. The file I just quoted uses sample.wav. Since I don't think all your files are named sound.wav (or any of the other above names), you'll want to change it for each file.

    Example:
    lame --cbr -b 224 --resample 48 The4thInning.wav The4thInning.mp3
    Quote Quote  
  17. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by rocky12
    I done exactly what you said and this is the message I get
    No to be insulting, I hope, but you seem to have no idea how to run a command line program.
    You need to understand DOS conventions like PATH. (Yes, I know it's not really DOS now, same syntax mostly though.)

    I suggest you use one of the front ends suggested in earlier posts. That will give you the same result with clicks and checkboxes.
    Quote Quote  
  18. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Besides BeLight and BeSweet. Is there any such thing as a Lame GUI? I am curious. Hydrogenaudio said no.







    Originally Posted by AlanHK
    Originally Posted by rocky12
    I done exactly what you said and this is the message I get
    No to be insulting, I hope, but you seem to have no idea how to run a command line program.
    You need to understand DOS conventions like PATH. (Yes, I know it's not really DOS now, same syntax mostly though.)

    I suggest you use one of the front ends suggested in earlier posts. That will give you the same result with clicks and checkboxes.
    Quote Quote  
  19. Member
    Join Date
    Feb 2004
    Location
    Pleasant Hill, CA
    Search Comp PM
    Originally Posted by rocky12
    Is there any such thing as a Lame GUI? I am curious.
    Go back up and re-read Baldrick's post.
    Quote Quote  
  20. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Unsupported data format: 0x0055
    Doesn't that mean an MP3 file with a .WAV header
    You could try adding the option "--mp3input" and check if it works.

    [ EDIT ] :

    Is there any such thing as a Lame GUI?
    http://www.dors.de/razorlame/

    Keep in mind that not all types of MP3 files might be correctly decoded by RazorLame.
    The "pure breed" L.A.M.E. (both the .EXE and the ACM interface) still is the safest choice.
    Quote Quote  
  21. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Hi all.
    Just to add to the confusion.
    I have given slightly misleading help.

    All the MP3s I have been testing with are MPEG-1 layer III. (I hadn't realized).
    Obtained thus:-


    MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
    bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320

    MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
    bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160

    MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
    bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160

    @rocky12. Your files are probably MPEG-2 or 2.5, audio layer III (MP3) - max 160kbps with lame. I think.

    For MPEG-2 or 2.5 this works:
    Code:
    "c:\VidAud\Lame\lame.exe" --preset cbr 160 "audio.wav" "audio.mp3"
    A higher bitrate does not.

    This also works for MPEG-2 or 2.5:
    Code:
    "C:\VidAud\Besweet\BeSweet.exe" -core( -input "audio.wav" -output "audio.mp3" ) -lame( -b 160 )
    A higher bitrate does not.

    I agree with others about your command line knowledge. If you want to continue with using the command line you could copy all things lame into your windows folder until you learn more about PATHS.


    To all. I've been using quotation marks around file paths\names ever since long filenames came in and spaces were allowed. It's definitely NOT always required, but I can't break the habit. Help!.
    Quote Quote  
  22. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Shoot me now. It's a 92% compressed WAV. I am about 100% it has to be PCM???????? How the hell do I encode it from compressed to PCM using freeware tools? Umm I believe Mr DivX Corp Al should of told me it's going to be compressed when saving it from VirtualDubMod but I guess he is busy then telling me it's going to be compressed then PCM?
    Quote Quote  
  23. Originally Posted by rocky12
    Shoot me now. It's a 92% compressed WAV. I am about 100% it has to be PCM???????? How the hell do I encode it from compressed to PCM using freeware tools? Umm I believe Mr DivX Corp Al should of told me it's going to be compressed when saving it from VirtualDubMod but I guess he is busy then telling me it's going to be compressed then PCM?
    I'm confused. What are you trying to do? Convert what to what? Your initial post says .mp3, now you want pcm .wav?
    Quote Quote  
  24. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray
    Originally Posted by rocky12
    Shoot me now. It's a 92% compressed WAV. I am about 100% it has to be PCM???????? How the hell do I encode it from compressed to PCM using freeware tools? Umm I believe Mr DivX Corp Al should of told me it's going to be compressed when saving it from VirtualDubMod but I guess he is busy then telling me it's going to be compressed then PCM?
    I'm confused. What are you trying to do? Convert what to what? Your initial post says .mp3, now you want pcm .wav?
    Quote coming from cdfreaks


    That's weird. Are you sure that the wav file is in PCM format. Maybe the wav file is compressed and that's why you can't encode it. By the way I tried to encode using the same settings as you and it worked .


    Full thread: http://club.cdfreaks.com/f57/how-do-i-use-lame-command-line-248678-new/
    Quote Quote  
  25. What is your source file codec? What container is it in? Run mediainfo(view=>text) if you don't know

    Is this just a learning exercise? It would be much easier to use software with a GUI
    Quote Quote  
  26. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray
    What is your source file codec? What container is it in? Run mediainfo(view=>text) if you don't know

    Is this just a learning exercise? It would be much easier to use software with a GUI
    Since we are working with audio only not video. I post audio results.


    General
    Complete name : I:\Apollo 13\sound.wav
    Format : Wave
    File size : 123 MiB
    Duration : 2h 14mn
    Overal bit rate : 128 Kbps

    Audio
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Codec ID : 55
    Codec ID/Hint : MP3
    Bit rate mode : Constant
    Bit rate : 128 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Resolution : 16 bits
    Quote Quote  
  27. Was that the audio you saved from the original video through the use of virtualdubmod? If so, it is not a true PCM WAV.

    Use avidemux to open your original video, in the audio sidebar drop down menu, select WAV PCM , then audio=>save (enter the name + extension e.g. "myaudio.wav")

    It looks like your original movie audio was MP3, 48KHz, 128kbps. Did you know that you can re-encode and manipulate this directly without taking the intermediate steps of creating a PCM WAV file; or is this a learning exercise?

    A true WAV file will look like this:

    Audio
    Format : PCM
    Codec ID : 1
    Codec ID/Hint : Microsoft
    Bit rate : 1411.2 Kbps
    Channel(s) : 2 channels
    Sampling rate : 44.1 KHz
    Resolution : 16 bits
    Alignment : Aligned on interleaves

    Also note that if your original audio was 128kbps, and you re-encoded it to a higher bitrate, you will not gain any quality. You will actually get worse quality and a bigger filesize if you use a lossy codec like mp3.
    Quote Quote  
  28. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Is it going to make a separate video with no audio?









    Originally Posted by poisondeathray
    Was that the audio you saved from the original video through the use of virtualdubmod? If so, it is not a true PCM WAV.

    Use avidemux to open your original video, in the audio sidebar drop down menu, select WAV PCM , then audio=>save (enter the name + extension e.g. "myaudio.wav")

    It looks like your original movie audio was MP3, 48KHz, 128kbps. Did you know that you can re-encode and manipulate this directly without taking the intermediate steps of creating a PCM WAV file; or is this a learning exercise?

    A true WAV file will look like this:

    Audio
    Format : PCM
    Codec ID : 1
    Codec ID/Hint : Microsoft
    Bit rate : 1411.2 Kbps
    Channel(s) : 2 channels
    Sampling rate : 44.1 KHz
    Resolution : 16 bits
    Alignment : Aligned on interleaves

    Also note that if your original audio was 128kbps, and you re-encoded it to a higher bitrate, you will not gain any quality. You will actually get worse quality and a bigger filesize if you use a lossy codec like mp3.
    Quote Quote  
  29. No, if you follow the steps exactly, it will give you a PCM .wav file.

    Did you want a video without audio?
    Quote Quote  
  30. Member
    Join Date
    Jul 2008
    Location
    United States
    Search Comp PM
    Originally Posted by poisondeathray
    No, if you follow the steps exactly, it will give you a PCM .wav file.

    Did you want a video without audio?
    Yes, separate video and separate audio. Similar to what VirtualDub Products do but I will have a PCM instead of compressed.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!