###############################
# General encoding parameters #
###############################

# threads = <N>
#     Sets the number of threads to be used for processing.  N must be
#     between 1 and 4 inclusive.
#threads = 1

# 2pass_bug_workaround
#     Enables a workaround for an x264 bug which sometimes causes the
#     second pass of a 2-pass encode to fail while reading the 2-pass
#     logfile.
2pass_bug_workaround


###########################
# Video stream properties #
###########################

# level_idc = <N>
#     Sets the H.264 level to use for encoding.  N can be any of the
#     following (note that the resolutions given are only examples; see
#     e.g. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC):
#
#      N  Level  Max. bitrate   Resolution (WxH@FPS)
#     --  -----  ------------  ------------
#     10    1      64 kbit/s    176x144@15
#     11   1.1    192 kbit/s    320x240@10
#     12   1.2    384 kbit/s    320x240@20
#     13   1.3    768 kbit/s    352x288@30
#     20    2       2 Mbit/s    352x288@30
#     21   2.1      4 Mbit/s    352x480@30
#     22   2.2      4 Mbit/s    720x480@15
#     30    3      10 Mbit/s    720x480@30
#     31   3.1     14 Mbit/s   1280x720@30
#     32   3.2     20 Mbit/s   1280x720@60
#     40    4      20 Mbit/s   1920x1088@30
#     41   4.1     50 Mbit/s   1920x1088@30
#     42   4.2     50 Mbit/s   1920x1088@60
#     50    5     135 Mbit/s   2560x1920@30
#     51   5.1    240 Mbit/s   4096x2048@30
#level_idc = 51

# overscan = <N>
# vidformat = <N>
# fullrange | nofullrange
# colorprim = <N>
# transfer = <N>
# colmatrix = <N>
# chroma_loc = <N>
#     Set H.264 VUI properties.  See the source code for details.
#overscan = 0
#vidformat = 5
#nofullrange
#colorprim = 2
#transfer = 2
#colmatrix = 2
#chroma_loc = 0


########################
# Bitstream parameters #
########################

# frameref = <N>
#     Specifies the maximum number of reference frames to use (1-16).
#frameref = 1

# keyint_min = <N>
# keyint_max = <N>
#     Specify the minimum and maximum keyframe intervals.
#keyint_min = 25
#keyint_max = 250

# scenecut = <N>
#     Specifies the scene change detection threshold as a percentage
#     (0-100), or -1 to disable.
#scenecut = 40

# bframes = <N>
#     Specifies the number of B-frames between two reference frames (0-16).
#bframes = 0

# b_adapt | nob_adapt
#     Specifies whether or not to use adaptive B-frame encoding.
#b_adapt

# b_bias = <N>
#     Influences how often B-frames are used.  <N> is from -90 to 100
#     inclusive.
#b_bias = 0

# b_pyramid | nob_pyramid
#     Specifies whether to allow B-frames to be used as references.
#nob_pyramid

# deblock | nodeblock
#     Selects whether to use the deblocking filter.
# deblockalpha = <A>
# deblockbeta = <B>
#     Specify parameters for the deblocking filter.  <A> and <B> are
#     between -6 and 6 inclusive.
#deblock
#deblockalpha = 0
#deblockbeta = 0

# cabac | nocabac
#     Selects whether to use CABAC (context-adaptive binary arithmetic
#     coding).
# cabac_init_idc = <N>
#     Specifies an internal CABAC parameter.
#cabac
#cabac_init_idc = 0

# cqm = <N>
#     Specifies the type of quantization matrices to use:
#         0: Flat matrices
#         1: JVT matrices
#         2: Custom matrices
# cqm_file = <path>
#     Specifies the pathname for the custom matrix file with "cqm 2".
#cqm = 0
#cqm_file = /dev/null


###############################
# Encoder analyzer parameters #
###############################

# 8x8dct | no8x8dct
#     Specifies whether to allow integer 8x8 DCT transforms.
#no8x8dct

# weight_b | noweight_b
#     Specifies whether to use implicit weighting for B-frames.
#noweight_b

# direct_pred = <N>
#     Selects the type of motion vector (MV) prediction to use:
#     0: none, 1: spatial, 2: temporal, 3: auto
#direct_pred = 1

