Changes between Version 3 and Version 4 of Encode/MP3


Ignore:
Timestamp:
Dec 29, 2013, 11:14:15 AM (6 years ago)
Author:
slhck
Comment:

copyedit

Legend:

Unmodified
Added
Removed
Modified
  • Encode/MP3

    v3 v4  
    1 To encode VBR mp3 audio with `ffmpeg`, using libmp3lame library, we would specify a command like this:
     1To encode VBR MP3 audio with `ffmpeg`, using the `libmp3lame` library, we would specify a command like this:
    22{{{
    3 ffmpeg -i input.wav -codec:a libmp3lame -q:a 2 out.mp3
     3ffmpeg -i input.wav -codec:a libmp3lame -q:a 2 output.mp3
    44}}}
    55
    6 Option `-q:a` needs a parameter, that tells `ffmpeg` something about expected "audio quality". This parameter has a different meaning for each audio encoder used, and we are now describing the libmp3lame encoder.
     6The option `-q:a` needs a parameter that tells `ffmpeg` what audio quality we expect. This parameter has a different meaning for each audio encoder used, and we are now describing the `libmp3lame` encoder.
    77
    8 The table for LAME option `-V <number>` is shown here (and that option is mapped to the `-q:a` option in `ffmpeg`): [http://wiki.hydrogenaudio.org/index.php?title=LAME#VBR_.28variable_bitrate.29_settings VBR (variable bitrate) settings for LAME].
     8The [http://wiki.hydrogenaudio.org/index.php?title=LAME#VBR_.28variable_bitrate.29_settings table for the LAME -V option] is shown in the following. The option is mapped to `-q:a` in `ffmpeg`.
    99
    1010||= Switch =||= Kbit/s =||= Bitrate range kbit/s =||
     
    2121|| -V 9 || 65 || 45...85 ||
    2222
    23 So, in our example above, we selected `-q:a 2`, meaning we used LAME's option `-V 2`, which gives a VBR mp3 audio in the approximate range of 170-210 kbit/s.
     23In our example above, we selected `-q:a 2`, meaning we used LAME's option `-V 2`, which gives us a VBR MP3 audio stream with an average stereo bitrate of 170–210 kBit/s.
    2424
    25 If you want constant bit rate (CBR) mp3 audio, instead of using `-q:a` option, you need to use the `-b:a` option to set the preferred "audio bit rate" in bits per second, like `-b:a 256k` if you want 256 kbit/s audio.
     25If you need constant bitrate (CBR) MP3 audio, you need to use the `-b:a` option instead of `-q:a`. Here you can specify the number of bits per second, for example `-b:a 256k` if you want 256 kBit/s audio.