Detailed description of x264 preset class Parameters

Source: Internet
Author: User

Detailed description of x264 preset class Parameters

 

X264 version --

x264 core:116 r2074 2641b9e

 

Add the "fullhelp" parameter to view the full version help of x264 --

x264 --fullhelp

 

The description of the preset class parameters is --

Presets:

--profile <string> Force the limits of an H.264 profile
Overrides all settings.
- baseline:
--no-8x8dct --bframes 0 --no-cabac
--cqm flat --weightp 0
No interlaced.
No lossless.
- main:
--no-8x8dct --cqm flat
No lossless.
- high:
No lossless.
- high10:
No lossless.
Support for bit depth 8-10.
--preset <string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast:
--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --rc-lookahead 0 --ref 1
--scenecut 0 --subme 0 --trellis 0
--no-weightb --weightp 0
- superfast:
--no-mbtree --me dia --no-mixed-refs
--partitions i8x8,i4x4 --rc-lookahead 0
--ref 1 --subme 1 --trellis 0 --weightp 1
- veryfast:
--no-mixed-refs --rc-lookahead 10
--ref 1 --subme 2 --trellis 0 --weightp 1
- faster:
--no-mixed-refs --rc-lookahead 20
--ref 2 --subme 4 --weightp 1
- fast:
--rc-lookahead 30 --ref 2 --subme 6
--weightp 1
- medium:
Default settings apply.
- slow:
--b-adapt 2 --direct auto --me umh
--rc-lookahead 50 --ref 5 --subme 8
- slower:
--b-adapt 2 --direct auto --me umh
--partitions all --rc-lookahead 60
--ref 8 --subme 9 --trellis 2
- veryslow:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60
- placebo:
--bframes 16 --b-adapt 2 --direct auto
--slow-firstpass --no-fast-pskip
--me tesa --merange 24 --partitions all
--rc-lookahead 60 --ref 16 --subme 11
--trellis 2
--tune <string> Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- film (psy tuning):
--deblock -1:-1 --psy-rd <unset>:0.15
- animation (psy tuning):
--bframes {+2} --deblock 1:1
--psy-rd 0.4:<unset> --aq-strength 0.6
--ref {Double if >1 else 1}
- grain (psy tuning):
--aq-strength 0.5 --no-dct-decimate
--deadzone-inter 6 --deadzone-intra 6
--deblock -2:-2 --ipratio 1.1
--pbratio 1.1 --psy-rd <unset>:0.25
--qcomp 0.8
- stillimage (psy tuning):
--aq-strength 1.2 --deblock -3:-3
--psy-rd 2.0:0.7
- psnr (psy tuning):
--aq-mode 0 --no-psy
- ssim (psy tuning):
--aq-mode 2 --no-psy
- fastdecode:
--no-cabac --no-deblock --no-weightb
--weightp 0
- zerolatency:
--bframes 0 --force-cfr --no-mbtree
--sync-lookahead 0 --sliced-threads
--rc-lookahead 0

 

Too many texts seem a little dizzy, So I organized them into tables.

1 profile (grade)

 

 

Collation Name Name 8x8dct CQM Bframes Cabac Weightp Interlaced
1 Baseline Baseline No Flat 0 No 0 No
2 Main Main No Flat Unlimited Unlimited Unlimited Unlimited
3 High High Unlimited Unlimited Unlimited Unlimited Unlimited Unlimited
4 High10 High 10 bits Unlimited Unlimited Unlimited Unlimited Unlimited Unlimited

Bframes: Maximum number of B-frames (number of B-frames) between frames I and P. The value range is 0-16.

CQM: Custom quantization matrices ). Flat and JVT are available by default.

Weightp: enables x264 to use explicit weighted prediction to improve P frame compression. It also improves the fade-in/fade-out quality. The higher the mode, the slower it is.

8x8 DCT: auto 8 discrete cosine conversion (Adaptive 8x8 DCT ).

Cabac: Binary Arithmetic encoding of elastic content (cabac: context adaptive binary arithmetic coder ).

Interlaced: interlace scan.

 

 

2 preset)

 

 

