Changes between Version 52 and Version 53 of Encode/H.264


Ignore:
Timestamp:
Jul 22, 2014, 10:23:40 PM (5 years ago)
Author:
llogan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Encode/H.264

    v52 v53  
    1 = FFmpeg and x264 Encoding Guide =
     1= FFmpeg and H.264 Encoding Guide =
    22
    33[[PageOutline(2, Contents)]]
    44
    5 x264 is a H.264/MPEG-4 AVC encoder. The goal of this guide is to inform new users how to create a high-quality H.264 video.
     5The goal of this guide is to inform new users how to create a high-quality H.264 video using the encoder x264.
    66
    77There are two rate control modes that are usually suggested for general use: [#crf Constant Rate Factor (CRF)] or [#twopass Two-Pass ABR]. The rate control is a method that will decide how many bits will be used for each frame. This will determine the file size and also how quality is distributed.
     
    2828A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Similarly, for constant quality encoding, you will simply save bitrate by choosing a slower preset.
    2929
    30 The general guideline is to use the slowest preset that you have patience for. Current presets in descending order of speed are: `ultrafast`,`superfast`, `veryfast`, `faster`, `fast`, `medium`, `slow`, `slower`, `veryslow`, `placebo`. The default preset is `medium`. Ignore `placebo` as it is not useful (see [#FAQ FAQ]). You can see a list of current presets with `-preset help`, and what settings they apply with `x264 --fullhelp`.
     30The general guideline is to use the slowest preset that you have patience for. Current presets in descending order of speed are: `ultrafast`,`superfast`, `veryfast`, `faster`, `fast`, `medium`, `slow`, `slower`, `veryslow`, `placebo`. The default preset is `medium`. Ignore `placebo` as it is not useful (see [#FAQ FAQ]). You can see a list of current presets with `-preset help` (see example below), and what settings they apply with `x264 --fullhelp`.
    3131
    3232You can optionally use `-tune` to change settings based upon the specifics of your input. Current tunings include: `film`, `animation`, `grain`, `stillimage`, `psnr`, `ssim`, `fastdecode`, `zerolatency`. For example, if your input is animation then use the `animation` tuning, or if you want to preserve grain then use the `grain` tuning. If you are unsure of what to use or your input does not match any of tunings then omit the `-tune` option. You can see a list of current tunings with `-tune help`, and what settings they apply with `x264 --fullhelp`.
     
    3434Another optional setting is `-profile:v` which will limit the output to a specific H.264 profile. This can generally be omitted unless the target device only supports a certain profile (see [#Compatibility Compatibility]). Current profiles include: `baseline`, `main`, `high`, `high10`, `high422`, `high444`. Note that usage of `-profile:v` is incompatible with lossless encoding.
    3535
    36 As a shortcut, you can also list all possible internal presets/tunes for FFmpeg by specifying no preset or tune option at all:
    37 
    38 {{{
    39 ffmpeg -y -i input -c:v libx264 -preset -tune -f mp4 /dev/null
    40 }}}
    41 
    42 {{{
    43 #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
    44 '''Note:''' Windows users should use `NUL` instead of `/dev/null`.
     36To list all possible internal preset and tunes:
     37
     38{{{
     39ffmpeg -f lavfi -i nullsrc -c:v libx264 -preset help -f mp4 -
     40}}}
     41
     42{{{
     43#!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
     44'''Note:''' Windows users may need to use `NUL` instead of `-` as the output.
    4545}}}
    4646