Changes between Version 7 and Version 8 of Encode/H.264


Ignore:
Timestamp:
Aug 11, 2012, 10:16:45 AM (7 years ago)
Author:
rogerdpack
Comment:

hope this is accurate...or does it lose fps?

Legend:

Unmodified
Added
Removed
Modified
  • Encode/H.264

    v7 v8  
    33x264 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.
    44
     5There are two most popular methods that are useful for general use: Constant Rate Factor (CRF) rate control and Two-Pass Encoding.  Explained below.
     6
    57First you must choose your ratecontrol. A ratecontrol 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.
    68
    7 There are two most popular methods that are useful for general use: Constant Rate Factor (CRF) and Two-Pass Encoding. Use CRF if you don't know what ratecontrol method to use.
    8 
    9 CRF is basically a "keep this same constant quality always" setting.  0 is considered lossless, 51 is worst quality.  You can either set this value, or set a bit rate with one of the other methods, not both.  This is easy to use for beginners--just figure out how much quality you want, then record using this setting.
     9CRF is basically a "keep this same constant quality always" setting.  0 is considered lossless, 51 is worst quality.  You can either set this value, or set a bit rate with one of the other methods, not both.  This is easy to use for beginners--just figure out how much quality you want, then record using this setting.  It has good results even with just 1 pass.
    1010
    1111The default is ABR (Average Bit Rate).  Like
     
    2525Of course, if it's all just empty/black frames then it will still serve less than that many bits/s (but it will raise the quality level as much as it can to try to satisfy the requested parameters).
    2626
     27You can also "fake" a maximum bit rate by specifying both crf *and* maxrate settings, like
     28{{{
     29ffmpeg -i input -vcodec libx264 -crf 20 -maxrate 400k -bufsize 1835k
     30}}}
     31
     32This will effectively "target" crf 20, but if the output exceeds 400k, it will degrade to something less than crf 20 in that case.
     33
    2734If you need help compiling and installing libx264 see one of our [wiki:CompilationGuide FFmpeg and x264 compiling guides].
    2835
     
    3643
    3744=== 2. Choose a preset ===
    38 A preset is a collection of options that will provide a certain encoding speed:compression ratio. A slower preset will provide better compression (compression is quality per filesize). General usage 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`. Ignore `placebo` as it is a joke and a waste of time (see FAQ).
     45A preset is a collection of options that will provide a certain encoding speed:compression ratio. A slower preset will provide better compression (compression is quality per filesize). General usage 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`. Ignore `placebo` as it is a joke and a waste of time (see FAQ), but useful for command lines that require a preset when none is actually needed.
    3946
    4047You can also choose a tune and/or profile.
     48
     49=== 2.5 Output file size ===
     50
     51As you can see, there are actually several things that contribute to file size.  If you have a high CRF value, then that will tend to increase file size.  If you encode with "veryslow" then that will tend to decrease file size.  They both play a role in the output size.
    4152
    4253=== 3. Continue encoding ===