Changes between Version 38 and Version 39 of Encode/HighQualityAudio


Ignore:
Timestamp:
Jan 28, 2014, 3:37:59 AM (5 years ago)
Author:
MarkZV
Comment:

Formatting, grammar, and other minor fixes.

Legend:

Unmodified
Added
Removed
Modified
  • Encode/HighQualityAudio

    v38 v39  
    44== When should I transcode audio? ==
    55
    6 Avoid transcoding from lossy format to another lossy format if possible. Transcode to lossy from the lossless source (if you have it) or just don't transcode by copying the lossy source audio track, instead.
     6Avoid transcoding from a lossy format to the same or another lossy format when possible. Transcode to lossy from the lossless source (if you have it), or just copy the lossy source audio track instead of transcoding.
    77
    88Another option if you have a lossless source is to transcode it to another lossless codec, like [[http://superuser.com/a/339031/39364|flac ]].
     
    1515== Copying audio tracks ==
    1616
    17 If the target container format supports the audio codec of the source file then really consider just muxing it into the output file without any re-encoding needed. MKV supports virtually any audio codec.[[BR]]
     17If the target container format supports the audio codec of the source file then consider just muxing it into the output file without re-encoding. MKV supports virtually any audio codec.
    1818This can be achieved by specifying 'copy' as the audio codec.
     19
    1920Example:[[BR]]
    2021Transcoding a WebM file (with VP8 video/Vorbis audio) to a MKV file (with H.264 video/unaltered Vorbis audio):[[BR]]
     
    2223ffmpeg -i someFile.webm -c:a copy -c:v libx264 outFile.mkv
    2324}}}
    24 In some cases this might not be possible, because the target device/player doesn't support the codec or the target container format doesn't support the codec.[[BR]]
    25 Another reason to transcode might be that the source audio track is too big. (It has a higher bitrate than what you want to use in the output file)
    26 
    27 == Audio encoders ffmpeg can use ==
    28 
    29 ffmpeg can encode to a wide variety of lossy audio formats.[[BR]]
    30 
    31 Here are some popular lossy formats with encoders listed that ffmpeg can use:[[BR]]
     25In some cases this might not be possible, because the target device/player doesn't support the codec or the target container format doesn't support the codec.
     26Another reason to transcode might be that the source audio track is too big (it has a higher bitrate than what you want to use in the output file).
     27
     28== Audio encoders FFmpeg can use ==
     29
     30FFmpeg can encode to a wide variety of lossy audio formats.[[BR]]
     31
     32Here are some popular lossy formats with encoders listed that FFmpeg can use:[[BR]]
    3233{{{
    3334Dolby Digital: ac3
     
    7475
    7576The '''>=''' sign means greater or the same quality.[[BR]]
    76 Even though AAC should generally give better quality than MP3 at the same bitrates libmp3lame should give better quality output than `libfaac`.[[BR]]
    77 This list is just a general idea and there might be cases where codecs listed to the right might perform better than those listed to the left at certain bitrates. [[BR]]
    78 The highest quality internal/native encoder available in ffmpeg without any external libraries is eac3/ac3. [[BR]]
    79 
    80 Please note it is '''not recommended''' to use `vorbis` for Vorbis encoding.[[BR]]
     77Even though AAC should generally give better quality than MP3 at the same bitrates, libmp3lame should give better quality output than `libfaac`.[[BR]]
     78This list is just a general guide and there may be cases where a codec listed to the right will perform better than one listed to the left at certain bitrates. [[BR]]
     79The highest quality internal/native encoder available in FFmpeg without any external libraries is eac3/ac3. [[BR]]
     80
     81Please note it is '''not recommended''' to use `vorbis` for Vorbis encoding; use `libvorbis` instead.[[BR]]
    8182Please note that `wmav1`,`wmav2` and `libvo_aacenc` don't seem to be able to reach transparency at any given bitrate.[[BR]]
    8283
     
    157158||'''WebM'''||Vorbis||
    158159||'''OGG'''||Vorbis, Opus||
     160''* Muxing Opus in Matroska is experimental, but may be safe.''
     161
    159162Please note that there are more container formats available than those listed above.
    160163
    161164== Recommended minimum bitrates to use ==
    162165
    163 Please note that the bitrates listed here assumes the input audio channels is Stereo and the sample rate is >= 44.1Khz. Mono could require less bits.[[BR]]
     166The bitrates listed here assume 2-channel stereo and a sample rate of 44.1kHz or 48kHz. Mono may require fewer bits.[[BR]]
    164167- '''libopus''' Usable range >= 80Kbps. Recommended range '''>= 128Kbps'''[[BR]]
    165168- '''libfdk_aac default LC-AAC profile.''' Recommended range '''>= 128Kbps''' (http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide). [[BR]]
     
    170173- '''ac3 or eac3''' Usable range >= 160kbps. Recommended range '''>= 160Kbps'''[[BR]]
    171174- '''libfaac''' Usable range >= 192kbps. Recommended range '''-q:a 330 -cutoff 15000 (>= 192Kbps)'''.[[BR]]
    172 Example of usage:
     175 Example of usage:
    173176{{{
    174177ffmpeg -i input.wav -c:a libfaac -q:a 330 -cutoff 15000 output.m4a
    175178}}}
    176179- '''aac''' Usable range >= 192kbps. Recommended range '''>= 240Kbps'''[[BR]]
    177 Example of usage:
     180 Example of usage:
    178181{{{
    179182ffmpeg -i input.wav -c:a aac -b:a 240k -strict -2 output.m4a
     
    193196----
    194197
    195 * Muxing Opus in Matroska is experimental, but may be safe.
    196198When compatibility with hardware players doesn't matter then use `libvorbis` in a MKV container rather than `libfaac` when `libfdk_aac` isn't available[[BR]]
    197199When compatibility with hardware players does matter then use libmp3lame or ac3 in a MP4/MKV container rather than `libfaac` when `libfdk_aac` isn't available[[BR]]