# direct_8x8 | nodirect_8x8
#     Specifies whether to DISallow 4x4 direct partitions.  Default depends
#     on level_idc.
#nodirect_8x8

# chroma_qp_offset = <N>
#     Specifies the QP offset between chroma and luma (-12 to +12).
#chroma_qp_offset = 0

# me = <N>
#     Selects the motion estimation algorithm to use:
#         0: diagonal search, radius 1 (fast)
#         1: hexagonal search, radius 2
#         2: uneven multi-hexagon search
#         3: exhaustive search (slow)
#me = 1

# me_range = <N>
#     Specifies the motion estimation search range (from the predicted MV),
#     4 to 64 inclusive.
#me_range = 16

# mv_range = <N>
#     Specifies the maximum length of a motion vector, 32-2048 pixels.
#     Default depends on level_idc.
#mv_range = 512

# subq = <N>
#     Specifies the subpixel motion estimation quality, from 1 (fastest)
#     to 7 (best).
#subq = 5

# chroma_me | nochroma_me
#     Specifies whether to use chroma in motion estimation.
#chroma_me

# mixed_refs | nomixed_refs
#     Specifies whether to allow macroblock partitions in P-frames to have
#     individual references.
#nomixed_refs

# trellis = <N>
#     Specifies whether to use trellis RD quantization.  Requires CABAC.
#     <N> is one of:
#         0: disabled
#         1: enabled only for final encoding of a macroblock
#         2: enabled for all mode decisions
#trellis = 0

# fast_pskip | nofast_pskip
#     Specifies whether to use early SKIP detection for P-frames.
#fast_pskip

# dct_decimate | nodct_decimate
#     Specifies whether to use transform coefficient thresholding on P-frames.
#dct_decimate

# nr = <N>
#     Specifies noise reduction level (0-65536).
#nr = 0

# psnr | nopsnr
# ssim | nossim
#     Specify whether to calculate PSNR/SSIM statistics (consumes some CPU
#     time).
#psnr
#ssim


###########################
# Rate control parameters #
###########################

# qp_min = <N>
# qp_max = <N>
#     Specify the minimum and maximum allowed QP values (0-51, 0=lossless).
# qp_step = <N>
#     Specifies the maximum difference between QP in consecutive frames.
#qp_min = 10
#qp_max = 51
#qp_step = 4

# crf = <N>
#     Specifies the nominal QP for 1-pass VBR encoding.
#crf = 0

# ratetol = <N>
#     Specifies the allowed variance from the average bitrate.
#ratetol = 1.0

# vbv_maxrate = <N>
#     Specifies the maximum allowed local bitrate, in kbit/s.
#vbv_maxrate = 0

# vbv_bufsize = <N>
#     Specifies the size of the VBV buffer for CBR encoding, in kbit.
#vbv_bufsize = 0

# vbv_init = <N>
#     Specifies the initial occupancy of the VBV buffer as a decimal value.
#vbv_init = 0.9

# ip_ratio = <N>
#     Specifies the QP ratio between I-frames and P-frames.
#ip_ratio = 1.4

# pb_ratio
#     Specifies the QP ratio between P-frames and B-frames.
#pb_ratio = 1.3

# rc_eq = <string>
#     Specifies the rate control equation.
#rc_eq = blurCplx^(1-qComp)

# qcomp = <N>
#     Specifies the QP curve compression ratio.  0.0 gives constant bitrate
#     encoding, while 1.0 gives constant quality encoding.
#qcomp = 0.6

# cplx_blur = <N>
#     Specifies the amount by which to blur complexity before QP compression.
#cplx_blur = 20.0

# qblur = <N>
#     Specifies the amount by which to blur the QP value after QP compression.
#qblur = 0.5

# zones = <string>
#     Specifies exceptions to the rate control handling for particular
#     frame ranges.  The string is a slash-separated sequence of zones,
#     where each zone takes the form "start-frame,end-frame,option".
#     "start-frame" and "end-frame" define the zone, and "option" is one of:
#         q=<QP>: force QP to <QP> (0-51)
#         b=<factor>: multiply bitrate by <factor> (decimal value)
#zones = 0,100,q=10/200,300,b=1.5