Collation Name Name B-adapt Bframes Direct Me Merange Partitions RC-lookahead Ref Subme Trellis Weightp Other
1 Ultrafast Extremely fast 0 0   Dia   None 0 1 0 0 0 No-8x8dct aq-mode0 no-cabac no-deblock no-mbtree no-mixed-Refs scenecut0 no-weightb
2 Superfast Ultra-fast       Dia   I8x8, i4x4 0 1 1 0 1 No-mixed-refsno-mbtree
3 Veryfast Soon             10 1 2 0 1 No-mixed-refs
4 Faster Fast             20 2 4   1 No-mixed-refs
5 Fast Fast             30 2 6   1  
6 Medium Medium                        
7 Slow Slow 2   Auto Umh     50 5 8      
8 Slower Slow 2   Auto Umh   All 60 8 9 2    
9 Veryslow Very slow 2 8 Auto Umh 24 All 60 16 10 2    
10 Placebo   2 16 Auto TeSA 24 All 60 16 11 2   Slow-firstpass no-fast-pskip

B-adapt: an algorithm for determining the position of an Elastic B-frame. This setting controls how x264 decides to place P or B frames.

Bframes: Maximum number of B-frames (number of B-frames) between frames I and P. The value range is 0-16.

Direct: The prediction mode of "direct" motion vectors. There are two modes available: spatial and temporal. You can specify none to disable direct dynamic vectors, and specify auto to allow x264 to switch between them to the appropriate mode.

Me: The full-Pixel Motion Estimation (motion estimation) algorithm.

Merange: controls the maximum range of motion estimation (in pixels ). For Hex and Dia, the range is limited to 4 ~ 16. For umh and ESA, it can be increased to more than 16 by default to allow a wider range of dynamic searches, useful for HD videos and high-dynamic lenses. Note: For umh, ESA, and TeSA, increasing merange significantly slows down the encoding speed.

Partitions: H.264 video is divided into 16x16 macro blocks during compression. These blocks can be further divided into smaller segments, which is the part to be controlled by this option.

RC-lookahead: Set the MB-tree bit metarate control and the number of frames used by vbv-lookahead. The maximum allowed value is 250. For the MB-tree part, increasing the number of frames brings better results but also slows down. The maximum buffer value used by the MB-tree is Min (RC-lookahead, -- keyint ).

Ref: controls the size of the decoded image buffer (DPB: decoded picture buffer. The range is from 0 to 16. In short, this value is the number of frames that can be used by each P frame as the number of reference frames (one or two fewer frames can be used by B, depending on whether they are used as the reference frames ). The minimum number of ref that can be referenced is 1.

Subme: Set the complexity of subpixel estimation. The higher the value, the better. Level 1 ~ 5 only controls the subpixel subdivision strength. Level 6 enables rdo for mode decision making, while Level 8 enables rdo for dynamic vectors and internal prediction modes. The rdo level is significantly slower than the previous level.

Trellis: Execute trellis quantization to improve efficiency.

Weightp: enables x264 to use explicit weighted prediction to improve P frame compression. It also improves the fade-in/fade-out quality. The higher the mode, the slower it is.

No-8x8dct: Disable auto 8 discrete cosine conversion (Adaptive 8x8 DCT ).

AQ-mode: auto scaling mode. When there is no AQ, x264 can easily allocate insufficient elements to a smaller part. AQ is used to better allocate the number of available BITs between all macro blocks in a video.

No-cabac: disables Binary Arithmetic encoding of elastic content (cabac: context adaptive binary arithmetic coder), compresses data streams, and switches back to variable-length encoding of less efficient elastic content (cavlc: context Adaptive Variable Length CODER) system. Significantly reduce compression efficiency (usually 10 ~ 20%) and decoding hardware requirements.

No-deblock: loop filter. It is also known as inloop deblocker )).

No-mbtree: disables the bitrate control of the macro block tree. The Macro Block tree bitrate control improves the overall compression rate, and is weighted accordingly by tracking the Time Propagation across frames (temporal Propagation.

No-mixed-Refs: the hybrid reference selects the reference based on each 8x8 segment instead of each macro block. When multiple reference frames are used, the quality will be improved, although the speed will be reduced. Setting this option disables this feature.

Scenecut: set the threshold of the I/IDR frame position (Scene Change Detection ).

No-weightb: reference for disabling the weighted B frame.

Slow-firstpass: slow pass.

No-fast-pskip: Early skip detection (early skip detection) of disabled P frames ). It improves the quality very slightly, but it causes a lot of loss.

 

 

3 tune)

 

 

