x265(1)

✨ x265(1) β€” User Commands β€” x265(1) ✨

πŸ’– NAME πŸ’–

okay so bestie, this is x256 β€” the encoder for creating H.265/HEVC video streams. (yes the page literally says x256 in a couple spots, i'm not editing the original, i'm just delivering it with love πŸ’…)


πŸ¦‹ SYNOPSIS πŸ¦‹

x265 [options] infile [-o] outfile

🌸 DESCRIPTION 🌸

x256 is a commandline encoder for creating H.265/High Efficiency Video Coding (HEVC) video streams. no cap. infile can be a YUV or Y4M video stream, and outfile is where your raw HEVC bitstream is gonna live. slay.

πŸ› οΈ Executable Options:

  • -h, --help β€” shows this help text and exits. bye bestie ✌️

πŸ“¦ Output Options:

  • -o, --output <filename> β€” the bitstream output file name
  • --log-level <string> β€” logging level: none error warning info debug full. Default info
  • --no-progress β€” disables CLI progress reports. no lil spinner for you
  • --[no-]cu-stats β€” enable logging stats about distribution of cu across all modes. Default disabled
  • --csv <filename> β€” comma separated log file, log level >= 3 frame log, else one line per run

πŸŽ€ Input Options:

  • --input <filename> β€” raw YUV or Y4M input file name. - means stdin
  • --y4m β€” force parsing of input stream as YUV4MPEG2 regardless of file extension
  • --fps <float|rational> β€” source frame rate (float or num/denom), auto-detected if Y4M
  • --input-res WxH β€” source picture size [w x h], auto-detected if Y4M
  • --input-depth <integer> β€” bit-depth of input file. Default 8
  • --input-csp <string> β€” source color space: i420, i444 or i422, auto-detected if Y4M. Default: i420
  • -f, --frames <integer> β€” maximum number of frames to encode. Default all
  • --seek <integer> β€” first frame to encode
  • --[no-]interlace <bff|tff> β€” indicate input pictures are interlace fields in temporal order. Default progressive
  • --dither β€” enable dither if downscaling to 8 bit pixels. Default disabled

πŸ“Š Quality reporting metrics:

  • --[no-]ssim β€” enable reporting SSIM metric scores. Default disabled
  • --[no-]psnr β€” enable reporting PSNR metric scores. Default disabled

πŸ‘‘ Profile, Level, Tier:

  • --profile <string> β€” enforce an encode profile: main, main10, mainstillpicture
  • --level-idc <integer|float> β€” force a minimum required decoder level (as '5.0' or '50')
  • --[no-]high-tier β€” if a decoder level is specified, this modifier selects High tier of that level

⚑ Threading, performance:

  • --threads <integer> β€” number of threads for thread pool (0: detect CPU core count, default)
  • -F, --frame-threads <integer> β€” number of concurrently encoded frames. 0: auto-determined by core count
  • --[no-]wpp β€” enable Wavefront Parallel Processing. Default enabled
  • --[no-]pmode β€” parallel mode analysis. Default disabled
  • --[no-]pme β€” parallel motion estimation. Default disabled
  • --[no-]asm <bool|int|string> β€” override CPU detection. Default: auto

🌈 Presets:

  • -p, --preset <string> β€” trade off performance for compression efficiency. Default medium

the options are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, or placebo

  • -t, --tune <string> β€” tune the settings for a particular type of source or situation:

psnr, ssim, zerolatency, or fastdecode

🌳 Quad-Tree size and depth:

  • -s, --ctu <64|32|16> β€” maximum CU size (default: 64x64). Default 64
  • --tu-intra-depth <integer> β€” max TU recursive depth for intra CUs. Default 1
  • --tu-inter-depth <integer> β€” max TU recursive depth for inter CUs. Default 1
  • --[no-]rect β€” enable rectangular motion partitions Nx2N and 2NxN. Default disabled
  • --[no-]amp β€” enable asymmetric motion partitions, requires --rect. Default disabled

πŸ” Analysis:

  • --rd <0..6> β€” level of RD in mode decision 0:least....6:full RDO. Default 3
  • --psy-rd <0..2.0> β€” strength of psycho-visual rate distortion optimization, 0 to disable. Default 0.000000
  • --psy-rdoq <0..50.0> β€” strength of psycho-visual optimization in quantization, 0 to disable. Default 0.000000
  • --nr <integer> β€” an integer value in range of 100 to 1000, which denotes strength of noise reduction. Default disabled
  • --[no-]tskip-fast β€” enable fast intra transform skipping. Default disabled
  • --[no-]early-skip β€” enable early SKIP detection. Default disabled
  • --[no-]fast-cbf β€” enable early outs based on whether residual is coded. Default disabled

