Changes between Version 23 and Version 24 of Encode/H.264


Ignore:
Timestamp:
Sep 12, 2012, 1:26:37 AM (7 years ago)
Author:
llogan
Comment:

s/profile/profile:v, escape markup, consistent options names

Legend:

Unmodified
Added
Removed
Modified
  • Encode/H.264

    v23 v24  
    8686----
    8787
    88 == Additional Information, Tips ==
     88== Additional Information & Tips ==
    8989
    9090=== ABR (Average Bit Rate) ===
    9191
    9292{{{
    93 ffmpeg -i input -vcodec libx264 -b 1000k ...
     93ffmpeg -i input -c:v libx264 -b:v 1000k ...
    9494}}}
    9595
     
    100100There is no native CBR mode, but you can "simulate" a constant bit rate setting by tuning the parameters of ABR, like
    101101{{{
    102 ffmpeg -i input -vcodec libx264 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
     102ffmpeg -i input -c:v libx264 -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
    103103}}}
    104104
    105 in this example, bufsize is the "rate control buffer" so it will enforce your requested "average" (4000k in this case) across each 1835k worth of video.  So basically it is assumed that the receiver/end player will buffer that much data so it's ok to fluctuate within that much.
     105in this example, `-bufsize` is the "rate control buffer" so it will enforce your requested "average" (4000k in this case) across each 1835k worth of video.  So basically it is assumed that the receiver/end player will buffer that much data so it's ok to fluctuate within that much.
    106106
    107107Of 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, up to the crf level).
     
    111111You can also also use a crf with a maximum bit rate by specifying both crf *and* maxrate settings, like
    112112{{{
    113 ffmpeg -i input -vcodec libx264 -crf 20 -maxrate 400k -bufsize 1835k
     113ffmpeg -i input -c:v libx264 -crf 20 -maxrate 400k -bufsize 1835k
    114114}}}
    115115
     
    118118=== Low Latency ===
    119119
    120 libx264 offer a "-tune zerolatency" option see See the [[StreamingGuide]].
     120libx264 offer a `-tune zerolatency` option see See the [[StreamingGuide]].
    121121
    122122=== Compatibility ===
     
    124124If you want your videos to have highest "compatibility" with target players (for instance, with older iOS devices) then you'll want to specify
    125125{{{
    126 -profile baseline
     126-profile:v baseline
    127127}}}
    128 which removes some advanced features but is more compatible.  Typically you may not need this setting.  Also if you do use this setting, it increases the bit rate quite a bit, so you might get as good of compression (and possibly increased encoding speed) by just using the mpeg4 video codec instead.
     128which removes some advanced features but is more compatible.  Typically you may not need this setting.  Also if you do use this setting, it increases the bit rate quite a bit.
    129129
    130130=== Pre-testing your settings ===
     
    146146=== Why doesn't my lossless output look lossless? ===
    147147
    148 Blame the rgb->yuv conversion.  If you convert to yuv422p, it should still be lossless (which is the default now).
     148Blame the rgb->yuv conversion. If you convert to yuv422p, it should still be lossless (which is the default now).
    149149
    150150=== Will a graphics card make x264 encode faster? ===
    151151
    152 No. x264 doesn't use them at all.  There are some proprietary encoders that utilize the GPU, but that does not mean they are very good or well optimized; and they might be [http://phoronix.com/forums/showthread.php?50697-Test-tool-for-snb-h264-encoder-in-libva-git&p=205580#post205580 slower than x264] anyway.  But they might be faster. Regardless, FFmpeg today doesn't support any means of gpu encoding.
     152No. x264 doesn't use them at all. There are some proprietary encoders that utilize the GPU, but that does not mean they are very good or well optimized; and they might be [http://phoronix.com/forums/showthread.php?50697-Test-tool-for-snb-h264-encoder-in-libva-git&p=205580#post205580 slower than x264] anyway. But they might be faster. Regardless, FFmpeg today doesn't support any means of gpu encoding.