#
# Custom preset skeleton file for h264enc
#
# This is an example file on how to write a custom
# preset file and load it in h264enc. You can
# use it as reference for write your own presets
# and use them for the encoding.
# There's only one variable (x264params) that holds
# all the x264 encoder options. Note that the very
# first option in that variable *must* begin with a
# colon like in the example at the bottom, or else the
# options line won't be valid and MEncoder will exit
# with an error. You can add or remove any of the x264
# options supported by MEncoder, with the exception of
# adding the bitrate/crf, pass and the turbo options
# which are added automatically by h264enc, based on
# user choice.
#
# I encourage you to have a look at the x264 part
# in the man page of MPlayer if you are uncertain
# about some of the options/values. Comments, notes,
# etc are preceded by a # character. You can load
# this preset and try it out yourself. Use for example:
#
# h264enc -crf -p cp /path/to/this/preset/preset.cfg
#
# Some notes:
#
# - Deadzones do not work when trellis is enabled.
#   To use them, disable trellis (trellis=0)
#
# - Trellis does not work when cabac is disabled.
#
# - b_adapt, b_pyramid and weight_b do not work
#   when no B-Frames are used (bframes=0).
#   The same goes for direct_pred
#
# - mixed_refs only works if frameref is higher
#   than 1
#
# - chroma_me only works with subq of 5 or higher
#
# - me_range only works with me=umh, me=esa or
#   me=tesa. It does not work with me=dia or
#   me=hex
#
# - Partition type i8x8 only works when 8x8dct
#   is enabled.
#
# - weightp does not work in Baseline profile
#
# - When using vbv_maxrate, vbv_bufsize *must*
#   be set as well
#
# - vbv_init only works with vbv_maxrate and
#   vbv_bufsize set
#
# - psy_rd requires subq of 6 or higher. First
#   parameter defines the rate-distortion strength
#   while the second one defines the trellis strength
#   and requires trellis to be enabled
#
# - nopsy disables all psy optimizations that don't improve
#   PSNR or SSIM. This disables psy-RD/trellis (psy_rd), but also
#   other more subtle internal psy optimizations that can't be
#   controlled directly via external parameters
#
# - nal_hrd is only available if x264 was patched with
#   the NAL HRD patch. When using nal_hrd, both vbv_maxrate
#   and vbv_bufsize must be set
#
# - mbtree does not work yet with b_pyramid enabled and also
#   produces a large passlog file when ran in 2-pass mode but
#   can increase quality anywhere between 2-70%, depending on
#   the content
#
# - rc_lookahead controls the distance MB tree looks ahead to
#   perform propagation analysis and requires mbtree being
#   enabled. Larger values will be slower and require more
#   memory but give more accurate results
#
# NOTE: it is important to start the params with a : (colon)
#       as showen below!

x264params=":force_cfr:frameref=3:mixed_refs:bframes=4:b_adapt=2:b_pyramid=normal:weight_b:weightp=1:direct_pred=auto:aq_mode=1:aq_strength=1.1:me=umh:me_range=16:subq=6:mbtree:psy_rd=1.1,0.15:rc_lookahead=80:chroma_me:trellis=1:cabac:deblock:8x8dct:partitions=p8x8,b8x8,i8x8,i4x4:nofast_pskip:nodct_decimate:threads=auto:ssim:psnr"