Collation Name Name Ref Bframes Deblock Psy-Rd AQ-strength Other
1 Film Movie     -1:-1 <Unset>: 0.15    
2 Animation Animation {Double if> 1 else 1} {+ 2} 1:1 0.4: <unset> 0.6  
3 Grain Granules     -2:-2 <Unset>: 0.25 0.5 No-DCT-decimate deadzone-inter6 deadzone-intra6 ipratio1.1 pbratio1.1 qcomp0.8
4 Stillimage Static Image     -3:-3 2.0: 0.7 1.2  
5 SNR SNR test       No   Aq-mode0
6 SSIM SSIM Test       No   Aq-mode2
7 Fastdecode Fast decoding     No     No-cabac no-weightb weightp0
8 Zerolatency Zero latency   0       Force-CFR no-mbtree sync-lookahead0 sliced-threads rc-lookahead0

Ref: controls the size of the decoded image buffer (DPB: decoded picture buffer. The range is from 0 to 16. In short, this value is the number of frames that can be used by each P frame as the number of reference frames (one or two fewer frames can be used by B, depending on whether they are used as the reference frames ). The minimum number of ref that can be referenced is 1.

Bframes: Maximum number of B-frames (number of B-frames) between frames I and P. The value range is 0-16.

Deblock: Controls loop filtering (also known as inloop deblocker )).

Psy-rd: the first number is the strength of psy-rdo (subme> = 6 required ). The second number is the strength of psy-trellis (trellis needed> = 1 ).

AQ-strength: elastic quantitative strength. Set the strength of the macro block with AQ biased towards low detail (plane. It cannot be a negative number. 0.0 ~ Values other than 2.0 are not recommended.

No-DCT-decimate: Disable DCT decimation. DCT decimation will discard the "unnecessary" DCT block. This will improve the coding efficiency, and the quality of reduction is usually insignificant.

Deadzone-inter/intra: Set the brightness of inter/intra to quantify the size of the reaction zone. The range of the reaction zone should be 0 ~ 32. If this value is set to x264, the level of detail is discarded without trying to retain. Very subtle details are hard to see and consume the number of bits. discard these details without wasting the number of bits on such low-income videos. The reaction zone is incompatible with -- trellis.

Ipratio: modifies the average increment of the I-frame quantization value compared to the p-frame quantization value. The larger the value, the higher the quality of the I frame.

Pbratio: modifies the average reduction of the B-frame quantization value compared to the p-frame quantization value. A larger value will reduce the quality of B frames. When mbtree is enabled (enabled by default), this setting does not work. mbtree automatically calculates the optimal value.

Qcomp: quantize the compression coefficient of the curve. 0.0 indicates the fixed bit rate, and 1.0 indicates the fixed quantified value. When mbtree is enabled, it affects the strength of the mbtree (the larger the qcomp, the weaker the mbtree ).

AQ-mode: auto scaling mode. When there is no AQ, x264 can easily allocate insufficient elements to a smaller part. AQ is used to better allocate the number of available BITs between all macro blocks in a video.

No-cabac: disables Binary Arithmetic encoding of elastic content (cabac: context adaptive binary arithmetic coder), compresses data streams, and switches back to variable-length encoding of less efficient elastic content (cavlc: context Adaptive Variable Length CODER) system. Significantly reduce compression efficiency (usually 10 ~ 20%) and decoding hardware requirements.

Weightp: enables x264 to use explicit weighted prediction to improve P frame compression. It also improves the fade-in/fade-out quality. The higher the mode, the slower it is.

Force-CFR: If the ffms2 or lavf separator is used and the output file is not in raw format, the time code is copied from the input file. This option disables this function and forces x264 to generate it by itself. When this option is used, it is estimated that you will also set -- FPS.

No-mbtree: disables the bitrate control of the macro block tree. The Macro Block tree bitrate control improves the overall compression rate, and is weighted accordingly by tracking the Time Propagation across frames (temporal Propagation.

Sync-lookahead: sets the frame cache size used for thread prediction. Maximum Value: 250. This function is automatically disabled when the second mode is used for encoding more times or based on multipart threads. If it is set to 0, thread prediction is disabled, which reduces latency, but reduces performance.

Sliced-threads: enables multipart-based threads. Low Quality and efficiency than the default method, but no encoding delay.

RC-lookahead: Set the MB-tree bit metarate control and the number of frames used by vbv-lookahead. The maximum allowed value is 250. For the MB-tree part, increasing the number of frames brings better results but also slows down. The maximum buffer value used by the MB-tree is Min (RC-lookahead, -- keyint ).

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.