1############################### 2# General encoding parameters # 3############################### 4 5# threads = <N> 6# Sets the number of threads to be used for processing. N must be 7# between 1 and 4 inclusive. 8#threads = 1 9 10# 2pass_bug_workaround 11# Enables a workaround for an x264 bug which sometimes causes the 12# second pass of a 2-pass encode to fail while reading the 2-pass 13# logfile. 142pass_bug_workaround 15 16 17########################### 18# Video stream properties # 19########################### 20 21# level_idc = <N> 22# Sets the H.264 level to use for encoding. N can be any of the 23# following (note that the resolutions given are only examples; see 24# e.g. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC): 25# 26# N Level Max. bitrate Resolution (WxH@FPS) 27# -- ----- ------------ ------------ 28# 10 1 64 kbit/s 176x144@15 29# 11 1.1 192 kbit/s 320x240@10 30# 12 1.2 384 kbit/s 320x240@20 31# 13 1.3 768 kbit/s 352x288@30 32# 20 2 2 Mbit/s 352x288@30 33# 21 2.1 4 Mbit/s 352x480@30 34# 22 2.2 4 Mbit/s 720x480@15 35# 30 3 10 Mbit/s 720x480@30 36# 31 3.1 14 Mbit/s 1280x720@30 37# 32 3.2 20 Mbit/s 1280x720@60 38# 40 4 20 Mbit/s 1920x1088@30 39# 41 4.1 50 Mbit/s 1920x1088@30 40# 42 4.2 50 Mbit/s 1920x1088@60 41# 50 5 135 Mbit/s 2560x1920@30 42# 51 5.1 240 Mbit/s 4096x2048@30 43#level_idc = 51 44 45# overscan = <N> 46# vidformat = <N> 47# fullrange | nofullrange 48# colorprim = <N> 49# transfer = <N> 50# colmatrix = <N> 51# chroma_loc = <N> 52# Set H.264 VUI properties. See the source code for details. 53#overscan = 0 54#vidformat = 5 55#nofullrange 56#colorprim = 2 57#transfer = 2 58#colmatrix = 2 59#chroma_loc = 0 60 61 62######################## 63# Bitstream parameters # 64######################## 65 66# frameref = <N> 67# Specifies the maximum number of reference frames to use (1-16). 68#frameref = 1 69 70# keyint_min = <N> 71# keyint_max = <N> 72# Specify the minimum and maximum keyframe intervals. 73#keyint_min = 25 74#keyint_max = 250 75 76# scenecut = <N> 77# Specifies the scene change detection threshold as a percentage 78# (0-100), or -1 to disable. 79#scenecut = 40 80 81# bframes = <N> 82# Specifies the number of B-frames between two reference frames (0-16). 83#bframes = 0 84 85# b_adapt | nob_adapt 86# Specifies whether or not to use adaptive B-frame encoding. 87#b_adapt 88 89# b_bias = <N> 90# Influences how often B-frames are used. <N> is from -90 to 100 91# inclusive. 92#b_bias = 0 93 94# b_pyramid | nob_pyramid 95# Specifies whether to allow B-frames to be used as references. 96#nob_pyramid 97 98# deblock | nodeblock 99# Selects whether to use the deblocking filter. 100# deblockalpha = <A> 101# deblockbeta = <B> 102# Specify parameters for the deblocking filter. <A> and <B> are 103# between -6 and 6 inclusive. 104#deblock 105#deblockalpha = 0 106#deblockbeta = 0 107 108# cabac | nocabac 109# Selects whether to use CABAC (context-adaptive binary arithmetic 110# coding). 111# cabac_init_idc = <N> 112# Specifies an internal CABAC parameter. 113#cabac 114#cabac_init_idc = 0 115 116# cqm = <N> 117# Specifies the type of quantization matrices to use: 118# 0: Flat matrices 119# 1: JVT matrices 120# 2: Custom matrices 121# cqm_file = <path> 122# Specifies the pathname for the custom matrix file with "cqm 2". 123#cqm = 0 124#cqm_file = /dev/null 125 126 127############################### 128# Encoder analyzer parameters # 129############################### 130 131# 8x8dct | no8x8dct 132# Specifies whether to allow integer 8x8 DCT transforms. 133#no8x8dct 134 135# weight_b | noweight_b 136# Specifies whether to use implicit weighting for B-frames. 137#noweight_b 138 139# direct_pred = <N> 140# Selects the type of motion vector (MV) prediction to use: 141# 0: none, 1: spatial, 2: temporal, 3: auto 142#direct_pred = 1 143 144# direct_8x8 | nodirect_8x8 145# Specifies whether to DISallow 4x4 direct partitions. Default depends 146# on level_idc. 147#nodirect_8x8 148 149# chroma_qp_offset = <N> 150# Specifies the QP offset between chroma and luma (-12 to +12). 151#chroma_qp_offset = 0 152 153# me = <N> 154# Selects the motion estimation algorithm to use: 155# 0: diagonal search, radius 1 (fast) 156# 1: hexagonal search, radius 2 157# 2: uneven multi-hexagon search 158# 3: exhaustive search (slow) 159#me = 1 160 161# me_range = <N> 162# Specifies the motion estimation search range (from the predicted MV), 163# 4 to 64 inclusive. 164#me_range = 16 165 166# mv_range = <N> 167# Specifies the maximum length of a motion vector, 32-2048 pixels. 168# Default depends on level_idc. 169#mv_range = 512 170 171# subq = <N> 172# Specifies the subpixel motion estimation quality, from 1 (fastest) 173# to 7 (best). 174#subq = 5 175 176# chroma_me | nochroma_me 177# Specifies whether to use chroma in motion estimation. 178#chroma_me 179 180# mixed_refs | nomixed_refs 181# Specifies whether to allow macroblock partitions in P-frames to have 182# individual references. 183#nomixed_refs 184 185# trellis = <N> 186# Specifies whether to use trellis RD quantization. Requires CABAC. 187# <N> is one of: 188# 0: disabled 189# 1: enabled only for final encoding of a macroblock 190# 2: enabled for all mode decisions 191#trellis = 0 192 193# fast_pskip | nofast_pskip 194# Specifies whether to use early SKIP detection for P-frames. 195#fast_pskip 196 197# dct_decimate | nodct_decimate 198# Specifies whether to use transform coefficient thresholding on P-frames. 199#dct_decimate 200 201# nr = <N> 202# Specifies noise reduction level (0-65536). 203#nr = 0 204 205# psnr | nopsnr 206# ssim | nossim 207# Specify whether to calculate PSNR/SSIM statistics (consumes some CPU 208# time). 209#psnr 210#ssim 211 212 213########################### 214# Rate control parameters # 215########################### 216 217# qp_min = <N> 218# qp_max = <N> 219# Specify the minimum and maximum allowed QP values (0-51, 0=lossless). 220# qp_step = <N> 221# Specifies the maximum difference between QP in consecutive frames. 222#qp_min = 10 223#qp_max = 51 224#qp_step = 4 225 226# crf = <N> 227# Specifies the nominal QP for 1-pass VBR encoding. 228#crf = 0 229 230# ratetol = <N> 231# Specifies the allowed variance from the average bitrate. 232#ratetol = 1.0 233 234# vbv_maxrate = <N> 235# Specifies the maximum allowed local bitrate, in kbit/s. 236#vbv_maxrate = 0 237 238# vbv_bufsize = <N> 239# Specifies the size of the VBV buffer for CBR encoding, in kbit. 240#vbv_bufsize = 0 241 242# vbv_init = <N> 243# Specifies the initial occupancy of the VBV buffer as a decimal value. 244#vbv_init = 0.9 245 246# ip_ratio = <N> 247# Specifies the QP ratio between I-frames and P-frames. 248#ip_ratio = 1.4 249 250# pb_ratio 251# Specifies the QP ratio between P-frames and B-frames. 252#pb_ratio = 1.3 253 254# rc_eq = <string> 255# Specifies the rate control equation. 256#rc_eq = blurCplx^(1-qComp) 257 258# qcomp = <N> 259# Specifies the QP curve compression ratio. 0.0 gives constant bitrate 260# encoding, while 1.0 gives constant quality encoding. 261#qcomp = 0.6 262 263# cplx_blur = <N> 264# Specifies the amount by which to blur complexity before QP compression. 265#cplx_blur = 20.0 266 267# qblur = <N> 268# Specifies the amount by which to blur the QP value after QP compression. 269#qblur = 0.5 270 271# zones = <string> 272# Specifies exceptions to the rate control handling for particular 273# frame ranges. The string is a slash-separated sequence of zones, 274# where each zone takes the form "start-frame,end-frame,option". 275# "start-frame" and "end-frame" define the zone, and "option" is one of: 276# q=<QP>: force QP to <QP> (0-51) 277# b=<factor>: multiply bitrate by <factor> (decimal value) 278#zones = 0,100,q=10/200,300,b=1.5 279