Changes between Version 52 and Version 53 of Encode/H.264
- Timestamp:
- Jul 22, 2014, 7:23:40 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Encode/H.264
v52 v53 1 = FFmpeg and x264 Encoding Guide =1 = FFmpeg and H.264 Encoding Guide = 2 2 3 3 [[PageOutline(2, Contents)]] 4 4 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.5 The goal of this guide is to inform new users how to create a high-quality H.264 video using the encoder x264. 6 6 7 7 There 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. … … 28 28 A 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. 29 29 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`.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` (see example below), and what settings they apply with `x264 --fullhelp`. 31 31 32 32 You 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`. … … 34 34 Another 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. 35 35 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/null40 }}} 41 42 {{{ 43 #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;" 44 '''Note:''' Windows users should use `NUL` instead of `/dev/null`.36 To list all possible internal preset and tunes: 37 38 {{{ 39 ffmpeg -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. 45 45 }}} 46 46
