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:noneerrorwarninginfodebugfull. Defaultinfo--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-resWxH β source picture size [w x h], auto-detected if Y4M--input-depth<integer> β bit-depth of input file. Default8--input-csp<string> β source color space:i420,i444ori422, 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. Defaultmedium
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). Default64--tu-intra-depth<integer> β max TU recursive depth for intra CUs. Default1--tu-inter-depth<integer> β max TU recursive depth for inter CUs. Default1--[no-]rectβ enable rectangular motion partitionsNx2Nand2NxN. Default disabled--[no-]ampβ enable asymmetric motion partitions, requires--rect. Default disabled
π Analysis:
--rd<0..6> β level of RD in mode decision0:least....6:full RDO. Default3--psy-rd<0..2.0> β strength of psycho-visual rate distortion optimization,0to disable. Default0.000000--psy-rdoq<0..50.0> β strength of psycho-visual optimization in quantization,0to disable. Default0.000000--nr<integer> β an integer value in range of100to1000, 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 intra4x4transform skipping. Default disabled
π Temporal / motion search options:
--me<string> β motion search methoddiahexumhstarfull. Default1-m,--subme<integer> β amount of subpel refinement to perform (0:least..7:most). Default2--merange<integer> β motion search range. Default57--max-merge<1..5> β maximum number of merge candidates. Default2--[no-]temporal-mvpβ enable temporal MV predictors. Default enabled
π§ Spatial / intra options:
--[no-]strong-intra-smoothingβ enable strong intra smoothing for32x32blocks. 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 for32x32intra TU in non-I slices.0:disabled1:RD-penalty2:maximum. Default0
βοΈ 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.-1for infinite-gop. Default250-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. Default40--rc-lookahead<integer> β number of frames for frame-type lookahead (determines encoder latency) Default20--bframes<integer> β maximum number of consecutive b-frames (now it only enables B GOP structure) Default4--bframe-bias<integer> β bias towards B frame decisions. Default0--b-adapt<0..2> β0- none,1- fast,2- full (trellis) adaptive B frame scheduling. Default2--[no-]b-pyramidβ use B-frames as references. Default enabled--ref<integer> β max number of L0 references to be allowed (1..16) Default3--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 byqpmin/qpmax.
πΈ Rate control, Quantization:
--bitrate<integer> β target bitrate (kbps) for ABR (implied). Default0-q,--qp<integer> β QP for P slices in CQP mode (implied).--ipratioand--pbrationdetermine other slice QPs--crf<float> β quality-based VBR (0-51). Default28.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. Default0.000000
may cause VBV underflows! bestie i am BEGGING you to be careful π¨
--crf-min<float> β with CRF+VBV, limit RF to this value. Default0.000000this specifies a minimum rate factor value for encode!--vbv-maxrate<integer> β max local bitrate (kbit/s). Default0--vbv-bufsize<integer> β set size of the VBV buffer (kbit). Default0--vbv-init<float> β initial VBV buffer occupancy (fraction of bufsize or in kbits). Default0.900000--aq-mode<integer> β mode for Adaptive Quantization -0:none1:uniform AQ2:auto variance. Default2--aq-strength<float> β reduces blocking and blurring in flat and textured areas.(0to3.0). Default1.000000--[no-]cutreeβ enable cutree for Adaptive Quantization. Default enabled--ipratio<float> β QP factor between I and P. Default1.400000--pbratio<float> β QP factor between P and B. Default1.300000--cbqpoffs<integer> β Chroma Cb QP Offset. Default0--crqpoffs<integer> β Chroma Cr QP Offset. Default0--statsβ filename for stats file in multipass pass rate control. Defaultx265_2pass.log--passβ Multi pass rate control.1: First pass, creates stats file2: Last pass, does not overwrite stats file3: 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. Default0--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 tablesMAX_MAX_QP+1floats 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 from0=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:1or custom ratio of <int:int>. Default0--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 areundef,show, orcrop. Default isundef. Lowkey the most polite option on this whole list. π--videoformat<string> β sets the video format, and your options areundef,component,pal,ntsc,secam,mac. Default isundef. 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 arefullorlimited. Default islimited, no cap. π--colorprim<string> β the color primaries moment. Pick fromundef,bt709,bt470m,bt470bg,smpte170m,smpte240m,film,bt2020. Default isundef. 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 isundef. 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 isundef,bt709,fcc,bt470bg,smpte170m,smpte240m,GBR,YCgCo,bt2020nc,bt2020c. Default isundef. The wayYCgCojust exists in hereβ¦ respect. π§--chromaloc<integer> β chroma sample location, and it takes a value from0to5. Default of0. 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. Default0. 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, or8if 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. π
β¨
π¦ where this page comes from
- debian bookworm: x265 3.5-2+b1 Β· GPL-2.0-or-later
- debian trixie: x265 4.1-2 Β· GPL-2.0-or-later
- ubuntu jammy: x265 3.5-2 Β· GPL-2.0-or-later
- ubuntu noble: x265 3.5-2build1 Β· GPL-2.0-or-later
- ubuntu questing: x265 4.1-2
- ubuntu resolute: x265 4.1-4 Β· GPL-2.0-or-later
- ubuntu stonking: x265 4.2-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms