Untitled diff

Created Diff never expires
--help, -h
--help, -h
Display help text
Display help text
CLI ONLY
CLI ONLY
--version, -V
--version, -V
Display version details
Display version details
CLI ONLY
CLI ONLY
Command line executable return codes:
0. encode successful
1. unable to parse command line
2. unable to open encoder
3. unable to generate stream headers
4. encoder abort
Logging/Statistic Options
Logging/Statistic Options
--log-level <integer|string>
--log-level <integer|string>
Logging level. Debug level enables per-frame QP, metric, and bitrate logging. If a CSV file is being generated, debug level makes the log be per-frame rather than per-encode. Full level enables hash and weight logging. -1 disables all logging, except certain fatal errors, and can be specified by the string “none”.
Logging level. Debug level enables per-frame QP, metric, and bitrate logging. If a CSV file is being generated, frame level makes the log be per-frame rather than per-encode. Full level enables hash and weight logging. -1 disables all logging, except certain fatal errors, and can be specified by the string “none”.
error
error
warning
warning
info (default)
info (default)
frame
debug
debug
full
full
--no-progress
--no-progress
Disable periodic progress reports from the CLI
Disable periodic progress reports from the CLI
CLI ONLY
CLI ONLY
--csv <filename>
--csv <filename>
Writes encoding results to a comma separated value log file. Creates the file if it doesnt already exist, else adds one line per run. if --log-level is debug or above, it writes one line per frame. Default none
Writes encoding results to a comma separated value log file. Creates the file if it doesnt already exist, else adds one line per run. if --log-level is frame or above, it writes one line per frame. Default none
When frame level logging is enabled, several frame performance statistics are listed:
DecideWait ms number of milliseconds the frame encoder had to wait, since the previous frame was retrieved by the API thread, before a new frame has been given to it. This is the latency introduced by slicetype decisions (lookahead).
Row0Wait ms number of milliseconds since the frame encoder received a frame to encode before its first row of CTUs is allowed to begin compression. This is the latency introduced by reference frames making reconstructed and filtered rows available.
Wall time ms number of milliseconds between the first CTU being ready to be compressed and the entire frame being compressed and the output NALs being completed.
Ref Wait Wall ms number of milliseconds between the first reference row being available and the last reference row becoming available.
Total CTU time ms the total time (measured in milliseconds) spent by worker threads compressing and filtering CTUs for this frame.
Stall Time ms the number of milliseconds of the reported wall time that were spent with zero worker threads, aka all compression was completely stalled.
Avg WPP the average number of worker threads working on this frame, at any given time. This value is sampled at the completion of each CTU. This shows the effectiveness of Wavefront Parallel Processing.
Row Blocks the number of times a worker thread had to abandon the row of CTUs it was encoding because the row above it was not far enough ahead for the necessary reference data to be available. This is more of a problem for P frames where some blocks are much more expensive than others.
--cu-stats, --no-cu-stats
--cu-stats, --no-cu-stats
Records statistics on how each CU was coded (split depths and other mode decisions) and reports those statistics at the end of the encode. Default disabled
Records statistics on how each CU was coded (split depths and other mode decisions) and reports those statistics at the end of the encode. Default disabled
--ssim, --no-ssim
--ssim, --no-ssim
Calculate and report Structural Similarity values. It is recommended to use --tune ssim if you are measuring ssim, else the results should not be used for comparison purposes. Default disabled
Calculate and report Structural Similarity values. It is recommended to use --tune ssim if you are measuring ssim, else the results should not be used for comparison purposes. Default disabled
--psnr, --no-psnr
--psnr, --no-psnr
Calculate and report Peak Signal to Noise Ratio. It is recommended to use --tune psnr if you are measuring PSNR, else the results should not be used for comparison purposes. Default disabled
Calculate and report Peak Signal to Noise Ratio. It is recommended to use --tune psnr if you are measuring PSNR, else the results should not be used for comparison purposes. Default disabled
Performance Options
Performance Options
--asm <integer:false:string>, --no-asm
--asm <integer:false:string>, --no-asm
x265 will use all detected CPU SIMD architectures by default. You can disable all assembly by using --no-asm or you can specify a comma separated list of SIMD architectures to use, matching these strings: MMX2, SSE, SSE2, SSE3, SSSE3, SSE4, SSE4.1, SSE4.2, AVX, XOP, FMA4, AVX2, FMA3
x265 will use all detected CPU SIMD architectures by default. You can disable all assembly by using --no-asm or you can specify a comma separated list of SIMD architectures to use, matching these strings: MMX2, SSE, SSE2, SSE3, SSSE3, SSE4, SSE4.1, SSE4.2, AVX, XOP, FMA4, AVX2, FMA3
Some higher architectures imply lower ones being present, this is handled implicitly.
Some higher architectures imply lower ones being present, this is handled implicitly.
One may also directly supply the CPU capability bitmap as an integer.
One may also directly supply the CPU capability bitmap as an integer.
--frame-threads, -F <integer>
--frame-threads, -F <integer>
Number of concurrently encoded frames. Using a single frame thread gives a slight improvement in compression, since the entire reference frames are always available for motion compensation, but it has severe performance implications. Default is an autodetected count based on the number of CPU cores and whether WPP is enabled or not.
Number of concurrently encoded frames. Using a single frame thread gives a slight improvement in compression, since the entire reference frames are always available for motion compensation, but it has severe performance implications. Default is an autodetected count based on the number of CPU cores and whether WPP is enabled or not.
Over-allocation of frame threads will not improve performance, it will generally just increase memory use.
Over-allocation of frame threads will not improve performance, it will generally just increase memory use.
--threads <integer>
Values: any value between 8 and 16. Default is 0, auto-detect
--pools <string>, --numa-pools <string>
Comma seperated list of threads per NUMA node. If “none”, then no worker pools are created and only frame parallelism is possible. If NULL or “” (default) x265 will use all available threads on each NUMA node:
'+' is a special value indicating all cores detected on the node
'*' is a special value indicating all cores detected on the node and all remaining nodes
'-' is a special value indicating no cores on the node, same as '0'
example strings for a 4-node system:
"" - default, unspecified, all numa nodes are used for thread pools
"*" - same as default
"none" - no thread pools are created, only frame parallelism possible
"-" - same as "none"
"10" - allocate one pool, using up to 10 cores on node 0
"-,+" - allocate one pool, using all cores on node 1
"+,-,+" - allocate two pools, using all cores on nodes 0 and 2
"+,-,+,-" - allocate two pools, using all cores on nodes 0 and 2
"-,*" - allocate three pools, using all cores on nodes 1, 2 and 3
"8,8,8,8" - allocate four pools with up to 8 threads in each pool
The total number of threads will be determined by the number of threads assigned to all nodes. The worker threads will each be given affinity for their node, they will not be allowed to migrate between nodes, but they will be allowed to move between CPU cores within their node.
If the three pool features: --wpp --pmode and --pme are all disabled, then --pools is ignored and no thread pools are created.
If “none” is specified, then all three of the thread pool features are implicitly disabled.
Number of threads to allocate for the worker thread pool This pool is used for WPP and for distributed analysis and motion search: --wpp --pmode and --pme respectively.
Multiple thread pools will be allocated for any NUMA node with more than 64 logical CPU cores. But any given thread pool will always use at most one NUMA node.
If --threads 1 is specified, then no thread pool is created. When no thread pool is created, all the thread pool features are implicitly disabled. If all the pool features are disabled by the user, then the pool is implicitly disabled.
Frame encoders are distributed between the available thread pools, and the encoder will never generate more thread pools than --frame-threads. The pools are used for WPP and for distributed analysis and motion search.
Default 0, one thread is allocated per detected hardware thread (logical CPU cores)
Default “”, one thread is allocated per detected hardware thread (logical CPU cores) and one thread pool per NUMA node.
--wpp, --no-wpp
--wpp, --no-wpp
Enable Wavefront Parallel Processing. The encoder may begin encoding a row as soon as the row above it is at least two CTUs ahead in the encode process. This gives a 3-5x gain in parallelism for about 1% overhead in compression efficiency.
Enable Wavefront Parallel Processing. The encoder may begin encoding a row as soon as the row above it is at least two CTUs ahead in the encode process. This gives a 3-5x gain in parallelism for about 1% overhead in compression efficiency.
This feature is implicitly disabled when no thread pool is present.
This feature is implicitly disabled when no thread pool is present.
Default: Enabled
Default: Enabled
--pmode, --no-pmode
--pmode, --no-pmode
Parallel mode decision, or distributed mode analysis. When enabled the encoder will distribute the analysis work of each CU (merge, inter, intra) across multiple worker threads. Only recommended if x265 is not already saturating the CPU cores. In RD levels 3 and 4 it will be most effective if –rect is enabled. At RD levels 5 and 6 there is generally always enough work to distribute to warrant the overhead, assuming your CPUs are not already saturated.
Parallel mode decision, or distributed mode analysis. When enabled the encoder will distribute the analysis work of each CU (merge, inter, intra) across multiple worker threads. Only recommended if x265 is not already saturating the CPU cores. In RD levels 3 and 4 it will be most effective if –rect is enabled. At RD levels 5 and 6 there is generally always enough work to distribute to warrant the overhead, assuming your CPUs are not already saturated.
–pmode will increase utilization without reducing compression efficiency. In fact, since the modes are all measured in parallel it makes certain early-outs impractical and thus you usually get slightly better compression when it is enabled (at the expense of not skipping improbable modes). This bypassing of early-outs can cause pmode to slow down encodes, especially at faster presets.
–pmode will increase utilization without reducing compression efficiency. In fact, since the modes are all measured in parallel it makes certain early-outs impractical and thus you usually get slightly better compression when it is enabled (at the expense of not skipping improbable modes). This bypassing of early-outs can cause pmode to slow down encodes, especially at faster presets.
This feature is implicitly disabled when no thread pool is present.
This feature is implicitly disabled when no thread pool is present.
Default disabled
Default disabled
--pme, --no-pme
--pme, --no-pme
Parallel motion estimation. When enabled the encoder will distribute motion estimation across multiple worker threads when more than two references require motion searches for a given CU. Only recommended if x265 is not already saturating CPU cores. --pmode is much more effective than this option, since the amount of work it distributes is substantially higher. With –pme it is not unusual for the overhead of distributing the work to outweigh the parallelism benefits.
Parallel motion estimation. When enabled the encoder will distribute motion estimation across multiple worker threads when more than two references require motion searches for a given CU. Only recommended if x265 is not already saturating CPU cores. --pmode is much more effective than this option, since the amount of work it distributes is substantially higher. With –pme it is not unusual for the overhead of distributing the work to outweigh the parallelism benefits.
This feature is implicitly disabled when no thread pool is present.
This feature is implicitly disabled when no thread pool is present.
–pme will increase utilization on many core systems with no effect on the output bitstream.
–pme will increase utilization on many core systems with no effect on the output bitstream.
Default disabled
Default disabled
--preset, -p <integer|string>
--preset, -p <integer|string>
Sets parameters to preselected values, trading off compression efficiency against encoding speed. These parameters are applied before all other input parameters are applied, and so you can override any parameters that these values control. See presets for more detail.
Sets parameters to preselected values, trading off compression efficiency against encoding speed. These parameters are applied before all other input parameters are applied, and so you can override any parameters that these values control. See presets for more detail.
ultrafast
ultrafast
superfast
superfast
veryfast
veryfast
faster
faster
fast
fast
medium (default)
medium (default)
slow
slow
slower
slower
veryslow
veryslow
placebo
placebo
--tune, -t <string>
--tune, -t <string>
Tune the settings for a particular type of source or situation. The changes will be applied after --preset but before all other parameters. Default none. See tunings for more detail.
Tune the settings for a particular type of source or situation. The changes will be applied after --preset but before all other parameters. Default none. See tunings for more detail.
Values: psnr, ssim, grain, zero-latency, fast-decode.
Values: psnr, ssim, grain, zero-latency, fast-decode.
Input/Output File Options
Input/Output File Options
These options all describe the input video sequence or, in the case of --dither, operations that are performed on the sequence prior to encode. All options dealing with files (names, formats, offsets or frame counts) are only applicable to the CLI application.
These options all describe the input video sequence or, in the case of --dither, operations that are performed on the sequence prior to encode. All options dealing with files (names, formats, offsets or frame counts) are only applicable to the CLI application.
--input <filename>
--input <filename>
Input filename, only raw YUV or Y4M supported. Use single dash for stdin. This option name will be implied for the first “extra” command line argument.
Input filename, only raw YUV or Y4M supported. Use single dash for stdin. This option name will be implied for the first “extra” command line argument.
CLI ONLY
CLI ONLY
--y4m
--y4m
Parse input stream as YUV4MPEG2 regardless of file extension, primarily intended for use with stdin (ie: --input - --y4m). This option is implied if the input filename has a ”.y4m” extension
Parse input stream as YUV4MPEG2 regardless of file extension, primarily intended for use with stdin (ie: --input - --y4m). This option is implied if the input filename has a ”.y4m” extension
CLI ONLY
CLI ONLY
--input-depth <integer>
--input-depth <integer>
YUV only: Bit-depth of input file or stream
YUV only: Bit-depth of input file or stream
Values: any value between 8 and 16. Default is internal depth.
Values: any value between 8 and 16. Default is internal depth.
CLI ONLY
CLI ONLY
--dither
--dither
Enable high quality downscaling. Dithering is based on the diffusion of errors from one row of pixels to the next row of pixels in a picture. Only applicable when the input bit depth is larger than 8bits and internal bit depth is 8bits. Default disabled
Enable high quality downscaling. Dithering is based on the diffusion of errors from one row of pixels to the next row of pixels in a picture. Only applicable when the input bit depth is larger than 8bits and internal bit depth is 8bits. Default disabled
CLI ONLY
CLI ONLY
--input-res <wxh>
--input-res <wxh>
YUV only: Source picture size [w x h]
YUV only: Source picture size [w x h]
CLI ONLY
CLI ONLY
--input-csp <integer|string>
--input-csp <integer|string>
YUV only: Source color space. Only i420, i422, and i444 are supported at this time. The internal color space is always the same as the source color space (libx265 does not support any color space conversions).
YUV only: Source color space. Only i420, i422, and i444 are supported at this time. The internal color space is always the same as the source color space (libx265 does not support any color space conversions).
i400
i400
i420 (default)
i420 (default)
i422
i422
i444
i444
nv12
nv12
nv16
nv16
--fps <integer|float|numerator/denominator>
--fps <integer|float|numerator/denominator>
YUV only: Source frame rate
YUV only: Source frame rate
Range of values: positive int or float, or num/denom
Range of values: positive int or float, or num/denom
--interlaceMode <false|tff|bff>, --no-interlaceMode
--interlaceMode <false|tff|bff>, --no-interlaceMode
progressive pictures (default)
progressive pictures (default)
top field first
top field first
bottom field first
bottom field first
HEVC encodes interlaced content as fields. Fields must be provided to the encoder in the correct temporal order. The source dimensions must be field dimensions and the FPS must be in units of fields per second. The decoder must re-combine the fields in their correct orientation for display.
HEVC encodes interlaced content as fields. Fields must be provided to the encoder in the correct temporal order. The source dimensions must be field dimensions and the FPS must be in units of fields per second. The decoder must re-combine the fields in their correct orientation for display.
--seek <integer>
--seek <integer>
Number of frames to skip at start of input file. Default 0
Number of frames to skip at start of input file. Default 0
CLI ONLY
CLI ONLY
--frames, -f <integer>
--frames, -f <integer>
Number of frames of input sequence to be encoded. Default 0 (all)
Number of frames of input sequence to be encoded. Default 0 (all)
CLI ONLY
CLI ONLY
--output, -o <filename>
--output, -o <filename>
Bitstream output file name. If there are two extra CLI options, the first is implicitly the input filename and the second is the output filename, making the --output option optional.
Bitstream output file name. If there are two extra CLI options, the first is implicitly the input filename and the second is the output filename, making the --output option optional.
The output file will always contain a raw HEVC bitstream, the CLI does not support any container file formats.
The output file will always contain a raw HEVC bitstream, the CLI does not support any container file formats.
CLI ONLY
CLI ONLY
Profile, Level, Tier
Profile, Level, Tier
--profile <string>
--profile <string>
Enforce the requirements of the specified profile, ensuring the output stream will be decodable by a decoder which supports that profile. May abort the encode if the specified profile is impossible to be supported by the compile options chosen for the encoder (a high bit depth encoder will be unable to output bitstreams compliant with Main or Mainstillpicture).
Enforce the requirements of the specified profile, ensuring the output stream will be decodable by a decoder which supports that profile. May abort the encode if the specified profile is impossible to be supported by the compile options chosen for the encoder (a high bit depth encoder will be unable to output bitstreams compliant with Main or Mainstillpicture).
API users must use x265_param_apply_profile() after configuring their param structure. Any changes made to the param structure after this call might make the encode non-compliant.
API users must use x265_param_apply_profile() after configuring their param structure. Any changes made to the param structure after this call might make the encode non-compliant.
Values: main, main10, mainstillpicture, main422-8, main422-10, main444-8, main444-10
Values: main, main10, mainstillpicture, main422-8, main422-10, main444-8, main444-10
CLI ONLY
CLI ONLY
--level-idc <integer|float>
--level-idc <integer|float>
Minimum decoder requirement level. Defaults to 0, which implies auto-detection by the encoder. If specified, the encoder will attempt to bring the encode specifications within that specified level. If the encoder is unable to reach the level it issues a warning and aborts the encode. If the requested requirement level is higher than the actual level, the actual requirement level is signaled.
Minimum decoder requirement level. Defaults to 0, which implies auto-detection by the encoder. If specified, the encoder will attempt to bring the encode specifications within that specified level. If the encoder is unable to reach the level it issues a warning and aborts the encode. If the requested requirement level is higher than the actual level, the actual requirement level is signaled.
Beware, specifying a decoder level will force the encoder to enable VBV for constant rate factor encodes, which may introduce non-determinism.
Beware, specifying a decoder level will force the encoder to enable VBV for constant rate factor encodes, which may introduce non-determinism.
The value is specified as a float or as an integer with the level times 10, for example level 5.1 is specified as “5.1” or “51”, and level 5.0 is specified as “5.0” or “50”.
The value is specified as a float or as an integer with the level times 10, for example level 5.1 is specified as “5.1” or “51”, and level 5.0 is specified as “5.0” or “50”.
Annex A levels: 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2
Annex A levels: 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2
--high-tier, --no-high-tier
--high-tier, --no-high-tier
If --level-idc has been specified, the option adds the intention to support the High tier of that level. If your specified level does not support a High tier, a warning is issued and this modifier flag is ignored.
If --level-idc has been specified, the option adds the intention to support the High tier of that level. If your specified level does not support a High tier, a warning is issued and this modifier flag is ignored. If --level-idc has been specified, but not –high-tier, then the encoder will attempt to encode at the specified level, main tier first, turning on high tier only if necessary and available at that level.
--ref <1..16>
Max number of L0 references to be allowed. This number has a linear multiplier effect on the amount of work performed in motion search, but will generally have a beneficial affect on compression and distortion.
Note that x265 allows up to 16 L0 references but the HEVC specification only allows a maximum of 8 total reference frames. So if you have B frames enabled only 7 L0 refs are valid and if you have --b-pyramid enabled (which is enabled by default in all presets), then only 6 L0 refs are the maximum allowed by the HEVC specification. If x265 detects that the total reference count is greater than 8, it will issue a warning that the resulting stream is non-compliant and it signals the stream as profile NONE and level NONE but still allows the encode to continue. Compliant HEVC decoders may refuse to decode such streams.
Default 3
Note
Note
--profile, --level-idc, and --high-tier are only intended for use when you are targeting a particular decoder (or decoders) with fixed resource limitations and must constrain the bitstream within those limits. Specifying a profile or level may lower the encode quality parameters to meet those requirements but it will never raise them.
--profile, --level-idc, and --high-tier are only intended for use when you are targeting a particular decoder (or decoders) with fixed resource limitations and must constrain the bitstream within those limits. Specifying a profile or level may lower the encode quality parameters to meet those requirements but it will never raise them.
Mode decision / Analysis
Mode decision / Analysis
--rd <0..6>
--rd <0..6>
Level of RDO in mode decision. The higher the value, the more exhaustive the analysis and the more rate distortion optimization is used. The lower the value the faster the encode, the higher the value the smaller the bitstream (in general). Default 3
Level of RDO in mode decision. The higher the value, the more exhaustive the analysis and the more rate distortion optimization is used. The lower the value the faster the encode, the higher the value the smaller the bitstream (in general). Default 3
Note that this table aims for accuracy, but is not necessarily our final target behavior for each mode.
Note that this table aims for accuracy, but is not necessarily our final target behavior for each mode.
Level Description
Level Description
0 sa8d mode and split decisions, intra w/ source pixels
0 sa8d mode and split decisions, intra w/ source pixels
1 recon generated (better intra), RDO merge/skip selection
1 recon generated (better intra), RDO merge/skip selection
2 RDO splits and merge/skip selection
2 RDO splits and merge/skip selection
3 RDO mode and split decisions, chroma residual used for sa8d
3 RDO mode and split decisions, chroma residual used for sa8d
4 Adds RDO Quant
4 Currently same as 3
5 Adds RDO prediction decisions
5 Adds RDO prediction decisions
6 Currently same as 5
6 Currently same as 5
Range of values: 0: least .. 6: full RDO analysis
Range of values: 0: least .. 6: full RDO analysis
Options which affect the coding unit quad-tree, sometimes referred to as the prediction quad-tree.
Options which affect the coding unit quad-tree, sometimes referred to as the prediction quad-tree.
--ctu, -s <64|32|16>
--ctu, -s <64|32|16>
Maximum CU size (width and height). The larger the maximum CU size, the more efficiently x265 can encode flat areas of the picture, giving large reductions in bitrate. However this comes at a loss of parallelism with fewer rows of CUs that can be encoded in parallel, and less frame parallelism as well. Because of this the faster presets use a CU size of 32. Default: 64
Maximum CU size (width and height). The larger the maximum CU size, the more efficiently x265 can encode flat areas of the picture, giving large reductions in bitrate. However this comes at a loss of parallelism with fewer rows of CUs that can be encoded in parallel, and less frame parallelism as well. Because of this the faster presets use a CU size of 32. Default: 64
--min-cu-size <64|32|16|8>
Minimum CU size (width and height). By using 16 or 32 the encoder will not analyze the cost of CUs below that minimum threshold, saving considerable amounts of compute with a predictable increase in bitrate. This setting has a large effect on performance on the faster presets.
Default: 8 (minimum 8x8 CU for HEVC, best compression efficiency)
Note
All encoders within a single process must use the same settings for the CU size range. --ctu and --min-cu-size must be consistent for all of them since the encoder configures several key global data structures based on this range.
--rect, --no-rect
--rect, --no-rect
Enable analysis of rectangular motion partitions Nx2N and 2NxN (50/50 splits, two directions). Default disabled
Enable analysis of rectangular motion partitions Nx2N and 2NxN (50/50 splits, two directions). Default disabled
--amp, --no-amp
--amp, --no-amp
Enable analysis of asymmetric motion partitions (75/25 splits, four directions). At RD levels 0 through 4, AMP partitions are only considered at CU sizes 32x32 and below. At RD levels 5 and 6, it will only consider AMP partitions as merge candidates (no motion search) at 64x64, and as merge or inter candidates below 64x64.
Enable analysis of asymmetric motion partitions (75/25 splits, four directions). At RD levels 0 through 4, AMP partitions are only considered at CU sizes 32x32 and below. At RD levels 5 and 6, it will only consider AMP partitions as merge candidates (no motion search) at 64x64, and as merge or inter candidates below 64x64.
The AMP partitions which are searched are derived from the current best inter partition. If Nx2N (vertical rectangular) is the best current prediction, then left and right asymmetrical splits will be evaluated. If 2NxN (horizontal rectangular) is the best current prediction, then top and bottom asymmetrical splits will be evaluated, If 2Nx2N is the best prediction, and the block is not a merge/skip, then all four AMP partitions are evaluated.
The AMP partitions which are searched are derived from the current best inter partition. If Nx2N (vertical rectangular) is the best current prediction, then left and right asymmetrical splits will be evaluated. If 2NxN (horizontal rectangular) is the best current prediction, then top and bottom asymmetrical splits will be evaluated, If 2Nx2N is the best prediction, and the block is not a merge/skip, then all four AMP partitions are evaluated.
This setting has no effect if rectangular partitions are disabled. Default disabled
This setting has no effect if rectangular partitions are disabled. Default disabled
--early-skip, --no-early-skip
--early-skip, --no-early-skip
Measure full CU size (2Nx2N) merge candidates first; if no residual is found the analysis is short circuited. Default disabled
Measure full CU size (2Nx2N) merge candidates first; if no residual is found the analysis is short circuited. Default disabled
--fast-cbf, --no-fast-cbf
Short circuit analysis if a prediction is found that does not set the coded block flag (aka: no residual was encoded). It prevents the encoder from perhaps finding other predictions that also have no residual but require less signaling bits or have less distortion. Only applicable for RD levels 5 and 6. Default disabled
--fast-intra, --no-fast-intra
--fast-intra, --no-fast-intra
Perform an initial scan of every fifth intra angular mode, then check modes +/- 2 distance from the best mode, then +/- 1 distance from the best mode, effectively performing a gradient descent. When enabled 10 modes in total are checked. When disabled all 33 angular modes are checked. Only applicable for --rd levels 4 and below (medium preset and faster).
Perform an initial scan of every fifth intra angular mode, then check modes +/- 2 distance from the best mode, then +/- 1 distance from the best mode, effectively performing a gradient descent. When enabled 10 modes in total are checked. When disabled all 33 angular modes are checked. Only applicable for --rd levels 4 and below (medium preset and faster).
--b-intra, --no-b-intra
--b-intra, --no-b-intra
Enables the evaluation of intra modes in B slices. Default disabled.
Enables the evaluation of intra modes in B slices. Default disabled.
--cu-lossless, --no-cu-lossless
--cu-lossless, --no-cu-lossless
For each CU, evaluate lossless (transform and quant bypass) encode of the best non-lossless mode option as a potential rate distortion optimization. If the global option --lossless has been specified, all CUs will be encoded as lossless unconditionally regardless of whether this option was enabled. Default disabled.
For each CU, evaluate lossless (transform and quant bypass) encode of the best non-lossless mode option as a potential rate distortion optimization. If the global option --lossless has been specified, all CUs will be encoded as lossless unconditionally regardless of whether this option was enabled. Default disabled.
Only effective at RD levels 3 and above, which perform RDO mode decisions.
Only effective at RD levels 3 and above, which perform RDO mode decisions.
--tskip, --no-tskip
Enable evaluation of transform skip (bypass DCT but still use quantization) coding for 4x4 TU coded blocks.
Only effective at RD levels 3 and above, which perform RDO mode decisions. Default disabled
--tskip-fast, --no-tskip-fast
--tskip-fast, --no-tskip-fast
Only evaluate transform skip for NxN intra predictions (4x4 blocks). Only applicable if transform skip is enabled. For chroma, only evaluate if luma used tskip. Inter block tskip analysis is unmodified. Default disabled
Only evaluate transform skip for NxN intra predictions (4x4 blocks). Only applicable if transform skip is enabled. For chroma, only evaluate if luma used tskip. Inter block tskip analysis is unmodified. Default disabled
Analysis re-use options, to improve performance when encoding the same sequence multiple times (presumably at varying bitrates). The encoder will not reuse analysis if the resolution and slice type parameters do not match.
Analysis re-use options, to improve performance when encoding the same sequence multiple times (presumably at varying bitrates). The encoder will not reuse analysis if the resolution and slice type parameters do not match.
--analysis-mode <string|int>
--analysis-mode <string|int>
Specify whether analysis information of each frame is output by encoder or input for reuse. By reading the analysis data writen by an earlier encode of the same sequence, substantial redundant work may be avoided.
Specify whether analysis information of each frame is output by encoder or input for reuse. By reading the analysis data writen by an earlier encode of the same sequence, substantial redundant work may be avoided.
The following data may be stored and reused: I frames - split decisions and luma intra directions of all CUs. P/B frames - motion vectors are dumped at each depth for all CUs.
The following data may be stored and reused: I frames - split decisions and luma intra directions of all CUs. P/B frames - motion vectors are dumped at each depth for all CUs.
Values: off(0), save(1): dump analysis data, load(2): read analysis data
Values: off(0), save(1): dump analysis data, load(2): read analysis data
--analysis-file <filename>
--analysis-file <filename>
Specify a filename for analysis data (see --analysis-mode) If no filename is specified, x265_analysis.dat is used.
Specify a filename for analysis data (see --analysis-mode) If no filename is specified, x265_analysis.dat is used.
Options which affect the transform unit quad-tree, sometimes referred to as the residual quad-tree (RQT).
Options which affect the transform unit quad-tree, sometimes referred to as the residual quad-tree (RQT).
--tu-intra-depth <1..4>
--rdoq-level <0|1|2>, --no-rdoq-level
The transform unit (residual) quad-tree begins with the same depth as the coding unit quad-tree, but the encoder may decide to further split the transform unit tree if it improves compression efficiency. This setting limits the number of extra recursion depth which can be attempted for intra coded units. Default: 1, which means the residual quad-tree is always at the same depth as the coded unit quad-tree
Note that when the CU intra prediction is NxN (only possible with 8x8 CUs), a TU split is implied, and thus the residual quad-tree begins at 4x4 and cannot split any futhrer.
--tu-inter-depth <1..4>
The transform unit (residual) quad-tree begins with the same depth as the coding unit quad-tree, but the encoder may decide to further split the transform unit tree if it improves compression efficiency. This setting limits the number of extra recursion depth which can be attempted for inter coded units. Default: 1. which means the residual quad-tree is always at the same depth as the coded unit quad-tree unless the CU was coded with rectangular or AMP partitions, in which case a TU split is implied and thus the residual quad-tree begins one layer below the CU quad-tree.
Temporal / motion search options
--me <integer|string>
Motion search method. Generally, the higher the number the harder the ME method will try to find an optimal match. Diamond search is the simplest. Hexagon search is a little better. Uneven Multi-Hexegon is an adaption of the search method used by x264 for slower presets. Star is a three step search adapted from the HM encoder: a star-pattern search followed by an optional radix scan followed by an optional star-search refinement. Full is an exhaustive search; an order of magnitude slower than all other searches but not much better than umh or star.
dia
hex (default)
umh
star
full
--subme, -m <0..7>
Amount of subpel refinement to perform. The higher the number the more subpel iterations and steps are performed. Default 2
-m HPEL iters HPEL dirs QPEL iters QPEL dirs HPEL SATD
0 1 4 0 4 false
1 1 4 1 4 false
2 1 4 1 4 true
3 2 4 1 4 true
4 2 4 2 4 true
5 1 8 1 8 true
6 2 8 1 8 true
7 2 8 2 8 true
At –subme values larger than 2, chroma residual cost is included in all subpel refinement steps and chroma residual is included in all motion estimation decisions (selecting the best reference picture in each list, and chosing between merge, uni-directional motion and bi-directional motion). The ‘slow’ preset is the first preset to enable the use of chroma residual.
--merange <integer>
Motion search range. Default 57
Specify the amount of rate-distortion analysis to use within quantization:
The default is derived from the default CTU size (64) minus the luma interpolation half-length (4) minus maximum subpel distance (2) minus one extra pixel just in case the hex search method is used. If the search range were any larger than this, another CTU row of latency would be required for reference frames.
At level 0 rate-distortion cost is not considered in quant
Range of values: an integer from 0 to 32768
At level 1 rate-distortion cost is used to find optimal rounding values for each level (and allows psy-rdoq to be effective). It trades-off the signaling cost of the coefficient vs its post-inverse quant distortion from the pre-quant coefficient. When --psy-rdoq is enabled, this formula is biased in favor of more energy in the residual (larger coefficient absolute levels)
--max-merge <1..5>
At level 2 rate-distortion cost is used to make decimate decisions on each 4x4 coding group, including the cost of signaling the group within the group bitmap. If the total distortion of not signaling the entire coding group is less than the rate cost, the block is decimated. Next, it applies rate-distortion cost analysis to the last non-zero coefficient, which can result in many (or all) of the coding groups being decimated. Psy-rdoq is less effective at preserving energy when RDOQ is at level 2, since it only has influence over the level distortion costs.
Maximum number of neighbor (spatial and temporal) candidate blocks that the encoder may consider for merging motion predictions. If a merge candidate results in no residual, it is immediately selected as a “skip”. Otherwise the merge candidates are tested as part of motion estimation when searching for the least cost inter option. The max candidate number is encoded in the SPS and determines the bit cost of signaling merge CUs. Default 2
--tu-intra-depth <1..4>
--temporal-mvp, --no-temporal-mvp
The transform unit (residual) quad-tree begins with the same depth as the coding unit quad-tree, but the encoder may decide to further split the transform unit tree if it improves compression efficiency. This setting limits the number of extra recursion depth which can be attempted for intra coded units. Default: 1, which means the residual quad-tree is always at the same depth as the coded unit quad-tree
Enable temporal motion vector predictors in P and B slices. This enables the use of the motion vector from the collocated block in the previous frame to be used as a predictor. Default is enabled
Note that when the CU intra prediction is NxN (only possible with 8x8 CUs), a TU split is implied, and thus the residual quad-tree begins at 4x4 and cannot split any futhrer.
--weightp, -w, --no-weightp
--tu-inter-depth <1..4>
Enable weighted prediction in P slices. This enables weighting analysis in the lookahead, which influences slice decisions, and enables weighting analysis in the main encoder which allows P reference samples to have a weight function applied to them prior to using them for motion compensation. In video which has lighting changes, it can give a large improvement in compression efficiency. Default is enabled
The transform unit (residual) quad-tree begins with the same depth as the coding unit quad-tree, but the encoder may decide to further split the transform unit tree if it improves compression efficiency. This setting limits the number of extra recursion depth which can be attempted for inter coded units. Default: 1. which means the residual quad-tree is always at the same depth as the coded unit quad-tree unless the CU was coded with rectangular or AMP partitions, in which case a TU split is implied and thus the residual quad-tree begins one layer below the CU quad-tree.
--weightb, --no-weightb
--nr-intra <integer>, --nr-inter <integer>
Enable weighted prediction in B slices. Default disabled
Noise reduction - an adaptive deadzone applied after DCT (subtracting from DCT coefficients), before quantization. It does no pixel-level filtering, doesn’t cross DCT block boundaries, has no overlap, The higher the strength value parameter, the more aggressively it will reduce noise.
Spatial/intra options
Enabling noise reduction will make outputs diverge between different numbers of frame threads. Outputs will be deterministic but the outputs of -F2 will no longer match the outputs of -F3, etc.
--strong-intra-smoothing, --no-strong-intra-smoothing
Values: any value in range of 0 to 2000. Default 0 (disabled).
Enable strong intra smoothing for 32x32 intra blocks. Default enabled
--tskip, --no-tskip
--constrained-intra, --no-constrained-intra
Enable evaluation of transform skip (bypass DCT but still use quantization) coding for 4x4 TU coded blocks.
Constrained intra prediction. When generating intra predictions for blocks in inter slices, only intra-coded reference pixels are used. Inter-coded reference pixels are replaced with intra-coded neighbor pixels or default values. The general idea is to block the propagation of reference errors that may have resulted from lossy signals. Default disabled
Only effective at RD levels 3 and above, which perform RDO mode decisions. Default disabled
--rdpenalty <0..2>
--rdpenalty <0..2>
When set to 1, transform units of size 32x32 are given a 4x bit cost penalty compared to smaller transform units, in intra coded CUs in P or B slices.
When set to 1, transform units of size 32x32 are given a 4x bit cost penalty compared to smaller transform units, in intra coded CUs in P or B slices.
When set to 2, transform units of size 32x32 are not even attempted, unless otherwise required by the maximum recursion depth. For this option to be effective with 32x32 intra CUs, --tu-intra-depth must be at least 2. For it to be effective with 64x64 intra CUs, --tu-intra-depth must be at least 3.
When set to 2, transform units of size 32x32 are not even attempted, unless otherwise required by the maximum recursion depth. For this option to be effective with 32x32 intra CUs, --tu-intra-depth must be at least 2. For it to be effective with 64x64 intra CUs, --tu-intra-depth must be at least 3.
Note that in HEVC an intra transform unit (a block of the residual quad-tree) is also a prediction unit, meaning that the intra prediction signal is generated for each TU block, the residual subtracted and then coded. The coding unit simply provides the prediction modes that will be used when predicting all of the transform units within the CU. This means that when you prevent 32x32 intra transform units, you are preventing 32x32 intra predictions.
Note that in HEVC an intra transform unit (a block of the residual quad-tree) is also a prediction unit, meaning that the intra prediction signal is generated for each TU block, the residual subtracted and then coded. The coding unit simply provides the prediction modes that will be used when predicting all of the transform units within the CU. This means that when
Default 0, disabled.
Values: 0:disabled 1:4x cost penalty 2:force splits
Psycho-visual options
Left to its own devices, the encoder will make mode decisions based on a simple rate distortion formula, trading distortion for bitrate. This is generally effective except for the manner in which this distortion is measured. It tends to favor blurred reconstructed blocks over blocks which have wrong motion. The human eye generally prefers the wrong motion over the blur and thus x265 offers psycho-visual adjustments to the rate distortion algorithm.
--psy-rd will add an extra cost to reconstructed blocks which do not match the visual energy of the source block. The higher the strength of --psy-rd the more strongly it will favor similar energy over blur and the more aggressively it will ignore rate distortion. If it is too high, it will introduce visal artifacts and increase bitrate enough for rate control to increase quantization globally, reducing overall quality. psy-rd will tend to reduce the use of blurred prediction modes, like DC and planar intra and bi-directional inter prediction.
--psy-rdoq will adjust the distortion cost used in rate-distortion optimized quantization (RDO quant), enabled in --rd 4 and above, favoring the preservation of energy in the reconstructed image. --psy-rdoq prevents RDOQ from blurring all of the encoding options which psy-rd has to chose from. At low strength levels, psy-rdoq will influence the quantization level decisions, favoring higher AC energy in the reconstructed image. As psy-rdoq strength is increased, more non-zero coefficient levels are added and fewer coefficients are zeroed by RDOQ’s rate distortion analysis. High levels of psy-rdoq can double the bitrate which can have a drastic effect on rate control, forcing higher overall QP, and can cause ringing artifacts. psy-rdoq is less accurate than psy-rd, it is biasing towards energy in general while psy-rd biases towards the energy of the source image. But very large psy-rdoq values can sometimes be beneficial, preserving film grain for instance.
As a general rule, when both psycho-visual features are disabled, the encoder will tend to blur blocks in areas of difficult motion. Turning on small amounts of psy-rd and psy-rdoq will improve the perceived visual quality. Increasing psycho-visual strength further will improve quality and begin introducing artifacts and increase bitrate, which may force rate control to increase global QP. Finding the optimal psycho-visual parameters for a given video requires experimentation. Our recommended defaults (1.0 for both) are generally on the low end of the spectrum.
The lower the bitrate, the lower the optimal psycho-visual settings. If the bitrate is too low for the psycho-visual settings, you will begin to see temporal artifacts (motion judder). This is caused when the encoder is for