fant0men

x265 options

Aug 30th, 2019
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Syntax: x265 [options] infile [-o] outfile
  3. infile can be YUV or Y4M
  4. outfile is raw HEVC bitstream
  5.  
  6. Executable Options:
  7. -h/--help Show this help text and exit
  8. --fullhelp Show all options and exit
  9. -V/--version Show version info and exit
  10.  
  11. Output Options:
  12. -o/--output <filename> Bitstream output file name
  13. -D/--output-depth 8|10|12 Output bit depth (also internal bit depth). Default 8
  14. --log-level <string> Logging level: none error warning info debug full. Default info
  15. --no-progress Disable CLI progress reports
  16. --csv <filename> Comma separated log file, if csv-log-level > 0 frame level statistics, else one line per run
  17. --csv-log-level <integer> Level of csv logging, if csv-log-level > 0 frame level statistics, else one line per run: 0-2
  18.  
  19. Input Options:
  20. --input <filename> Raw YUV or Y4M input file name. `-` for stdin
  21. --fps <float|rational> Source frame rate (float or num/denom), auto-detected if Y4M
  22. --input-res WxH Source picture size [w x h], auto-detected if Y4M
  23. --dolby-vision-profile <float|integer> Specifies Dolby Vision profile ID. Currently only profile 5, profile 8.1 and profile 8.2 enabled. Specified as '5' or '50'. Default 0 (disabled).
  24. --dolby-vision-rpu <filename> File containing Dolby Vision RPU metadata.
  25. If given, x265's Dolby Vision metadata parser will fill the RPU field of input pictures with the metadata read from the file. Default NULL(disabled).
  26. --nalu-file <filename> Text file containing SEI messages in the following format : <POC><space><PREFIX><space><NAL UNIT TYPE>/<SEI TYPE><space><SEI Payload>
  27. -f/--frames <integer> Maximum number of frames to encode. Default all
  28. --seek <integer> First frame to encode
  29. --[no-]copy-pic Copy buffers of input picture in frame. Default enabled
  30.  
  31. Quality reporting metrics:
  32. --[no-]ssim Enable reporting SSIM metric scores. Default disabled
  33. --[no-]psnr Enable reporting PSNR metric scores. Default disabled
  34.  
  35. Profile, Level, Tier:
  36. -P/--profile <string> Enforce an encode profile: main, main10, mainstillpicture
  37. --level-idc <integer|float> Force a minimum required decoder level (as '5.0' or '50')
  38. --[no-]high-tier If a decoder level is specified, this modifier selects High tier of that level
  39. --uhd-bd Enable UHD Bluray compatibility support
  40. --[no-]allow-non-conformance Allow the encoder to generate profile NONE bitstreams. Default disabled
  41.  
  42. Threading, performance:
  43. --pools <integer,...> Comma separated thread count per thread pool (pool per NUMA node)
  44. '-' implies no threads on node, '+' implies one thread per core on node
  45. -F/--frame-threads <integer> Number of concurrently encoded frames. 0: auto-determined by core count
  46. --[no-]wpp Enable Wavefront Parallel Processing. Default enabled
  47. --[no-]slices <integer> Enable Multiple Slices feature. Default 1
  48. --[no-]pmode Parallel mode analysis. Default disabled
  49. --[no-]pme Parallel motion estimation. Default disabled
  50. --[no-]asm <bool|int|string> Override CPU detection. Default: auto
  51.  
  52. Presets:
  53. -p/--preset <string> Trade off performance for compression efficiency. Default medium
  54. ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, or placebo
  55. -t/--tune <string> Tune the settings for a particular type of source or situation:
  56. psnr, ssim, grain, zerolatency, fastdecode
  57.  
  58. Quad-Tree size and depth:
  59. -s/--ctu <64|32|16> Maximum CU size (WxH). Default 64
  60. --min-cu-size <64|32|16|8> Minimum CU size (WxH). Default 8
  61. --max-tu-size <32|16|8|4> Maximum TU size (WxH). Default 32
  62. --tu-intra-depth <integer> Max TU recursive depth for intra CUs. Default 1
  63. --tu-inter-depth <integer> Max TU recursive depth for inter CUs. Default 1
  64. --limit-tu <0..4> Enable early exit from TU recursion for inter coded blocks. Default 0
  65.  
  66. Analysis:
  67. --rd <1..6> Level of RDO in mode decision 1:least....6:full RDO. Default 3
  68. --[no-]psy-rd <0..5.0> Strength of psycho-visual rate distortion optimization, 0 to disable. Default 2.0
  69. --[no-]rdoq-level <0|1|2> Level of RDO in quantization 0:none, 1:levels, 2:levels & coding groups. Default 0
  70. --[no-]psy-rdoq <0..50.0> Strength of psycho-visual optimization in RDO quantization, 0 to disable. Default 0.0
  71. --dynamic-rd <0..4.0> Strength of dynamic RD, 0 to disable. Default 0.00
  72. --[no-]ssim-rd Enable ssim rate distortion optimization, 0 to disable. Default disabled
  73. --[no-]rd-refine Enable QP based RD refinement for rd levels 5 and 6. Default disabled
  74. --[no-]early-skip Enable early SKIP detection. Default disabled
  75. --[no-]rskip Enable early exit from recursion. Default enabled
  76. --ctu-info <integer> Enable receiving ctu information asynchronously and determine reaction to the CTU information (0, 1, 2, 4, 6) Default 0
  77. - 1: force the partitions if CTU information is present
  78. - 2: functionality of (1) and reduce qp if CTU information has changed
  79. - 4: functionality of (1) and force Inter modes when CTU Information has changed, merge/skip otherwise
  80. Enable this option only when planning to invoke the API function x265_encoder_ctu_info to copy ctu-info asynchronously
  81.  
  82. Coding tools:
  83. -w/--[no-]weightp Enable weighted prediction in P slices. Default enabled
  84. --[no-]weightb Enable weighted prediction in B slices. Default disabled
  85. --[no-]cu-lossless Consider lossless mode in CU RDO decisions. Default disabled
  86. --[no-]signhide Hide sign bit of one coeff per TU (rdo). Default enabled
  87.  
  88. Temporal / motion search options:
  89. --max-merge <1..5> Maximum number of merge candidates. Default 2
  90. --ref <integer> max number of L0 references to be allowed (1 .. 16) Default 3
  91. --limit-refs <0|1|2|3> Limit references per depth (1) or CU (2) or both (3). Default 3
  92. --me <string> Motion search method dia hex umh star full. Default 1
  93. -m/--subme <integer> Amount of subpel refinement to perform (0:least .. 7:most). Default 2
  94. --merange <integer> Motion search range. Default 57
  95. --[no-]rect Enable rectangular motion partitions Nx2N and 2NxN. Default disabled
  96. --[no-]amp Enable asymmetric motion partitions, requires --rect. Default disabled
  97. --[no-]limit-modes Limit rectangular and asymmetric motion predictions. Default 0
  98.  
  99. Spatial / intra options:
  100. --[no-]strong-intra-smoothing Enable strong intra smoothing for 32x32 blocks. Default enabled
  101. --[no-]constrained-intra Constrained intra prediction (use only intra coded reference pixels) Default disabled
  102. --[no-]b-intra Enable intra in B frames in veryslow presets. Default disabled
  103. --[no-]fast-intra Enable faster search method for angular intra predictions. Default disabled
  104. --rdpenalty <0..2> penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum. Default 0
  105.  
  106. Slice decision options:
  107. --[no-]open-gop Enable open-GOP, allows I slices to be non-IDR. Default enabled
  108. -I/--keyint <integer> Max IDR period in frames. -1 for infinite-gop. Default 250
  109. -i/--min-keyint <integer> Scenecuts closer together than this are coded as I, not IDR. Default: auto
  110. --gop-lookahead <integer> Extends gop boundary if a scenecut is found within this from keyint boundary. Default 0
  111. --no-scenecut Disable adaptive I-frame decision
  112. --scenecut <integer> How aggressively to insert extra I-frames. Default 40
  113. --radl <integer> Number of RADL pictures allowed in front of IDR. Default 0
  114. --intra-refresh Use Periodic Intra Refresh instead of IDR frames
  115. --rc-lookahead <integer> Number of frames for frame-type lookahead (determines encoder latency) Default 20
  116. --lookahead-threads <integer> Number of threads to be dedicated to perform lookahead only. Default 0
  117. -b/--bframes <0..16> Maximum number of consecutive b-frames. Default 4
  118. --b-adapt <0..2> 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling. Default 2
  119. --[no-]b-pyramid Use B-frames as references. Default enabled
  120. --[no-]-hrd-concat Set HRD concatenation flag for the first keyframe in the buffering period SEI. Default disabled
  121.  
  122. Rate control, Adaptive Quantization:
  123. --bitrate <integer> Target bitrate (kbps) for ABR (implied). Default 0
  124. --crf <float> Quality-based VBR (0-51). Default 28.0
  125. --vbv-maxrate <integer> Max local bitrate (kbit/s). Default 0
  126. --vbv-bufsize <integer> Set size of the VBV buffer (kbit). Default 0
  127. --vbv-init <float> Initial VBV buffer occupancy (fraction of bufsize or in kbits). Default 0.90
  128. --vbv-end <float> Final VBV buffer emptiness (fraction of bufsize or in kbits). Default 0 (disabled)
  129. --vbv-end-fr-adj <float> Frame from which qp has to be adjusted to achieve final decode buffer emptiness. Default 0
  130. --chunk-start <integer> First frame of the chunk. Default 0 (disabled)
  131. --chunk-end <integer> Last frame of the chunk. Default 0 (disabled)
  132. --pass Multi pass rate control.
  133. - 1 : First pass, creates stats file
  134. - 2 : Last pass, does not overwrite stats file
  135. - 3 : Nth pass, overwrites stats file
  136. --[no-]multi-pass-opt-analysis Refine analysis in 2 pass based on analysis information from pass 1
  137. --[no-]multi-pass-opt-distortion Use distortion of CTU from pass 1 to refine qp in 2 pass
  138. --stats Filename for stats file in multipass pass rate control. Default x265_2pass.log
  139. --[no-]analyze-src-pics Motion estimation uses source frame planes. Default disable
  140. --[no-]slow-firstpass Enable a slow first pass in a multipass rate control mode. Default enabled
  141. --[no-]strict-cbr Enable stricter conditions and tolerance for bitrate deviations in CBR mode. Default disabled
  142. --analysis-save <filename> Dump analysis info into the specified file. Default Disabled
  143. --analysis-load <filename> Load analysis buffers from the file specified. Default Disabled
  144. --analysis-reuse-file <filename> Specify file name used for either dumping or reading analysis data. Deault x265_analysis.dat
  145. --analysis-reuse-level <1..10> Level of analysis reuse indicates amount of info stored/reused in save/load mode, 1:least..10:most. Default 5
  146. --refine-analysis-type <string> Reuse anlaysis information received through API call. Supported options are avc and hevc. Default disabled - 0
  147. --scale-factor <int> Specify factor by which input video is scaled down for analysis save mode. Default 0
  148. --refine-intra <0..4> Enable intra refinement for encode that uses analysis-load.
  149. - 0 : Forces both mode and depth from the save encode.
  150. - 1 : Functionality of (0) + evaluate all intra modes at min-cu-size's depth when current depth is one smaller than min-cu-size's depth.
  151. - 2 : Functionality of (1) + irrespective of size evaluate all angular modes when the save encode decides the best mode as angular.
  152. - 3 : Functionality of (1) + irrespective of size evaluate all intra modes.
  153. - 4 : Re-evaluate all intra blocks, does not reuse data from save encode.
  154. Default:0
  155. --refine-inter <0..3> Enable inter refinement for encode that uses analysis-load.
  156. - 0 : Forces both mode and depth from the save encode.
  157. - 1 : Functionality of (0) + evaluate all inter modes at min-cu-size's depth when current depth is one smaller than
  158. min-cu-size's depth. When save encode decides the current block as skip(for all sizes) evaluate skip/merge.
  159. - 2 : Functionality of (1) + irrespective of size restrict the modes evaluated when specific modes are decided as the best mode by the save encode.
  160. - 3 : Functionality of (1) + irrespective of size evaluate all inter modes.
  161. Default:0
  162. --[no-]dynamic-refine Dynamically changes refine-inter level for each CU. Default disabled
  163. --[no-]refine-mv Enable mv refinement for load mode. Default disabled
  164. --refine-ctu-distortion Store/normalize ctu distortion in analysis-save/load.
  165. - 0 : Disabled.
  166. - 1 : Store/Load ctu distortion to/from the file specified in analysis-save/load.
  167. Default 0 - Disabled
  168. --aq-mode <integer> Mode for Adaptive Quantization - 0:none 1:uniform AQ 2:auto variance 3:auto variance with bias to dark scenes. Default 2
  169. --[no-]hevc-aq Mode for HEVC Adaptive Quantization. Default disabled
  170. --aq-strength <float> Reduces blocking and blurring in flat and textured areas (0 to 3.0). Default 1.00
  171. --qp-adaptation-range <float> Delta QP range by QP adaptation based on a psycho-visual model (1.0 to 6.0). Default 1.00
  172. --[no-]aq-motion Adaptive Quantization based on the relative motion of each CU w.r.t., frame. Default disabled
  173. --qg-size <int> Specifies the size of the quantization group (64, 32, 16, 8). Default 32
  174. --[no-]cutree Enable cutree for Adaptive Quantization. Default enabled
  175. --[no-]rc-grain Enable ratecontrol mode to handle grains specifically. turned on with tune grain. Default disabled
  176. --[no-]const-vbv Enable consistent vbv. turned on with tune grain. Default disabled
  177. --zonefile <filename> Zone file containing the zone boundaries and the parameters to be reconfigured.
  178. --max-ausize-factor <float> This value controls the maximum AU size defined in specification.
  179. It represents the percentage of maximum AU size used. Default 1.0
  180.  
  181. Loop filters (deblock and SAO):
  182. --[no-]deblock Enable Deblocking Loop Filter, optionally specify tC:Beta offsets Default enabled
  183. --[no-]sao Enable Sample Adaptive Offset. Default enabled
  184. --[no-]limit-sao Limit Sample Adaptive Offset types. Default disabled
  185.  
  186. VUI options:
  187. --sar <width:height|int> Sample Aspect Ratio, the ratio of width to height of an individual pixel.
  188. Choose from 0=undef, 1=1:1("square"), 2=12:11, 3=10:11, 4=16:11,
  189. 5=40:33, 6=24:11, 7=20:11, 8=32:11, 9=80:33, 10=18:11, 11=15:11,
  190. 12=64:33, 13=160:99, 14=4:3, 15=3:2, 16=2:1 or custom ratio of <int:int>. Default 0
  191. --videoformat <string> Specify video format from undef, component, pal, ntsc, secam, mac. Default undef
  192. --range <string> Specify black level and range of luma and chroma signals as full or limited Default limited
  193. --colorprim <string> Specify color primaries from bt709, unknown, reserved, bt470m, bt470bg, smpte170m,
  194. smpte240m, film, bt2020, smpte428, smpte431, smpte432. Default undef
  195. --transfer <string> Specify transfer characteristics from bt709, unknown, reserved, bt470m, bt470bg, smpte170m,
  196. smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1,
  197. bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67. Default undef
  198. --master-display <string> SMPTE ST 2086 master display color volume info SEI (HDR)
  199. format: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)
  200. --max-cll <string> Emit content light level info SEI as "cll,fall" (HDR)
  201. --[no-]hdr Control dumping of HDR SEI packet. If max-cll or master-display has non-zero values, this is enabled. Default disabled
  202. --[no-]hdr-opt Add luma and chroma offsets for HDR/WCG content. Default disabled
  203. --min-luma <integer> Minimum luma plane value of input source picture
  204. --max-luma <integer> Maximum luma plane value of input source picture
  205.  
  206. Bitstream options:
  207. --[no-]repeat-headers Emit SPS and PPS headers at each keyframe. Default disabled
  208. --[no-]info Emit SEI identifying encoder and parameters. Default enabled
  209. --[no-]hrd Enable HRD parameters signaling. Default disabled
  210. --[no-]idr-recovery-sei Emit recovery point infor SEI at each IDR frame
  211. --[no-]temporal-layers Enable a temporal sublayer for unreferenced B frames. Default disabled
  212. --[no-]aud Emit access unit delimiters at the start of each access unit. Default disabled
  213. --atc-sei <integer> Emit the alternative transfer characteristics SEI message where the integer is the preferred transfer characteristics. Default disabled
  214. --pic-struct <integer> Set the picture structure and emits it in the picture timing SEI message. Values in the range 0..12. See D.3.3 of the HEVC spec. for a detailed explanation.
  215. --log2-max-poc-lsb <integer> Maximum of the picture order count
  216. --[no-]vui-timing-info Emit VUI timing information in the bistream. Default enabled
  217. --[no-]vui-hrd-info Emit VUI HRD information in the bistream. Default enabled
  218. --[no-]opt-qp-pps Dynamically optimize QP in PPS (instead of default 26) based on QPs in previous GOP. Default disabled
  219. --[no-]opt-ref-list-length-pps Dynamically set L0 and L1 ref list length in PPS (instead of default 0) based on values in last GOP. Default disabled
  220. --[no-]multi-pass-opt-rps Enable storing commonly used RPS in SPS in multi pass mode. Default disabled
  221. --[no-]opt-cu-delta-qp Optimize to signal consistent CU level delta QPs in frame. Default disabled
  222. --lowpass-dct Use low-pass subband dct approximation. Default disabled
  223.  
  224. Use --fullhelp for a full listing (or --log-level full --help)
  225.  
  226.  
  227. Complete documentation may be found at http://x265.readthedocs.org/en/default/cli.html
RAW Paste Data