Changes between Version 1 and Version 2 of Encode/MP3


Ignore:
Timestamp:
Nov 25, 2012, 11:43:59 PM (5 years ago)
Author:
llogan
Comment:

formatting

Legend:

Unmodified
Added
Removed
Modified
  • Encode/MP3

    v1 v2  
    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 libmp3lame library, we would specify a command like this: 
    22{{{ 
    3 ffmpeg -i input.wav -aq 2 out.mp3 
     3ffmpeg -i input.wav -q:a 2 out.mp3 
    44}}} 
    55 
    6 Option "-aq" needs a parameter, that tells FFmpeg something about expected "audio quality" (of course, this parameter has a different meaning for each audio encoder used, and we are now describing the libmp3lame encoder). 
     6Option `-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. 
    77 
    8 The table for LAME option "-V <num>" is shown here (and that option is mapped to FFmpeg's "-aq" option): 
    9 [http://wiki.hydrogenaudio.org/index.php?title=LAME#VBR_.28variable_bitrate.29_settings] 
     8The 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]. 
    109 
    11 {{{ 
    12 Switch        Kbit/s        Bitrate range kbit/s 
    13 -b 320        320           320 CBR 
    14 -V 0          245           220...260 
    15 -V 1          225           190...250 
    16 -V 2          190           170...210 
    17 -V 3          175           150...195 
    18 -V 4          165           140...185 
    19 -V 5          130           120...150 
    20 -V 6          115           100...130 
    21 -V 7          100            80...120 
    22 -V 8           85            70...105 
    23 -V 9           65            45...85 
    24 }}} 
     10||= Switch =||= Kbit/s =||= Bitrate range kbit/s =|| 
     11|| -b 320 || 320 || 320 CBR || 
     12|| -V 0 || 245 || 220...260 || 
     13|| -V 1 || 225 || 190...250 || 
     14|| -V 2 || 190 || 170...210 || 
     15|| -V 3 || 175 || 150...195 || 
     16|| -V 4 || 165 || 140...185 || 
     17|| -V 5 || 130 || 120...150 || 
     18|| -V 6 || 115 || 100...130 || 
     19|| -V 7 || 100 || 80...120 || 
     20|| -V 8 || 85 || 70...105 || 
     21|| -V 9 || 65 || 45...85 || 
    2522 
    26 So, in our example above, we selected "-aq 2", meaning we used LAME's option "-V 2", which gives a VBR mp3 audio in the range of 170-210 kbit/s. 
     23So, 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. 
    2724 
    28 If you want constant bit rate (CBR) mp3 audio, instead of using "-aq" option, you need to use "-ab" option to set the preferred "audio bit rate" in bps, like "-ab 256k" if you want 256 kbit/s audio. 
     25If 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.