.TH X265 "1" "AUGUST 2014" "v1.4" "User Commands" .SH NAME x265 \- H.265/HEVC video encoder .SH SYNOPSIS .B x265 \fR[options] \fIinfile \fR[\-o] \fIoutfile .br Bit depth: 8 .PP .B x265\-10bit \fR[options] \fIinfile \fR[\-o] \fIoutfile .br Bit depth: 10 .PP infile can be YUV or Y4M .br outfile is raw HEVC bitstream .SH DESCRIPTION Increasing demand for high definition and ultra\-high definition video, along with an increasing desire for video on demand has led to exponential growth in demand for bandwidth and storage requirements. These challenges can be met by the new High Efficiency Video Coding (HEVC) standard, also known as H.265. The x265 HEVC encoder project was launched by MulticoreWare in 2013, aiming to provide the most efficient, highest performance HEVC video encoder. .SS About HEVC The High Efficiency Video Coding (HEVC) was developed by the ISO/IEC Moving Picture Experts Group (MPEG) and ITU\-T Video Coding Experts Group (VCEG), through their Joint Collaborative Team on Video Coding (JCT\-VC). HEVC is also known as ISO/IEC 23008\-2 MPEG\-H Part 2 and ITU\-T H.265. HEVC provides superior video quality and up to twice the data compression as the previous standard (H.264/MPEG\-4 AVC). HEVC can support 8K Ultra High Definition video, with a picture size up to 8192x4320 pixels. .SS About x265 The primary objective of x265 is to become the best H.265/HEVC encoder available anywhere, offering the highest compression efficiency and the highest performance on a wide variety of hardware platforms. The x265 encoder is available as an open source library, published under the GPLv2 license. It is also available under a commercial license, enabling commercial companies to utilize and distribute x265 in their solutions without being subject to the restrictions of the GPL license. .SH OPTIONS .TP \fB\-h/\-\-help Show this help text and exit .TP \fB\-V/\-\-version Show version info and exit .SS "Output Options:" .TP \fB\-\-output Bitstream output file name .TP \fB\-\-log\-level Logging level: none error warning info debug full. Default info .TP \fB\-\-no\-progress Disable CLI progress reports .TP \fB\-\-[no\-]cu\-stats Enable logging stats about distribution of cu across all modes. Default disabled .TP \fB\-\-csv Comma separated log file, log level >= 3 frame log, else one line per run .SS "Input Options:" .TP \fB\-\-input Raw YUV or Y4M input file name. `\-` for stdin .TP \fB\-\-y4m Force parsing of input stream as YUV4MPEG2 regardless of file extension .TP \fB\-\-fps Source frame rate (float or num/denom), auto\-detected if Y4M .TP \fB\-\-input\-res WxH Source picture size [w x h], auto\-detected if Y4M .TP \fB\-\-input\-depth Bit\-depth of input file. Default 8 .TP \fB\-\-input\-csp Source color space: i420, i444 or i422, auto\-detected if Y4M. Default: i420 .TP \fB\-f/\-\-frames Maximum number of frames to encode. Default all .TP \fB\-\-seek First frame to encode .TP \fB\-\-[no\-]interlace Indicate input pictures are interlace fields in temporal order. Default progressive .TP \fB\-\-dither Enable dither if downscaling to 8 bit pixels. Default disabled .SS "Quality reporting metrics:" .TP \fB\-\-[no\-]ssim Enable reporting SSIM metric scores. Default disabled .TP \fB\-\-[no\-]psnr Enable reporting PSNR metric scores. Default disabled .SS "Profile, Level, Tier:" .TP \fB\-\-profile Enforce an encode profile: main, main10, mainstillpicture .TP \fB\-\-level\-idc Force a minumum required decoder level (as '5.0' or '50') .TP \fB\-\-[no\-]high\-tier If a decoder level is specified, this modifier selects High tier of that level .SS "Threading, performance:" .TP \fB\-\-threads Number of threads for thread pool (0: detect CPU core count, default) .TP \fB\-F/\-\-frame\-threads Number of concurrently encoded frames. 0: auto\-determined by core count .TP \fB\-\-[no\-]wpp Enable Wavefront Parallel Processing. Default enabled .TP \fB\-\-[no\-]pmode Parallel mode analysis. Default disabled .TP \fB\-\-[no\-]pme Parallel motion estimation. Default disabled .TP \fB\-\-[no\-]asm Override CPU detection. Default: auto .SS Presets: .TP \fB\-p/\-\-preset Trade off performance for compression efficiency. Default medium .br ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, or placebo .TP \fB\-t/--tune Tune the settings for a particular type of source or situation:" .br psnr, ssim, zerolatency, or fastdecode .SS "Quad-Tree size and depth:" .TP \fB\-s/\-\-ctu <64|32|16> Maximum CU size (default: 64x64). Default 64 .TP \fB\-\-tu\-intra\-depth Max TU recursive depth for intra CUs. Default 1 .TP \fB\-\-tu\-inter\-depth Max TU recursive depth for inter CUs. Default 1 .TP \fB\-\-[no\-]rect Enable rectangular motion partitions Nx2N and 2NxN. Default disabled .TP \fB\-\-[no\-]amp Enable asymmetric motion partitions, requires \fB\-\-rect\fR. Default disabled .TP \fB\-\-rd <0..6> Level of RD in mode decision 0:least....6:full RDO. Default 3 .TP \fB\-\-psy\-rd <0..2.0> Strength of psycho\-visual rate distortion optimization, 0 to disable. Default 0.000000 .TP \fB\-\-psy\-rdoq <0..50.0> Strength of psycho\-visual optimization in quantization, 0 to disable. Default 0.000000 .TP \fB\-\-nr An integer value in range of 100 to 1000, which denotes strength of noise reduction. Default disabled .TP \fB\-\-[no\-]tskip\-fast Enable fast intra transform skipping. Default disabled .TP \fB\-\-[no\-]early\-skip Enable early SKIP detection. Default disabled .TP \fB\-\-[no\-]fast\-cbf Enable early outs based on whether residual is coded. Default disabled .SS "Coding tools:" .TP \fB\-w/\-\-[no\-]weightp Enable weighted prediction in P slices. Default enabled .TP \fB\-\-[no\-]weightb Enable weighted prediction in B slices. Default disabled .TP \fB\-\-[no\-]cu-lossless Consider lossless mode in CU RDO decisions. Default disabled .TP \fB\-\-[no\-]signhide Hide sign bit of one coeff per TU (rdo). Default enabled .TP \fB\-\-[no\-]tskip Enable intra transform skipping. Default disabled .SS "Temporal / motion search options:" .TP \fB\-\-me Motion search method dia hex umh star full. Default 1 .TP \fB\-m/\-\-subme Amount of subpel refinement to perform (0:least .. 7:most). Default 2 .TP \fB\-\-merange Motion search range. Default 57 .TP \fB\-\-max\-merge <1..5> Maximum number of merge candidates. Default 2 .TP \fB\-\-[no\-]temporal\-mvp Enable temporal MV predictors. Default enabled .SS "Spatial / intra options:" .TP \fB\-\-[no\-]strong\-intra\-smoothing Enable strong intra smoothing for 32x32 blocks. Default enabled .TP \fB\-\-[no\-]constrained\-intra Constrained intra prediction (use only intra coded reference pixels) Default disabled .TP \fB\-\-[no\-]b\-intra Enable intra in B frames in veryslow presets. Default disabled .TP \fB\-\-[no\-]fast\-intra Enable faster search method for angular intra predictions. Default disabled .TP \fB\-\-rdpenalty <0..2> penalty for 32x32 intra TU in non\-I slices. 0:disabled 1:RD\-penalty 2:maximum. Default 0 .SS "Slice decision options:" .TP \fB\-\-[no\-]open\-gop Enable open\-GOP, allows I slices to be non\-IDR. Default enabled .TP \fB\-I/\-\-keyint Max IDR period in frames. \-1 for infinite\-gop. Default 250 .TP \fB\-i/\-\-min\-keyint Scenecuts closer together than this are coded as I, not IDR. Default: auto .TP \fB\-\-no\-scenecut Disable adaptive I\-frame decision .TP \fB\-\-scenecut How aggressively to insert extra I\-frames. Default 40 .TP \fB\-\-rc\-lookahead Number of frames for frame\-type lookahead (determines encoder latency) Default 20 .TP \fB\-\-bframes Maximum number of consecutive b\-frames (now it only enables B GOP structure) Default 4 .TP \fB\-\-bframe\-bias Bias towards B frame decisions. Default 0 .TP \fB\-\-b\-adapt <0..2> 0 \- none, 1 \- fast, 2 \- full (trellis) adaptive B frame scheduling. Default 2 .TP \fB\-\-[no\-]b\-pyramid Use B\-frames as references. Default enabled .TP \fB\-\-ref max number of L0 references to be allowed (1 .. 16) Default 3 .TP \fB\-\-qpfile Force frametypes and QPs for some or all frames .br Format of each line: framenumber frametype QP .br QP is optional (none lets x265 choose). Frametypes: I,i,P,B,b. .br QPs are restricted by qpmin/qpmax. .PP .SS "Rate control, Quantization:" .TP \fB\-\-bitrate Target bitrate (kbps) for ABR (implied). Default 0 .TP \fB\-\-crf Quality\-based VBR (0\-51). Default 28.000000 .TP \fB\-\-[no\-]lossless Enable lossless: bypass transform, quant and loop filters globally. Default disabled .TP \fB\-\-crf\-max With CRF+VBV, limit RF to this value. Default 0.000000 .br May cause VBV underflows! .TP \fB\-\-crf\-min With CRF+VBV, limit RF to this value. Default 0.000000 .br this specifies a minimum rate factor value for encode! .TP \fB\-\-vbv\-maxrate Max local bitrate (kbit/s). Default 0 .TP \fB\-\-vbv\-bufsize Set size of the VBV buffer (kbit). Default 0 .TP \fB\-\-vbv\-init Initial VBV buffer occupancy (fraction of bufsize or in kbits). Default 0.900000 .TP \fB\-\-aq\-mode Mode for Adaptive Quantization \- 0:none 1:uniform AQ 2:auto variance. Default 2 .TP \fB\-\-aq\-strength Reduces blocking and blurring in flat and textured areas.(0 to 3.0). Default 1.000000 .TP \fB\-\-[no\-]cutree Enable cutree for Adaptive Quantization. Default enabled .TP \fB\-\-ipratio QP factor between I and P. Default 1.400000 .TP \fB\-\-pbratio QP factor between P and B. Default 1.300000 .TP \fB\-\-cbqpoffs Chroma Cb QP Offset. Default 0 .TP \fB\-\-crqpoffs Chroma Cr QP Offset. Default 0 .TP \fB\-\-stats Filename for stats file in multipass pass rate control. Default x265_2pass.log .TP \fB\-\-pass Multi pass rate control. .br \- 1 : First pass, creates stats file .br \- 2 : Last pass, does not overwrite stats file .br \- 3 : Nth pass, overwrites stats file .TP \fB\-\-[no\-]slow\-firstpass Enable a slow first pass in a multipass rate control mode. Default disabled .TP \fB\-\-analysis\-mode save \- Dump analysis info into file, load \- Load analysis buffers from the file. Default 0 .TP \fB\-\-analysis-file Specify file name used for either dumping or reading analysis data. .TP \fB\-\-scaling\-list Specify a file containing HM style quant scaling lists or 'default' or 'off'. Default: off .TP \fB\-\-lambda\-file Specify a file containing replacement values for the lambda tables .br MAX_MAX_QP+1 floats for lambda table, then again for lambda2 table .br Blank lines and lines starting with hash(#) are ignored .br Comma is considered to be white-space .SS "Loop filters (deblock and SAO):" .TP \fB\-\-[no\-]lft Enable Deblocking Loop Filter. Default enabled .TP \fB\-\-[no\-]sao Enable Sample Adaptive Offset. Default enabled .TP \fB\-\-[no\-]sao\-non\-deblock Use non\-deblocked pixels, else right/bottom boundary areas skipped. Default disabled .SS "VUI options:" .TP \fB\-\-sar Sample Aspect Ratio, the ratio of width to height of an individual pixel. .br Choose from 0=undef, 1=1:1("square"), 2=12:11, 3=10:11, 4=16:11, 5=40:33, 6=24:11, 7=20:11, 8=32:11, 9=80:33, 10=18:11, 11=15:11, 12=64:33, 13=160:99, 14=4:3, 15=3:2, 16=2:1 or custom ratio of . Default 0 .TP \fB\-\-crop\-rect Add 'left,top,right,bottom' to the bitstream\-level cropping rectangle .TP \fB\-\-overscan Specify whether it is appropriate for decoder to show cropped region: undef, show or crop. Default undef .TP \fB\-\-videoformat Specify video format from undef, component, pal, ntsc, secam, mac. Default undef .TP \fB\-\-range Specify black level and range of luma and chroma signals as full or limited Default limited .TP \fB\-\-colorprim Specify color primaries from undef, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020. Default undef .TP \fB\-\-transfer Specify transfer characteristics from undef, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966\-2\-4, bt1361e, iec61966\-2\-1, bt2020\-10, bt2020\-12. Default undef .TP \fB\-\-colormatrix Specify color matrix setting from undef, bt709, fcc, bt470bg, smpte170m, smpte240m, GBR, YCgCo, bt2020nc, bt2020c. Default undef .TP \fB\-\-chromaloc Specify chroma sample location (0 to 5). Default of 0 .SS "Bitstream options:" .TP \fB\-\-[no\-]info Emit SEI identifying encoder and parameters. Default enabled .TP \fB\-\-[no\-]aud Emit access unit delimiters at the start of each access unit. Default disabled .TP \fB\-\-[no\-]hrd Enable HRD parameters signalling. Default disabled .TP \fB\-\-[no\-]repeat\-headers Emit SPS and PPS headers at each keyframe. Default disabled .TP \fB\-\-hash Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default 0 .SS "Reconstructed video options (debugging):" .TP \fB\-r/\-\-recon Reconstructed raw image YUV or Y4M output file name .TP \fB\-\-recon\-depth Bit\-depth of reconstructed raw image file. Defaults to input bit depth, or 8 if Y4M .SH COPYRIGHT Copyright \(co 2013\-2014 MulticoreWare, Inc. .PP The x265 software is owned and copyrighted by MulticoreWare, Inc. MulticoreWare is committed to offering the x265 software under the GNU GPL v2 license. Companies who do not wish to integrate the x265 Software in their products under the terms of the GPL license can contact MulticoreWare (\fIlicense@x265.com\fR) to obtain a commercial license agreement. Companies who use x265 under the GPL may also wish to work with MulticoreWare to accelerate the development of specific features or optimized support for specific hardware or software platforms, or to contract for support. .PP The GNU GPL v2 license or the x265 commercial license agreement govern your rights to access the copyrighted x265 software source code, but do not cover any patents that may be applicable to the function of binary executable software created from the x265 source code. You are responsible for understanding the laws in your country, and for licensing all applicable patent rights needed for use or distribution of software applications created from the x265 source code. A good place to start is with the Motion Picture Experts Group \- Licensing Authority \- HEVC Licensing Program. .PP x265 is a registered trademark of MulticoreWare, Inc. The x265 logo is a trademark of MulticoreWare, and may only be used with explicit written permission. All rights reserved. .SH "SEE ALSO" .TP \fIhttp://x265.readthedocs.org/en/default/cli.html\fR online documentation