x265
37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0Open Source H.265 / HEVC video encoder
x265 is an open-source encoder for H.265 / HEVC developed by MulticoreWare, available as a command-line program and as the libx265 library used by FFmpeg, HandBrake and others. It is GPL-licensed, with a commercial licence also offered by MulticoreWare. x265 is actively developed: version 4.3 was released on 31 July 2026, and the GitHub repository is the main upstream.
Its defaults are aimed at low-bitrate streaming: SAO, deblocking and AQ smooth the picture to hide artifacts. With a few changes (lower CRF, SAO limited or off, stronger psy-rdoq) it is also an excellent high-fidelity encoder, which is how most enthusiast encodes use it.
Most FFmpeg builds include libx265. Source releases are tagged on GitHub; many distribution and third-party builds are “multilib” builds that include 8-, 10- and 12-bit encoding in one binary.
Encode with x265
Section titled “Encode with x265”x265 --preset slow --crf 20 --output-depth 10 -o output.hevc input.y4mffmpeg -i input.mkv -c:v libx265 -preset slow -crf 20 -pix_fmt yuv420p10le -c:a copy output.mkvThe standalone program reads Y4M or raw YUV and writes a raw HEVC bitstream; mux it with mkvmerge, MP4Box or FFmpeg. To feed it from FFmpeg, pipe Y4M. FFmpeg 9.0.2 still needs -strict -1 to write more than 8 bits to Y4M:
ffmpeg -i input.mkv -pix_fmt yuv420p10le -strict -1 -f yuv4mpegpipe - | x265 --input - --y4m --preset slow --crf 20 --output-depth 10 -o output.hevcIn FFmpeg, -preset, -tune, -crf, -profile:v, -g, -b:v, -maxrate/-bufsize and -pass map to x265 settings. Everything else goes through -x265-params using the CLI’s long option names without the dashes, separated by colons: -x265-params aq-mode=3:no-sao=1:deblock=-1,-1. For MP4 output, add -tag:v hvc1; Apple’s players (QuickTime, Safari, iOS) require that sample entry and will not play FFmpeg’s default hev1.
Rate control
Section titled “Rate control”CRF is the mode to use unless you need a specific file size or bitrate. The default is 28, which targets small files. High-quality encodes usually sit somewhere around 16–22, and 4K sources tolerate higher values than 720p or 1080p. CRF values do not carry over from x264 or other encoders, and the preset changes the size you get at a given CRF.
Two-pass hits a target size. Unlike x264, x265 runs the first pass with the full settings by default (--slow-firstpass), because the second pass is better when the passes match:
x265 --preset slow --output-depth 10 --pass 1 --bitrate 4000 -o /dev/null input.y4mx265 --preset slow --output-depth 10 --pass 2 --bitrate 4000 -o output.hevc input.y4mWith FFmpeg, use -b:v 4M -pass 1 -an -f null /dev/null, then -b:v 4M -pass 2 with your real output.
VBV caps the peak bitrate for streaming or device limits: --vbv-maxrate in kbit/s and --vbv-bufsize in kbit (-maxrate/-bufsize in FFmpeg). With CRF this gives “capped CRF”. --crf-max with VBV can cause buffer underflows, as the help warns.
Presets and tunes
Section titled “Presets and tunes”Presets run ultrafast, superfast, veryfast, faster, fast, medium (default), slow, slower, veryslow and placebo. Pick the slowest preset you can live with before changing anything else. slow is where x265 starts doing serious RDO (rd 4, rdoq-level 2, psy-rdoq 1.0, rectangular partitions), so it is the usual minimum for quality-focused encodes; slower and veryslow add more B-frames, references and analysis. ultrafast is poor enough that x264 is usually the better choice at that speed, and placebo is much slower than veryslow for little gain.
| Tune | Changes | Use for |
|---|---|---|
animation | --psy-rd 0.4 --aq-strength 0.4 --deblock 1:1, B-frames +2 | Animated content. Not listed in --fullhelp but accepted. |
grain | --aq-mode 0 --no-cutree --ipratio 1.1 --pbratio 1.0 --qpstep 1 --no-sao --psy-rd 4.0 --psy-rdoq 10.0 --rskip 0, plus --rc-grain | Heavy grain at high bitrates, where grain must not pulse or clump between frames. It costs a lot of bitrate; for moderate grain, the manual settings below usually do better. Overriding AQ or CU-tree on top of it can bring back grain strobing. |
psnr | AQ strength 0, psy-rd and psy-rdoq off | Metric benchmarking only |
ssim | Auto-variance AQ, psy-rd and psy-rdoq off | Metric benchmarking only |
fastdecode | No deblock, no SAO, no weighted prediction, no intra in B-frames | High-bitrate 4K for weak decoders |
zerolatency | No B-frames, no lookahead, no scenecut, no CU-tree, one frame thread | Real-time streaming |
10-bit and HDR
Section titled “10-bit and HDR”Use 10-bit (Main 10) even for 8-bit sources. It reduces banding and is usually more efficient, and unlike 10-bit H.264, HEVC Main 10 is supported by most current hardware decoders (it is the profile HDR10 uses). Set --output-depth 10 (or --profile main10) in a multilib build, or -pix_fmt yuv420p10le in FFmpeg. 12-bit and 4:2:2/4:4:4 use range-extension profiles with little hardware support.
For HDR10, signal the colour description and copy the static metadata from the source; do not reuse another title’s values:
x265 --preset slow --crf 18 --output-depth 10 --colorprim bt2020 --transfer smpte2084 --colormatrix bt2020nc --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1)" --max-cll "1000,400" -o output.hevc input.y4m--master-display primaries are in units of 0.00002 and luminance in 0.0001 cd/m². --hdr10-opt adds block-level QP tuning for HDR10 content. HDR10+ and Dolby Vision need extra metadata files (--dhdr10-info, --dolby-vision-rpu); see HDR and Preserve colour and HDR.
Options worth adjusting
Section titled “Options worth adjusting”Defaults are for preset medium; where other presets change a value, it is noted. See Psychovisual optimization for the background.
For high-fidelity live action, a common starting point is to turn SAO off, lower deblocking, use dark-biased AQ and raise psy-rdoq:
x265 --preset slow --crf 18 --output-depth 10 --no-sao --deblock -2:-2 --aq-mode 3 --psy-rdoq 2 -o output.hevc input.y4mFor animation, start from --deblock -1:-1 --aq-strength 0.8, two more B-frames than the preset and --limit-sao or --no-sao. Raise --psy-rdoq further for grainy sources and lower --psy-rd if lines start to ring. These are starting points: adjust them per source by watching the result.
Psychovisual and adaptive quantization
Section titled “Psychovisual and adaptive quantization”| Option | Default | What it does and when to change it |
|---|---|---|
--psy-rd | 2.0 | Keeps the energy (detail, sharpness) of the source in mode decisions. Only active at --rd 3 and above. Range 0–5. |
--psy-rdoq | 0.0 (1.0 from slow upward) | Keeps energy during quantization, which mostly preserves grain and noise. Only active when --rdoq-level is 1 or 2. Values around 1–2 are common for high-fidelity live action and higher for heavy grain; the grain tune uses 10. |
--aq-mode | 2 | 0 off, 1 uniform AQ, 2 auto-variance, 3 auto-variance with a bias toward dark scenes, 4 auto-variance with edge information. Upstream recommends 3 for 8-bit or low-bitrate 10-bit encodes to prevent banding. Mode 3 is a common choice for high-fidelity encodes too, but it can raise bitrate noticeably for little visible gain, so compare it against 2 on your source. |
--aq-strength | 1.00 | How strongly AQ redistributes bits, 0–3. Commonly lowered to 0.7–0.8 for flat animation or already-compressed sources; the animation tune uses 0.4. |
--no-cutree | CU-tree on | CU-tree is x265’s version of x264’s MB-tree: blocks that later frames reference get more bits. Leave it on; disabling it costs a lot of efficiency. The grain tune turns it off together with AQ to keep grain stable. |
--hevc-aq | Off | An alternative AQ algorithm based on CU variance. |
--no-strong-intra-smoothing | Smoothing on | Strong intra smoothing filters the reference samples of 32×32 intra blocks to avoid banding in flat areas. High-fidelity encodes often turn it off to keep detail. |
--psy-rd favours specific detail and sharpness; --psy-rdoq favours overall noise and texture. Both depend heavily on the source, so change them in small steps and compare at playback speed as well as frame by frame.
Loop filters
Section titled “Loop filters”| Option | Default | What it does and when to change it |
|---|---|---|
--sao / --no-sao | On (off at ultrafast and superfast) | Sample Adaptive Offset reduces ringing and banding but smooths fine detail and grain. Fine at moderate and low bitrates; at high quality (roughly CRF 18 and below) many encoders turn it off. |
--limit-sao | Off | Early-terminates SAO decisions, which in practice keeps somewhat more detail than full SAO. A middle ground before --no-sao. |
--selective-sao | 4 when SAO is on | Applies SAO only to some slice types: 1 I-slices, 2 I and P, 3 all reference slices, 4 all. Lower values are a middle ground between full SAO and --no-sao. |
--deblock <tC>:<beta> | 0:0 | Deblocking offsets, -6 to 6. At high quality, -1:-1 for animation and -2:-2 for live action are common to keep detail and grain; the animation tune uses 1:1 for lower bitrates. |
Analysis and frame structure
Section titled “Analysis and frame structure”| Option | Default | What it does and when to change it |
|---|---|---|
--rd | 3 (4 slow, 6 slower+) | Rate-distortion optimization level in mode decision, 1–6. Levels 3/4 and 5/6 are currently the same pairs. |
--rdoq-level | 0 (2 at slow+) | RDO in quantization: 0 none, 1 levels, 2 levels and coding groups. Needed for --psy-rdoq to do anything. |
--tskip | Off | Tries transform skip on 4×4 blocks. Helps sharp synthetic content such as screen captures. Requires --rd 3 or above. |
--rect / --amp | Off (rect from slow, amp from slower) | Rectangular and asymmetric motion partitions. Better efficiency, slower. |
--bframes | 4 (8 at slower+) | Maximum consecutive B-frames, 0–16. Animation benefits from about 2 more than the preset default. |
--b-adapt | 2 (0 at veryfast to fast) | B-frame placement: 0 none, 1 fast, 2 full trellis. Keep 2. |
--bframe-bias | 0 | Makes B-frames more or less likely. Rarely worth changing. |
--ref | 3 (4 slow, 5 slower+) | Reference frames, 1–16. |
--me | hex (star at slow+) | Motion search: dia, hex, umh, star, full. |
--subme | 2 (3 slow, 4 slower and veryslow, 5 placebo) | Subpixel motion refinement, 0–7. |
--merange | 57 | Motion search range. Rarely needs changing. |
--rc-lookahead | 20 (25 slow, 40 slower) | Frames analysed for frame types and CU-tree. Longer helps scenecut detection and CU-tree; more than --keyint does not help. |
--keyint / --min-keyint | 250 / auto | Maximum and minimum keyframe interval in frames. |
--open-gop | On | Unlike x264, open GOP is the default. Use --no-open-gop if the stream will be cut or segmented at keyframes. |
Threading
Section titled “Threading”x265 parallelizes with Wavefront Parallel Processing (--wpp, on by default: rows start once the row above is two CTUs ahead, about 1% efficiency cost per the upstream docs) and frame threads (--frame-threads, automatic by default). A single frame thread compresses slightly better but is much slower. x265 does not saturate many-core CPUs on lower-resolution content, which is why chunked encoders such as Av1an are sometimes used to run several x265 instances in parallel.
Lossless
Section titled “Lossless”--lossless (-x265-params lossless=1) bypasses transform, quantization and loop filters and reproduces the input exactly; rate-control options are ignored. It is not a common choice: lossless x264 (--qp 0) is much faster for intermediates, and FFV1 is usually preferred for archiving.
Complete standalone parameter reference
Section titled “Complete standalone parameter reference”Every option the x265 4.3 CLI accepts, grouped as in x265 --fullhelp, followed by aliases, legacy spellings and options that exist only in builds with optional features. Defaults are for preset medium with no tune, which is also what you get without --preset (one exception is noted). Where x265 changes a value at startup, for example from the frame rate, core count or another option, the default cell says so. Full syntax is in the 4.3 CLI documentation.
Executable Options
| Parameter | Default | Meaning |
|---|---|---|
--help | — | Print the common options and exit (-h). |
--fullhelp | — | Print every option, including those --help hides, and exit. |
--version | — | Print the version, the bit depths built in and the detected CPU features, then exit (-V). |
Output Options
| Parameter | Default | Meaning |
|---|---|---|
--output | unset | Output file (-o); the second positional argument is used if omitted. Always a raw HEVC elementary stream, so mux it afterwards (FFmpeg, MKVToolNix, MP4Box). |
--output-depth | 8 | Output and internal bit depth: 8, 10 or 12 (-D). The CLI loads the matching libx265 build; without it, a --profile name such as main10 sets the depth. |
--log-level | info | Console verbosity: none, error, warning, info, debug (adds per-frame QP and bits) or full. |
--no-progress | progress shown | Turn off the periodic progress line. |
--csv | unset | Write encode statistics to this CSV file (created if missing, otherwise appended). |
--csv-log-level | 0 | CSV detail: 0 one summary line per run, 1 one line per frame, 2 per-frame lines with performance statistics. |
Input Options
| Parameter | Default | Meaning |
|---|---|---|
--input | unset | Input file, raw YUV or Y4M; - reads stdin. The first positional argument is used if omitted. |
--y4m | off (implied by a .y4m name) | Parse the input as Y4M whatever its name; needed when piping Y4M through stdin. |
--fps | from Y4M header | Frame rate as a number or num/den (e.g. 24000/1001). Required for raw YUV; overrides the Y4M header. |
--input-res | from Y4M header | Picture size WxH; required for raw YUV. |
--input-depth | 8 (raw YUV); Y4M header otherwise | Bit depth of raw YUV input, 8–16. Deeper input is reduced to the output depth (see --dither). |
--input-csp | i420 (raw YUV); Y4M header otherwise | Chroma format of raw input: i400, i420, i422, i444, nv12, nv16. x265 never resamples chroma, so this also sets the output format. |
--dolby-vision-profile | 0 (off) | Make the stream conform to Dolby Vision profile 5, 8.1, 8.2 or 8.4 (8.1 or 81). Requires 10-bit 4:2:0 and VBV; 8.1 also needs --master-display. The RPUs come from --dolby-vision-rpu. |
--dolby-vision-rpu | unset | Binary RPU file (for example extracted from the source with dovi_tool); one RPU is attached to each input frame in order. CLI only. |
--nalu-file | unset | Text file of extra prefix SEI messages, one per line: POC PREFIX NALtype/SEItype payload. |
--frames | all | Encode at most this many frames (-f). Knowing the count also helps rate control. |
--seek | 0 | Skip this many input frames before encoding. |
--[no-]interlace | progressive | Input is interlaced, tff or bff. HEVC codes each field as a picture: supply field-sized pictures and the field rate. Experimental. |
--[no-]field | off | Field coding from interleaved frames: with --interlace, x265 halves the height and doubles the frame rate itself. |
--dither | off | Error-diffusion dither when reducing high-bit-depth input to the output depth. CLI only. |
--[no-]copy-pic | on | Copy input pictures into internal buffers. Only API users that supply padded buffers turn this off. |
Quality reporting metrics
| Parameter | Default | Meaning |
|---|---|---|
--[no-]ssim | off | Report SSIM against the source. Only meaningful with psy-rd/psy-rdoq off (--tune ssim); x265 warns otherwise. |
--[no-]psnr | off | Report PSNR against the source. Only meaningful with psy and AQ off (--tune psnr); x265 warns otherwise. |
Profile, Level, Tier
| Parameter | Default | Meaning |
|---|---|---|
--profile | auto (from bit depth and chroma format) | Enforce a profile such as main, main10, main12, main422-10, main444-8, main444-10, or an -intra/still-picture variant (-P). Aborts if the settings cannot meet it. |
--level-idc | 0 (auto-detect) | Minimum decoder level as 5.1 or 51. x265 constrains the encode to fit (enabling VBV for CRF), signals that level, and aborts if it cannot be met. |
--[no-]high-tier | on | Allow High tier when the VBV rate or buffer exceeds the Main-tier limit for the level; Main tier is signaled otherwise. --no-high-tier stays in Main tier. |
--uhd-bd | off | Apply Ultra HD Blu-ray constraints (level 5.1, closed GOP, keyint up to 1 s, at most 6 refs, AUD, HRD and repeated headers). Needs 1920×1080 or 3840×2160 with BT.709 or BT.2020 colour. |
--[no-]allow-non-conformance | off | Write streams that exceed profile/level limits (signaled as NONE) instead of aborting. Usual cause: too many references. |
Threading, performance
| Parameter | Default | Meaning |
|---|---|---|
--pools | auto (all cores) | Worker threads per NUMA node, comma-separated: a count, + (all cores on that node), - (none) or * (all remaining nodes). none disables the pool, leaving only frame threads. Alias --numa-pools. |
--frame-threads | 0 (auto) | Frames encoded in parallel (-F). Auto: 1 below 4 threads, 2 from 4, 3 from 8, 4 from 16, 5 from 32 (6 above 2000 lines). Fewer compress slightly better; more mostly add memory. |
--[no-]wpp | on | Wavefront parallel processing: a CTU row starts once the row above is two CTUs ahead. Large speed-up for about 1% efficiency. |
--slices | 1 | Full-width slices per picture. Costs efficiency; only useful when WPP and frame threads cannot fill the CPU. |
--[no-]pmode | off | Parallel mode decision. Deprecated since 4.1: the CLI rejects --pmode. |
--[no-]pme | off | Parallel motion estimation. Deprecated since 4.1: the CLI rejects --pme. |
--[no-]threaded-me | off | Dedicated motion-estimation thread pool that works ahead across CTUs. Experimental; lowers efficiency and turns itself off below 32 threads or with VBV. |
--[no-]asm | auto (detected; AVX-512 off) | Override CPU feature detection with names (avx2) or a bitmask; --no-asm disables SIMD. --asm avx512 enables the AVX-512 kernels that detection leaves off. Naming features the CPU lacks crashes the encoder. |
Presets
| Parameter | Default | Meaning |
|---|---|---|
--preset | medium | Speed/efficiency preset (-p): ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo, or 0–9. Applied before every other option. |
--tune | none | Applied after the preset (-t): psnr, ssim, grain, zerolatency, fastdecode, animation. grain turns off AQ, cuTree and SAO, flattens the frame-type QP ratios and raises psy-rd. |
Quad-Tree size and depth
| Parameter | Default | Meaning |
|---|---|---|
--ctu | 64 | Largest coding unit: 64, 32 or 16 (-s). 64 compresses flat areas best; ultrafast and superfast use 32. |
--min-cu-size | 8 | Smallest coding unit: 8, 16, 32 or 64. Larger is faster and costs bitrate. |
--max-tu-size | 32 | Largest transform: 32, 16, 8 or 4; never larger than --ctu. |
--tu-intra-depth | 1 | Extra transform-tree depth for intra CUs, 1–4 (1 = transform as large as the CU). slower and veryslow use 3, placebo 4. |
--tu-inter-depth | 1 | Extra transform-tree depth for inter CUs, 1–4. slower and veryslow use 3, placebo 4. |
--limit-tu | 0 (off) | Early exit from inter transform recursion, 1–4 (heavier heuristics at higher levels). Needs --tu-inter-depth 2 or more; slower uses 4. |
Analysis
| Parameter | Default | Meaning |
|---|---|---|
--rd | 3 | Rate-distortion level for mode decision, 1–6: 2 RDO for splits and merge/skip (ultrafast to fast), 3 RDO for mode and split, 4 same as 3 (slow), 5 adds RDO prediction decisions, 6 same as 5 (slower and above). |
--[no-]psy-rd | 2.0 | Psychovisual RD strength, 0–5.0: keeps source energy (detail, grain) instead of the lowest distortion. Takes effect at --rd 3 and above. |
--[no-]rdoq-level | 0 (off) | Rate-distortion optimised quantisation: 1 per-coefficient level decisions, 2 also drops whole coefficient groups. slow and slower presets use 2. |
--[no-]psy-rdoq | 0.0 (1.0 at slow and slower) | Psychovisual strength inside RDOQ, 0–50: keeps more high-frequency energy. Forced to 0 when --rdoq-level is 0, so at medium it only works if you also raise rdoq-level. |
--dynamic-rd | 0 (off) | Raise RD effort where VBV forces quality down, strength 0–4. Only with VBV, AQ on and --rd 4 or lower. |
--[no-]ssim-rd | off | Use SSIM-based distortion in mode decision; turns psy-rd off. --rd 3 and above. |
--[no-]rd-refine | off | Try several QPs on the best partition of each CU to find the best rounding. --rd 5–6 with AQ on. |
--[no-]early-skip | on | Check 2N×2N merge first and stop if it leaves no residual. The fast preset and slow and above turn it off. |
--rskip | 1 | Early exit from CU depth recursion: 0 off, 1 neighbour cost and homogeneity (or a 2N×2N inter comparison at --rd 5–6), 2 CU edge density. placebo and --tune grain use 0. |
--rskip-edge-threshold | 5 (%) | Edge density, in percent (0–100), below which --rskip 2 stops recursing. |
--[no-]tskip-fast | off | Evaluate transform skip only for 4×4 intra NxN blocks (chroma only where luma used it). Needs --tskip. |
--[no-]splitrd-skip | off | Skip split RD analysis of an intra CU once the split cost already exceeds the unsplit cost. |
--nr-intra | 0 (off) | Noise-reduction deadzone for intra blocks, 0–2000, applied to transform coefficients. Output then varies with the frame-thread count. |
--nr-inter | 0 (off) | Noise-reduction deadzone for inter blocks, 0–2000. |
--ctu-info | 0 (off) | API only: react to CTU information passed with x265_encoder_ctu_info (1, 2, 4 or 6). If set without calling it, the encoder waits forever. |
Coding tools
| Parameter | Default | Meaning |
|---|---|---|
--[no-]weightp | on | Weighted prediction in P slices (-w); large gains on fades and lighting changes. |
--[no-]weightb | off | Weighted prediction in B slices. On at slower and above. |
--[no-]cu-lossless | off | Also try lossless (transform and quantisation bypass) coding of each CU in RDO. --rd 3 and above. |
--[no-]signhide | on | Sign-bit hiding: one coefficient sign per TU is inferred from parity. |
--[no-]tskip | off | Try transform skip on 4×4 blocks; helps text and screen content. --rd 3 and above; placebo enables it. |
Temporal / motion search options
| Parameter | Default | Meaning |
|---|---|---|
--max-merge | 3 | Merge candidates, 1–5. Faster presets use 2, slower 4, veryslow and placebo 5. |
--ref | 3 | L0 reference frames, 1–16. With B-pyramid at most 6 stay within HEVC’s 8-picture limit; beyond that x265 aborts unless --allow-non-conformance. |
--limit-refs | 1 | Reference pruning: 0 off, 1 use the references chosen by the four sub-CUs, 2 limit rect/AMP to the 2N×2N choice, 3 both. |
--me | hex (1) | Integer-pel motion search: dia (0), hex (1), umh (2), star (3), sea (4), full (5). slow and above use star. |
--subme | 2 | Sub-pixel refinement effort, 0–7 (-m). slow uses 3, slower and veryslow 4, placebo 5. |
--merange | 57 | Motion search range in pixels; 57 fits a 64-pixel CTU without an extra row of latency. placebo uses 92. |
--[no-]rect | off | Evaluate rectangular partitions (N×2N, 2N×N). On at slow and above. |
--[no-]amp | off | Evaluate asymmetric 75/25 partitions; needs --rect. On at slower and above. |
--[no-]limit-modes | off | Skip rect/AMP modes that sub-CU costs mark as unlikely. On at slow and slower. |
--[no-]temporal-mvp | on | Temporal motion-vector predictors from the co-located picture. |
--[no-]hme | off | Three-level hierarchical motion estimation (1/16, 1/4 and full resolution). Needs 540 or more lines; replaces --me/--merange with the level-2 values. |
--hme-search | hex,umh,umh | Search method for each HME level (names or 0–5); one value applies to all levels. Setting it enables --hme. |
--hme-range | 16,32,48 | Search range for each HME level. Setting it enables --hme. |
Spatial / intra options
| Parameter | Default | Meaning |
|---|---|---|
--[no-]strong-intra-smoothing | on | Bilinear smoothing of 32×32 intra reference samples; reduces banding in smooth gradients. |
--[no-]constrained-intra | off | In inter slices, intra prediction uses only intra-coded neighbours, limiting error propagation. Alias --cip. |
--[no-]b-intra | on | Evaluate intra modes in B slices. Off in ultrafast to fast and in slow. |
--[no-]fast-intra | off | Coarse-to-fine angular intra search (about 10 of 33 modes). Used by ultrafast to fast; --rd 4 and lower. |
--rdpenalty | 0 (off) | Penalise 32×32 intra transforms in P/B slices: 1 quadruples their bit cost, 2 avoids them unless depth limits require them. Needs --tu-intra-depth 2+ to affect 32×32 CUs. |
Slice decision options
| Parameter | Default | Meaning |
|---|---|---|
--[no-]open-gop | on | Open GOP: keyframes after the first may be CRA pictures with leading pictures that reference the previous GOP. Use --no-open-gop when the stream is cut into independently decodable segments. |
--cra-nal | off | Code every frame after the first as a CRA picture; only valid with --keyint 1. |
--keyint | 250 | Maximum keyframe interval in frames (-I). -1 = a single keyframe, 1 = all-intra. |
--min-keyint | auto: min(fps, keyint/10), e.g. 24 at 24 fps | Scene cuts closer than this to the previous keyframe become non-IDR I-frames (-i). Set it equal to --keyint for a fixed GOP. |
--gop-lookahead | 0 | If a scene cut falls within this many frames after the --keyint limit, extend the GOP to it. Range 0 to --rc-lookahead minus the mini-GOP length. |
--no-scenecut | scene-cut detection on | Disable adaptive I-frame insertion; same as --scenecut 0. |
--scenecut | 40 | Scene-cut sensitivity; higher inserts more I-frames, 0 disables. |
--scenecut-bias | 5 | Inter/intra cost difference, in percent, that marks a scene cut (5 = inter cost at least 95% of intra cost). Upstream recommends 5–15. |
--hist-scenecut | off | Detect scene cuts from histograms, intensity and variance of the picture. |
--no-hist-scenecut | histogram detection off | Disable histogram-based scene-cut detection. |
--[no-]fades | off | Detect fade-ins and handle them in frame-type decisions. |
--scenecut-aware-qp | 0 (off) | Second pass only: raise the QP of inter frames after (1), before (2) or on both sides of (3) a scene cut, where the cut masks the loss. |
--masking-strength | built-in (1200 ms forward, 600 ms backward windows) | Windows (ms) and QP offsets for --scenecut-aware-qp: window,refQpDelta,nonRefQpDelta per direction, or six such triples per direction. |
--scenecut-qp-config | unset | File with --scenecut-aware-qp and --masking-strength settings for the second pass. CLI only. |
--radl | 0 | RADL leading pictures before each IDR, 0 to --bframes. Closed GOP only; upstream suggests 2–3 when used. |
--intra-refresh | off | Periodic intra refresh: a column of intra blocks sweeps across the picture every --keyint frames instead of IDR frames. For low-latency streams; forces one reference and turns off open GOP and scene cuts. |
--rc-lookahead | 20 | Frames analysed ahead for frame types, cuTree and rate control, up to 250. Must exceed --bframes or x265 refuses to start. slow uses 25, slower and veryslow 40, placebo 60. |
--lookahead-slices | 8 (0 below 720 lines) | Split lookahead cost estimates into slices for parallelism, at some cost in decision accuracy. Capped by height (4 at 720p, 6 at 1080p); slow uses 4, slower and above 0. |
--lookahead-threads | 0 (shared pool) | Threads dedicated to the lookahead, up to half the hardware threads. |
--bframes | 4 | Maximum consecutive B-frames, 0–16 (-b). slower and above use 8; 0 gives a low-latency I/P stream. |
--bframe-bias | 0 | Bias toward B-frames in frame-type decisions, −90 to 100. |
--b-adapt | 2 | B-frame placement: 0 fixed pattern, 1 fast, 2 full trellis. ultrafast to fast use 0. |
--[no-]b-pyramid | on | Use B-frames as references. |
--qpfile | unset | Force frame types and optionally QPs: one frame type [QP] per line, types I i K P B b. |
--force-flush | 0 | Flushing (API): 0 only at end of input, 1 flush all frames immediately, 2 flush frames whose type is decided. |
--[no-]hrd-concat | off | Set the concatenation flag in the first buffering-period SEI; for every chunk after the first in chunked encoding. |
Rate control, Adaptive Quantization
| Parameter | Default | Meaning |
|---|---|---|
--bitrate | 0 (CRF mode) | Average bitrate in kbit/s: one-pass ABR, or the target for --pass. |
--qp | unset (CRF mode) | Constant QP for P frames, 0–51 (-q); I and B follow --ipratio/--pbratio. Turns off AQ and cuTree. QP 0 is not lossless. |
--crf | 28.0 | Constant rate factor, 0–51; lower means higher quality and larger files. The default rate-control mode. |
--[no-]lossless | off | Bypass transform, quantisation and loop filters for bit-exact output; rate-control options are ignored. |
--crf-max | 0 (off) | Highest rate factor a frame may reach under CRF with VBV; can cause VBV underflows. |
--crf-min | 0 (off) | Lowest rate factor a frame may get under CRF with VBV. |
--vbv-maxrate | 0 (off) | VBV maximum rate in kbit/s. With --vbv-bufsize it caps a CRF encode or constrains ABR. |
--vbv-bufsize | 0 (off) | VBV buffer size in kbit. |
--vbv-init | 0.9 | Initial buffer fill: a fraction of the buffer (up to 1) or kbit. |
--vbv-end | 0 (off) | Required final buffer fill (fraction or kbit), so separately encoded chunks join without VBV violations. |
--min-vbv-fullness | 50 | Minimum buffer fullness, in percent, that rate control tries to keep. Experimental. |
--max-vbv-fullness | 80 | Maximum buffer fullness, in percent. Experimental. |
--vbv-end-fr-adj | 0 | Fraction of the frames after which QP is steered toward --vbv-end; needs a known frame count. |
--chunk-start | 0 (off) | First frame written to the bitstream; earlier frames are encoded and discarded. Closed GOP only. |
--chunk-end | 0 (off) | Last frame written; later frames feed only the lookahead. Closed GOP only. |
--pass | 0 (off) | Multipass: 1 writes statistics, 2 reads them (final pass), 3 reads and rewrites them (middle passes). |
--[no-]multi-pass-opt-analysis | off | Reuse first-pass analysis (MVs, depths, modes) in the final pass. Not with --analysis-save/--analysis-load. |
--[no-]multi-pass-opt-distortion | off | Lower the QP of CTUs that had high distortion in the first pass, raise it for low-distortion CTUs. |
--[no-]vbv-live-multi-pass | off | In the second pass, adjust QP from the live VBV fill to reduce violations (ABR with VBV). Experimental. |
--stats | x265_2pass.log | Multipass statistics file; a .cutree file is written next to it. |
--[no-]analyze-src-pics | off | Run motion estimation on source pictures instead of reconstructed ones. |
--[no-]slow-firstpass | on | Run the first pass with full settings. --no-slow-firstpass uses a faster first pass (rd 2, dia search, one reference, no rect/AMP). |
--strict-cbr | off | ABR: hold the bitrate tightly, prioritising rate over quality (also sets --pbratio 1.0). For short segments that must not overshoot. |
--analysis-save | unset | Save analysis data for a later encode of the same source; amount set by --analysis-save-reuse-level. |
--analysis-load | unset | Load analysis data saved by an earlier encode of the same source to skip work. |
--analysis-reuse-file | x265_analysis.dat | File used by --multi-pass-opt-analysis and --multi-pass-opt-distortion. |
--analysis-reuse-level | 0 | Deprecated: sets both save and load reuse levels. |
--analysis-save-reuse-level | 0 (5 when saving) | How much analysis to save, 1 (lookahead only) to 10 (everything). 0 becomes 5 with --analysis-save. |
--analysis-load-reuse-level | 0 (5 when loading) | How much saved analysis to reuse, 1–10. 0 becomes 5 with --analysis-load. |
--refine-analysis-type | off | Reuse analysis passed through the API from an avc or hevc encode. |
--scale-factor | 0 | Resolution ratio between the saving and the loading encode (2 when 1080p reuses 540p analysis). |
--refine-intra | 0 | Intra refinement when loading analysis: 0 reuse mode and depth, up to 4 re-analyse every intra block. |
--refine-inter | 0 | Inter refinement when loading analysis: 0 reuse mode and depth, up to 3 re-evaluate all inter modes at the reused depth. |
--[no-]dynamic-refine | off | Pick the --refine-inter level per CU from the content. |
--refine-mv | 1 | MV refinement for scaled analysis reuse: 1 search around the scaled MV, 2 also the best AMVP candidate, 3 also the other candidate. |
--refine-ctu-distortion | 0 | 1 stores CTU distortion with --analysis-save and normalises it on --analysis-load. |
--aq-mode | 2 | Adaptive quantisation: 0 off, 1 uniform, 2 auto-variance, 3 auto-variance biased toward dark scenes (helps banding in 8-bit and low-bitrate encodes), 4 auto-variance with edge information. Constant QP turns AQ off; mode 0 with cuTree on becomes mode 1 at strength 0. |
--[no-]hevc-aq | off | Alternative AQ using the minimum variance of sub-blocks; replaces the other AQ modes. |
--aq-strength | 1.0 | AQ strength, 0–3.0; 0 disables the AQ offsets. |
--qp-adaptation-range | 1.0 | Maximum delta-QP range for --hevc-aq, 1.0–6.0. |
--[no-]aq-motion | off | Raise QP for blocks that move relative to the frame. Experimental. |
--[no-]sbrc | off | Segment-based rate control: capped CRF per keyframe-interval segment. Needs CRF with VBV; forces closed, fixed-length GOPs. Experimental. |
--qg-size | 32 | Quantisation-group size (64, 32, 16 or 8): the smallest block that gets its own AQ offset. Clamped to the CU size range. |
Foveated encoding options (gaze-contingent per-QG QP mapping)
| Parameter | Default | Meaning |
|---|---|---|
--fovea-gaze | -1,-1 (frame centre) | Gaze point in pixels; negative values use the frame centre. |
--fovea-delta | 0 (off) | QP increase at the periphery, 5–40; 0 disables foveated encoding. |
--fovea-sigma | 0 (auto: 95 px) | Gaussian radius of the sharp region in pixels; 0 uses 95 px (about 2.5° at 60 cm). |
--fovea-gaze-file | unset | Per-frame gaze points, one frame x y per line; overrides --fovea-gaze. |
Quantizer curve, chroma offsets and zones
| Parameter | Default | Meaning |
|---|---|---|
--[no-]cutree | on | Lower the QP of blocks that later frames reference heavily, using lookahead motion data. --tune grain and --tune zerolatency turn it off. |
--[no-]rc-grain | off | Rate control that minimises QP fluctuation so grain does not pulse; part of --tune grain. |
--ipratio | 1.4 | QP factor between I and P frames. |
--pbratio | 1.3 | QP factor between P and B frames. |
--qcomp | 0.6 | Quantiser curve compression, 0.5–1.0: lower holds bitrate steadier, 1.0 approaches constant QP. Also scales cuTree strength. |
--qpstep | 4 | Largest QP change between frames allowed to rate control. |
--qpmin | 0 | Lowest QP rate control may use. |
--qpmax | 69 | Highest QP rate control may use. |
--[no-]const-vbv | off | Make VBV decisions repeatable between runs; part of --tune grain. |
--cbqpoffs | 0 | Cb QP offset from luma, −12 to 12; negative spends more bits on chroma. With 4:4:4 input and psy-rd on, x265 sets 6 for both offsets if neither is given. |
--crqpoffs | 0 | Cr QP offset from luma, −12 to 12. |
--scaling-list | off | Quantisation scaling lists: off, default (the HEVC default lists) or an HM-format file. |
--zones | unset | Per-range overrides separated by /: start,end,q=QP or start,end,b=multiplier. Later zones win. |
--zonefile | unset | File of frame options… lines that reconfigure the encoder from that frame on. Forces closed GOP and repeated headers. CLI only. |
--no-zonefile-rc-init | rate control reset per zone | Keep rate-control history across zonefile zones. |
--lambda-file | unset | Replacement lambda tables (70 values each for lambda and lambda²). Process-global; for experiments. |
--max-ausize-factor | 1.0 | Fraction (0.5–1.0) of the specification’s maximum access-unit size to allow. |
Loop filters (deblock and SAO)
| Parameter | Default | Meaning |
|---|---|---|
--[no-]deblock | on, 0:0 | Deblocking filter with optional tC:beta offsets from −6 to 6; negative values filter less (sharper, more blocking risk). --no-deblock disables it. |
--[no-]sao | on | Sample adaptive offset filter. Cleans ringing and banding but also softens fine texture; often turned off for high-quality and grainy encodes (--tune grain does). |
--[no-]sao-non-deblock | off | Analyse SAO on non-deblocked pixels instead of skipping the right/bottom CTU edges. |
--[no-]limit-sao | off | End SAO analysis early using mode and neighbour heuristics; faster, slightly less effective. |
--selective-sao | 0 stored; 4 (all slices) when SAO is on | SAO per slice type: 1 I only, 2 I and P, 3 all reference slices, 4 all slices. With SAO on, 0 is promoted to 4; with --no-sao it stays 0, and any non-zero value turns SAO back on. |
VUI options
| Parameter | Default | Meaning |
|---|---|---|
--sar | 0 (undefined; Y4M header if present) | Sample aspect ratio: index 1–16 (1 = 1:1) or w:h. |
--display-window | unset | Default display window: left,top,right,bottom pixels for the player to crop. Signaling only. |
--overscan | not signaled | show or crop overscan hint. |
--videoformat | not signaled | Original analog format: component, pal, ntsc, secam, mac, unknown. |
--range | not signaled (players assume limited) | limited or full. Signaling only; samples are not converted. |
--colorprim | not signaled | Colour primaries, e.g. bt709, bt2020, smpte432. Signaling only. |
--transfer | not signaled | Transfer characteristics, e.g. bt709, smpte2084 (PQ), arib-std-b67 (HLG). Signaling only. |
--colormatrix | not signaled | Matrix coefficients, e.g. bt709, bt2020nc, ictcp. Signaling only. |
--chromaloc | not signaled | Chroma sample location type 0–5 (HDR10 4:2:0 normally uses 2). |
--master-display | unset | SMPTE ST 2086 mastering display SEI: G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min), chromaticities in 0.00002 units and luminance in 0.0001 cd/m². Copy it from the source. Turns on HDR10 SEI. |
--max-cll | 0,0 (unset) | Content light level SEI as MaxCLL,MaxFALL in cd/m². Turns on HDR10 SEI. |
--video-signal-type-preset | unset | Set primaries, transfer, matrix, range and chroma location at once, e.g. BT709_YCC or BT2100_PQ_YCC, optionally with :P3D65x1000n0005 for the mastering display. Overrides the individual options. |
--[no-]cll | on | Include the content light level SEI (0,0 when --max-cll is unset) whenever HDR10 SEI is written. |
--[no-]hdr10 | off | Force HDR10 SEI even with zero values. Implied by --master-display or --max-cll; also turns on repeated headers. |
--[no-]hdr-opt | off | Deprecated alias of --hdr10-opt. |
--[no-]hdr10-opt | off | Block-level luma and chroma QP adjustment for HDR10; only for 10-bit 4:2:0 BT.2020 PQ sources (otherwise disabled). Use with AQ. |
--min-luma | 0 | Clip input luma below this value. |
--max-luma | bit-depth maximum (255 at 8-bit, 1023 at 10-bit) | Clip input luma above this value. |
Bitstream options
| Parameter | Default | Meaning |
|---|---|---|
--[no-]repeat-headers | off | Repeat VPS/SPS/PPS at every keyframe, for raw streams that must be decodable from any keyframe. Turned on automatically for HDR metadata, zonefiles, all-intra and --uhd-bd. |
--[no-]info | on | Write an SEI with the x265 version and full settings string. |
--[no-]hrd | off | Signal HRD parameters with buffering-period and picture-timing SEI. Needs VBV; ignored without it. |
--[no-]idr-recovery-sei | off | Recovery point SEI at each IDR. |
--temporal-layers | 0 (off) | Temporal sub-layers, 2–5. 3, 4 and 5 fix the mini-GOP at 3, 7 and 15 B-frames and turn off adaptive B placement. |
--[no-]aud | off | Access unit delimiter NAL units. |
--[no-]eob | off | End-of-bitstream NAL unit at the end. |
--[no-]eos | off | End-of-sequence NAL unit after each coded video sequence. |
--hash | 0 (off) | Decoded picture hash SEI for decoder checks: 1 MD5, 2 CRC, 3 checksum. |
--atc-sei | off | Alternative transfer characteristics SEI with this preferred transfer value; used for HLG (--atc-sei 18). |
--pic-struct | -1 (not signaled) | pic_struct value, 0–12, in the picture timing SEI. |
--log2-max-poc-lsb | 8 | Bits for the picture order count LSB in slice headers (minimum 4). |
--[no-]vui-timing-info | on | Frame-rate timing information in the VUI. |
--[no-]vui-hrd-info | on | HRD parameters in the VUI when --hrd is on. |
--[no-]opt-qp-pps | off | Set the PPS initial QP from the previous GOP instead of 26; needs repeated headers. |
--[no-]opt-ref-list-length-pps | off | Set the PPS L0/L1 list lengths from the previous GOP instead of 0. |
--[no-]multi-pass-opt-rps | off | In multipass encodes, store the most used reference picture sets in the SPS. |
--[no-]opt-cu-delta-qp | off | Pull low CU QPs toward the frame mean to reduce delta-QP signaling. --rd 5–6. |
Reconstructed output, temporal filter and ABR ladder
| Parameter | Default | Meaning |
|---|---|---|
--recon | unset | Write reconstructed pictures (-r): Y4M for a .y4m name, raw YUV otherwise. For debugging. |
--recon-depth | output bit depth | Bit depth of the --recon file. |
--recon-y4m-exec | unset | Pipe reconstructed Y4M to a viewer command, e.g. "ffplay -i pipe:0 -autoexit". |
--lowpass-dct | off | Low-pass subband DCT approximation for 16×16 and 32×32 blocks: up to about 10% faster with a small efficiency loss. Experimental. |
--[no-]frame-dup | off | Replace 2–3 near-identical frames with one and signal frame doubling/tripling in pic_struct. Needs VBV and --hrd. |
--dup-threshold | 70 | Similarity threshold (PSNR) for --frame-dup, 1–99. A non-default value turns frame duplication on. |
--[no-]mcstf | off | Motion-compensated spatio-temporal filter: denoises I and P frames before encoding, saving bits on noisy sources. |
--mcstf-ref-range | 2 (1 when --preset ultrafast–medium is given) | Frames on each side used by --mcstf, 1–4. The ultrafast to medium preset definitions set 1, so an explicit --preset medium gives 1 while omitting --preset leaves 2. |
--[no-]selective-mcstf | off | Apply MCSTF only to GOPs estimated as noisy; implies --mcstf. |
--abr-ladder | unset | Config file listing several encodes ([id:reuse-level:ref-id] options per line) run together with analysis reuse. Experimental; CLI only. |
SEI message options
| Parameter | Default | Meaning |
|---|---|---|
--film-grain | unset | Binary film grain characteristics model to write as an FGC SEI; the decoder synthesises the grain. x265 does not estimate or remove grain. |
--aom-film-grain | unset | Binary AOM film grain parameters to carry in an SEI message. |
--[no-]frame-rc | off | API: allow per-frame QP, CRF or bitrate changes through x265_encoder_reconfig. |
Additional accepted flags, aliases and legacy declarations
| Parameter | Default | Meaning |
|---|---|---|
--numa-pools | auto | Alias of --pools. |
--no-cu-stats | off | Turn off the deprecated CU statistics flag. |
--cu-stats | off | Deprecated; 4.3 only prints a warning. |
--frame-skip | 0 | Alias of --seek. |
--no-fast-cbf | rejected | Declared by the CLI but rejected by the 4.3 parser (“invalid argument”). |
--fast-cbf | rejected | Declared by the CLI but rejected by the 4.3 parser. |
--cip | off | Alias of --constrained-intra. |
--no-cip | off | Alias of --no-constrained-intra. |
--no-b-adapt | b-adapt 2 | Same as --b-adapt 0. |
--ratetol | rejected | Declared by the CLI but rejected by the 4.3 parser. |
--cplxblur | 20 | Temporal blur of frame complexity before the QP curve is built (ABR and multipass). |
--qblur | 0.5 | Temporal blur of QPs after the curve is built. |
--no-lft | deblocking on | Deprecated alias of --no-deblock. |
--lft | deblocking on | Deprecated alias of --deblock. |
--crop-rect | unset | Deprecated alias of --display-window. |
--no-dither | rejected | Declared but rejected by the 4.3 parser; dithering is off unless --dither is given. |
--analysis-reuse-mode | 0 (off) | Deprecated and ignored; use --analysis-save/--analysis-load. |
--hdr | off | Deprecated alias of --hdr10. |
--no-hdr | off | Deprecated alias of --no-hdr10. |
--no-dhdr10-opt | off | Turn off --dhdr10-opt. |
--single-sei | off | Put all SEI messages of an access unit in one NAL unit. The HM decoder warns about this when HRD SEI is present. |
--no-single-sei | off | One NAL unit per SEI message. |
--no-svt | SVT-HEVC builds only | Use x265’s own encoder instead of SVT-HEVC. |
--no-svt-hme | SVT-HEVC builds only | Turn off SVT-HEVC hierarchical motion estimation. |
--no-svt-compressed-ten-bit-format | SVT-HEVC builds only | Turn off SVT-HEVC packed 10-bit input. |
--no-svt-speed-control | SVT-HEVC builds only | Turn off SVT-HEVC speed control. |
--no-svt-fps-in-vps | SVT-HEVC builds only | Leave timing information out of the VPS (SVT-HEVC). |
Conditional build features
| Parameter | Default | Meaning |
|---|---|---|
--dhdr10-info | unset (HDR10+ builds) | JSON file of HDR10+ (SMPTE ST 2094-40) dynamic metadata to insert per frame. Needs a build with ENABLE_HDR10_PLUS. |
--dhdr10-opt | off (HDR10+ builds) | Insert HDR10+ SEI only at IDRs and when the metadata changes. |
--alpha | off (ENABLE_ALPHA builds) | Encode an alpha auxiliary layer; input must be YUVA 4:2:0. |
--num-views | 1 (ENABLE_MULTIVIEW builds) | Number of views for MV-HEVC; normally set in --multiview-config. |
--multiview-config | unset (ENABLE_MULTIVIEW builds) | File with --num-views, --format and one --input per view. |
--format | 0 (ENABLE_MULTIVIEW builds) | Multiview input layout: 0 separate files, 1 side by side, 2 top and bottom. |
--scc | 0 (ENABLE_SCC_EXT builds) | Screen content coding with intra block copy: 1 limited search, 2 full search. |
--svt | off (SVT-HEVC builds only) | Encode with the SVT-HEVC library instead of x265’s encoder. |
--svt-hme | on (SVT-HEVC builds only) | SVT-HEVC hierarchical motion estimation. |
--svt-search-width | resolution-dependent (SVT-HEVC builds only) | SVT-HEVC motion search width, 1–256. |
--svt-search-height | resolution-dependent (SVT-HEVC builds only) | SVT-HEVC motion search height, 1–256. |
--svt-compressed-ten-bit-format | off (SVT-HEVC builds only) | Accept SVT-HEVC’s packed 10-bit input format. |
--svt-speed-control | off (SVT-HEVC builds only) | Adjust SVT-HEVC speed to reach --fps in real time. |
--svt-preset-tuner | unset (SVT-HEVC builds only) | With --preset placebo, select SVT-HEVC preset 0 or 1. |
--svt-hierarchical-level | 3 (SVT-HEVC builds only) | SVT-HEVC hierarchy: 0 flat to 3 four levels. |
--svt-base-layer-switch-mode | 0 (SVT-HEVC builds only) | SVT-HEVC base layer: 0 B-frames, 1 P-frames. |
--svt-pred-struct | 2 (SVT-HEVC builds only) | SVT-HEVC prediction structure: 0 low-delay P, 1 low-delay B, 2 random access. |
--svt-fps-in-vps | off (SVT-HEVC builds only) | Timing information in the VPS (SVT-HEVC). |
Complete FFmpeg libx265 private options
Section titled “Complete FFmpeg libx265 private options”FFmpeg 9.0.2’s libx265 wrapper adds the private options below. Several x265 settings come from FFmpeg’s generic options instead: -b:v (ABR bitrate), -maxrate and -bufsize (VBV), -g, -keyint_min, -bf, -refs, -qmin/-qmax and -pass. The output bit depth follows -pix_fmt (for example yuv420p10le loads the 10-bit libx265). Anything else goes through -x265-params.
All libx265 private options
| Parameter | Type | Default | Range | Meaning |
|---|---|---|---|---|
-crf | float | -1 | -1 to FLT_MAX | x265 CRF (0–51). -1 passes nothing, so x265’s CRF 28 applies unless -b:v or -qp is set. Takes priority over -b:v and -qp. |
-qp | int | -1 | -1 to INT_MAX | Constant QP; used only when neither -crf nor -b:v is set. |
-forced-idr | boolean | false | 0 to 1 | Code forced keyframes (e.g. from -force_key_frames) as IDR instead of I/CRA frames. |
-preset | string | unset | x265 preset name | x265 preset; unset gives x265’s defaults, which match medium. |
-tune | string | unset | x265 tune name | x265 tune (psnr, ssim, grain, zerolatency, fastdecode, animation). |
-profile | string | unset | x265 profile name | Enforce a profile such as main10 or main422-10. It does not change the bit depth or chroma format; -pix_fmt does. |
-x265-stats | string | unset | file name | Statistics file for -pass 1/-pass 2 (x265 --stats); x265 uses x265_2pass.log when unset. |
-udu_sei | boolean | false | 0 to 1 | Copy user-data-unregistered SEI from the input frames into the output. |
-a53cc | boolean | false | 0 to 1 | Copy A/53 closed captions from the input frames into SEI. |
-x265-params | dictionary | unset | key=value:key=value | Any x265 library option without the leading --, e.g. -x265-params aq-mode=3:sao=0. Applied after the preset, tune and generic options. CLI-only options (input, output, dither, seek…) do not exist here, and unknown names or bad values only log a warning. |
-dolbyvision | boolean | auto | -1 (auto) to 1 | Write Dolby Vision RPUs regenerated from the per-frame Dolby Vision metadata of the input (a decoded Dolby Vision source). auto enables it when that metadata is present, 0 disables it, 1 fails if it cannot. Profiles 5 and 8.x only (10-bit 4:2:0); profile 7 enhancement layers are not supported. |