🧰 Coding tools:

  • -w, --[no-]weightp β€” enable weighted prediction in P slices. Default enabled
  • --[no-]weightb β€” enable weighted prediction in B slices. Default disabled
  • --[no-]cu-lossless β€” consider lossless mode in CU RDO decisions. Default disabled
  • --[no-]signhide β€” hide sign bit of one coeff per TU (rdo). Default enabled
  • --[no-]tskip β€” enable intra 4x4 transform skipping. Default disabled

πŸƒ Temporal / motion search options:

  • --me <string> β€” motion search method dia hex umh star full. Default 1
  • -m, --subme <integer> β€” amount of subpel refinement to perform (0:least .. 7:most). Default 2
  • --merange <integer> β€” motion search range. Default 57
  • --max-merge <1..5> β€” maximum number of merge candidates. Default 2
  • --[no-]temporal-mvp β€” enable temporal MV predictors. Default enabled

🧚 Spatial / intra options:

  • --[no-]strong-intra-smoothing β€” enable strong intra smoothing for 32x32 blocks. Default enabled
  • --[no-]constrained-intra β€” constrained intra prediction (use only intra coded reference pixels) Default disabled
  • --[no-]b-intra β€” enable intra in B frames in veryslow presets. Default disabled
  • --[no-]fast-intra β€” enable faster search method for angular intra predictions. Default disabled
  • --rdpenalty <0..2> β€” penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum. Default 0

βœ‚οΈ Slice decision options:

  • --[no-]open-gop β€” enable open-GOP, allows I slices to be non-IDR. Default enabled
  • -I, --keyint <integer> β€” max IDR period in frames. -1 for infinite-gop. Default 250
  • -i, --min-keyint <integer> β€” scenecuts closer together than this are coded as I, not IDR. Default: auto
  • --no-scenecut β€” disable adaptive I-frame decision
  • --scenecut <integer> β€” how aggressively to insert extra I-frames. Default 40
  • --rc-lookahead <integer> β€” number of frames for frame-type lookahead (determines encoder latency) Default 20
  • --bframes <integer> β€” maximum number of consecutive b-frames (now it only enables B GOP structure) Default 4
  • --bframe-bias <integer> β€” bias towards B frame decisions. Default 0
  • --b-adapt <0..2> β€” 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling. Default 2
  • --[no-]b-pyramid β€” use B-frames as references. Default enabled
  • --ref <integer> β€” max number of L0 references to be allowed (1 .. 16) Default 3
  • --qpfile <string> β€” force frametypes and QPs for some or all frames. Format of each line: framenumber frametype QP. QP is optional (none lets x265 choose). Frametypes: I,i,P,B,b. QPs are restricted by qpmin/qpmax.

πŸ’Έ Rate control, Quantization:

  • --bitrate <integer> β€” target bitrate (kbps) for ABR (implied). Default 0
  • -q, --qp <integer> β€” QP for P slices in CQP mode (implied). --ipratio and --pbration determine other slice QPs
  • --crf <float> β€” quality-based VBR (0-51). Default 28.000000
  • --[no-]lossless β€” enable lossless: bypass transform, quant and loop filters globally. Default disabled
  • --crf-max <float> β€” with CRF+VBV, limit RF to this value. Default 0.000000
may cause VBV underflows! bestie i am BEGGING you to be careful 🚨
  • --crf-min <float> β€” with CRF+VBV, limit RF to this value. Default 0.000000 this specifies a minimum rate factor value for encode!
  • --vbv-maxrate <integer> β€” max local bitrate (kbit/s). Default 0
  • --vbv-bufsize <integer> β€” set size of the VBV buffer (kbit). Default 0
  • --vbv-init <float> β€” initial VBV buffer occupancy (fraction of bufsize or in kbits). Default 0.900000
  • --aq-mode <integer> β€” mode for Adaptive Quantization - 0:none 1:uniform AQ 2:auto variance. Default 2
  • --aq-strength <float> β€” reduces blocking and blurring in flat and textured areas.(0 to 3.0). Default 1.000000
  • --[no-]cutree β€” enable cutree for Adaptive Quantization. Default enabled
  • --ipratio <float> β€” QP factor between I and P. Default 1.400000
  • --pbratio <float> β€” QP factor between P and B. Default 1.300000
  • --cbqpoffs <integer> β€” Chroma Cb QP Offset. Default 0
  • --crqpoffs <integer> β€” Chroma Cr QP Offset. Default 0
  • --stats β€” filename for stats file in multipass pass rate control. Default x265_2pass.log
  • --pass β€” Multi pass rate control. 1: First pass, creates stats file 2: Last pass, does not overwrite stats file 3: Nth pass, overwrites stats file
  • --[no-]slow-firstpass β€” enable a slow first pass in a multipass rate control mode. Default disabled
  • --analysis-mode <string|int> β€” save - Dump analysis info into file, load - Load analysis buffers from the file. Default 0
  • --analysis-file <filename> β€” specify file name used for either dumping or reading analysis data.
  • --scaling-list <string> β€” specify a file containing HM style quant scaling lists or 'default' or 'off'. Default: off
  • --lambda-file <string> β€” specify a file containing replacement values for the lambda tables MAX_MAX_QP+1 floats for lambda table, then again for lambda2 table. Blank lines and lines starting with hash(#) are ignored. Comma is considered to be white-space

πŸŒ€ Loop filters (deblock and SAO):

  • --[no-]lft β€” enable Deblocking Loop Filter. Default enabled
  • --[no-]sao β€” enable Sample Adaptive Offset. Default enabled
  • --[no-]sao-non-deblock β€” use non-deblocked pixels, else right/bottom boundary areas skipped. Default disabled

πŸ–ΌοΈ VUI options:

  • --sar <width:height|int> β€” Sample Aspect Ratio, the ratio of width to height of an individual pixel. 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 <int:int>. Default 0
  • --crop-rect <string> β€” bestie, this slaps a cropping rectangle right into the bitstream itself. You hand it 'left,top,right,bottom' and it just… carves out the region. Iconic. βœ‚οΈ
  • --overscan <string> β€” tells the decoder whether it's even appropriate to show the cropped region or not. Your picks are undef, show, or crop. Default is undef. Lowkey the most polite option on this whole list. πŸŽ€
  • --videoformat <string> β€” sets the video format, and your options are undef, component, pal, ntsc, secam, mac. Default is undef. It's giving "I don't know her, leave it undefined." πŸ’…
  • --range <string> β€” specifies whether the black level and range of luma and chroma signals are full or limited. Default is limited, no cap. 🌈
  • --colorprim <string> β€” the color primaries moment. Pick from undef, bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020. Default is undef. So many options and honestly? Each one ate. πŸ‘‘
  • --transfer <string> β€” transfer characteristics, aka the glow-up curve of your video. Choices: undef, bt709, bt470m, bt470bg, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12. Default is undef. That's a LOT of options and every single one is in the list, fr fr. ✨
  • --colormatrix <string> β€” the color matrix setting, and your menu is undef, bt709, fcc, bt470bg, smpte170m, smpte240m, GBR, YCgCo, bt2020nc, bt2020c. Default is undef. The way YCgCo just exists in here… respect. 🧚
  • --chromaloc <integer> β€” chroma sample location, and it takes a value from 0 to 5. Default of 0. Small range, big personality. πŸ’–

🎬 Bitstream options 🎬

  • --[no-]info β€” emits SEI identifying the encoder and its parameters. Default is enabled, so it's already on by default. Main character energy, honestly. ⭐
  • --[no-]aud β€” emits access unit delimiters at the start of each access unit. Default is disabled. She's off until you turn her on. πŸ’€
  • --[no-]hrd β€” enables HRD parameters signalling. Default is disabled. 🫢
  • --[no-]repeat-headers β€” emits SPS and PPS headers at each keyframe. Default is disabled. Ngl, turning this on is a whole vibe for streaming. πŸ”₯
  • --hash <integer> β€” Decoded Picture Hash SEI, and the values are: 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default 0. Pick your fighter. πŸ’€

πŸ” Reconstructed video options (debugging) πŸ”

  • -r/--recon <filename> β€” reconstructed raw image YUV or Y4M output file name. Debug girlies, this one's for you. 🌸
  • --recon-depth <integer> β€” bit-depth of the reconstructed raw image file. Defaults to the input bit depth, or 8 if Y4M. She matches your energy unless you tell her otherwise. πŸ¦‹

πŸ“š SEE ALSO πŸ“š

Full documentation may be found at http://x265.readthedocs.org/en/default/cli.html.


okay bestie that's the whole page, you're officially x265-literate, we love to see it πŸ’œ

This was x265 1.4 from November 2014 β€” yes she's an older icon but she still serves. periodt. πŸ’…βœ¨