Changes between Version 75 and Version 76 of Encode/H.264


Ignore:
Timestamp:
Aug 9, 2020, 12:56:24 AM (8 weeks ago)
Author:
megapro17
Comment:

OpenCL enabling for GPU

Legend:

Unmodified
Added
Removed
Modified
  • Encode/H.264

    v75 v76  
    9595
    9696{{{
    97 ffmpeg -i input.avi -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv
     97ffmpeg -i input -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv
    9898}}}
    9999
     
    238238Refer to the `-vpre` output option in the [https://ffmpeg.org/ffmpeg.html#Preset-files documentation].
    239239
     240== OpenCL ==
     241
     242To enable OpenCL lookahead add `-x264opts opencl` or `-x264-params opencl=true` to your command line. It will give a slight encoding speed boost using GPU, without hurting quality.
     243
     244You will see `Compiling OpenCL kernels...` or `OpenCL acceleration enabled with NVIDIA ...`, also file `x264_lookahead.clbin` will be created, which can deleted safely after encoding.
     245
     246Don't forget about [https://trac.ffmpeg.org/wiki/HWAccelIntro/ HWAccel] too, e.g.: `-hwaccel auto -i input`
     247
     248
    240249----
    241250
     
    265274
    266275If your input files are RGB, it's the RGB to YUV color space conversion. Use `-c:v libx264rgb` instead.
    267 
    268 == Will a graphics card make x264 encode faster? ==
    269 
    270 For x264 specifically, probably not. [https://code.videolan.org/videolan/x264/-/commit/f49a1b2ef6d95d8f0f186df0fc3bfe38414e264f x264 supports OpenCL] for some lookahead operations.
    271276
    272277See [[HWAccelIntro]] for information on supported hardware H.264 encoders and decoders.