X264 command line parameter explanation

Source: Internet
Author: User
This document corresponds to the x264 command line mode, and the VFW mode also uses the same parameters, but it is just a graphical interface, you can find the corresponding English.

Format: x264 Default Option-O output file input file [length x Width]
Supported input formats: raw, y4m, Avi, and AVS (optional during compilation)
Supported output formats: 264/MKV/MP4 (optional during compilation)

Many parameters of x264 can have-/-two input methods. I don't know why. The following equivalent parameters are represented by "parameter 1/parameter 2 <required value format>", and are recommended at the end of the parameter.

-H/-- Help help

Frame Type options:

-I/-- keyint <integer> maximum IDR frame spacing, 250 by default
-I/-- Min-keyint <integer> Minimum IDR frame spacing. The default value is 25.
-- Scenecut <integer> the threshold for Dynamic screen changes. When the value is exceeded, the I frame is inserted. The default value is 40.
-B/-- bframes <integer> maximum number of B frames that can be inserted between IP frames, ranging from 0 ~ 16. The default value is 0.
-- No-B-adapt disables adaptive B-frame determination (available when-B is set to 1, others are not recommended)
-- B-bias <integer> controls the determination of inserting B frames. The value range is-100 ~ + 100. The higher the value, the easier it is to insert B frames. The default value is 0.
-- B-pyramid allows B frames as reference frames
-- No-cabac disable content adaptive binary arithmetic coding (cabac, efficient entropy encoding) (which increases the speed but seriously affects the quality)
-R/-- ref <integer> maximum number of reference frames, ranging from 0 ~ 16. The default value is 1.
-- NF Closed Loop filtering (a mosaic Removal Algorithm)
-F/-- filter <ALPHA: Beta>: Set the alphac and beta parameters of loop filter. The value range is-6-6. The default value is 0.

Bit Rate Control Options:

-Q/-- QP <integer> fixed quantization mode and set the used quantization value. The value range is 0 ~ . 0 indicates lossless compression. The default value is 26.
-B/-- bitrate <integer> sets the average bit rate.
-- CRF <integer> quality mode. The quantitative value is dynamically variable (currently immature, it is better to set a fixed quantitative value for quality)
-- Qpmin <integer> sets the minimum quantization value, ranging from 0 ~ 51. The default value is 10.
-- Qpmax <integer> sets the maximum quantization value, ranging from 0 ~ 51. The default value is 51.
-- Qpstep <integer> sets the quantization value difference between adjacent frames, ranging from 0 ~ 50. The default value is 4.
-- Ratetol <decimal> the deviation ratio of the instantaneous bit rate in the average bit rate mode. The value range is 0.1 ~ 100.0. The default value is 1.0.
-- Vbv-maxrate <integer> maximum instantaneous bit rate in average bit rate mode. The default value is 0 (same as-B)
-- Vbv-bufsize <integer> bit rate controls the buffer size. Unit: kbit. The default value is 0.
-- Vbv-init <decimal> bit rate controls the ratio of the maximum data retained in the buffer zone to the buffer zone size, ranging from 0 ~ 1.0. The default value is 0.9.

-- Ipratio <decimal> quantization coefficient between frames I and P. The default value is 1.40.
-- Pbratio <decimal> quantization coefficient between P frames and B frames. The default value is 1.30.
-- Color-QP-offset <integer> quantization difference between the color and the brightness, range:-12 ~ + 12. The default value is 0.

-P/-- pass <1 | 2 | 3> multiple compression Bit Rate Control
1: Create a statistical file for the first Compression
2: compress and output the data according to the created Statistical file, without overwriting the Statistical File,
3: compress the created Statistical File to optimize the Statistical File
-- Stats <string> The Name Of The Statistics file. The default value is "x1__2pass.log"
-- Rceq <string> rate control formula. The default value is "blurcplx ^ (1-qcomp )"
-- Qcomp <decimal> linear quantization control. The value 0.0 indicates a fixed bit rate and the value 1.0 indicates a fixed quantization value. The default value is 0.6. It is only used for 2-pass and quality modes.
-- Cplxblur <decimal number> the maximum value based on the ratio of the smooth quantization value of adjacent frames. The value range is 0 ~ 99.9. The default value is 20.0. It is only used for 2-pass and quality modes.
-- Qblur <decimal> the maximum ratio of the smooth quantization value of the Statistical File results, ranging from 0 ~ 99.9. The default value is 0.5. It is only used for 2-pass.

-- Zones <z0>/<Z1> /... Segment quantization, in the format of <start frame>, <End frame>, <option>, and optional values: q = <integer> (quantization value) or B = <decimal number> (bitrate multiple)

Analysis options:

-A/-- analyze <string> Dynamic Block division method. The default value is "p8x8, b8x8, i8x8, i4x4 ". Optional: p8x8/p4x4/b8x8/i8x8/i4x4; none/All (p4x4 requires p8x8. i8x8 -- 8x8dct)
-- Direct <string> dynamic prediction method. The default value is "spatial ". Optional: NONE/spatial/temporal/auto
-W/-- weightb allows B-frame weighted prediction (which can reduce the impact of low quality of adjacent B-frames)
-- Me <string> specifies the dynamic prediction search method for all pixel blocks. The default value is "hex". Optional:
Dia: Diamond Search, radius 1 (FAST)
HEX: hexagonal search, radius 2
Umh: hexagonal search with variable radius
ESA: comprehensive search (very slow and almost identical to umh)
-- Merange <integer> -- the search radius when me is umh/ESA. The maximum value is 64. The default value is 16.
-M/-- subme <integer>: Dynamic Prediction and partitioning method. Option 1 ~ 7. The default value is 5 (closely related to the compression quality and time, and 1 is more than four times the speed of 7)
1: use full pixel blocks for dynamic search, and then use the quick mode to perform a precise search of 1/4 pixel blocks.
2: Use half-pixel blocks for dynamic search, and then use the quick mode to perform a precise search of 1/4 pixel blocks.
3: Use half-pixel blocks for dynamic search, and use the quality mode to perform a precise search of 1/4 pixel blocks for each block.
4: exact search of 1/4 pixel blocks in Quick Mode
5: precise search of 1/4 pixels in quality mode
6: optimizing the rate distortion of pixel blocks of I and P frames (rdo)
7: optimizing I and P frame motion vectors and intra-block rate distortion (best quality)
-- B-rdo B frame also performs rdo. The value of -- subme is more than 6.
-- Mixed-Refs can use different reference frames within one frame
-- No-chroma-me: do not perform dynamic color Prediction
-- Bime can average the motion vector of the Reference Block of B frames.
-8/-- 8x8 DCT can use 8x8 discrete cosine transform (DCT)
-T/-- trellis <integer> trellis quantization. Find the appropriate quantization value for each 8x8 block. cabac is required. The default value is 0.
0: Disable
1: used only for the final Encoding
2: Always Use
-- No-fast-pskip disable fast p-frame skip Detection
-- No-DCT-decimate disable p-Frame Joint encoding (details can be added, but the size will also increase)
-- Nr <integer> Noise Removal, range: 0 ~ 100000, 0 by default

-- CQM <string> sets the format of the external quantization matrix. The default value is "flat". Optional values: JVT/flat.
-- Cqmfile <string> reads the external quantization matrix file in JM format and automatically ignores other -- CQM * options.
-- Cqm4 <list> sets the 4x4 quantization matrix separated by commas (,). The value range is 1 ~ 16 Integers of 255
-- Cqm8 <list> sets the 8x8 quantization matrix separated by commas (,). The value range is 1 ~ 64 integers in 255
-- Cqm4i/-- cqm4p/-- cqm8i/-- cqm8p sets different quantization matrices for I and P frames.
-- Cqm4iy/-- cqm4ic/-- cqm4py/-- cqm4pc sets the quantization matrix with Different Brightness and color.

Video standardization options:
These options have nothing to do with encoding, but if you want to use a player like MP4, you can set them at your own risk.

-- SAR width: Height: Set the aspect ratio.
-- Overscan <string> overscan line. The default value is "UNDEF" (not set). The options are show (View)/crop (delete)
-- Videoformat <string> video format. The default value is "UNDEF". Optional values: component/PAL/NTSC/SECAM/MAC/UNDEF.
-- Fullrange <string> specify full range samples setting, default "off", option: Off/on)
-- Colorprim <string> original color format. The default value is "UNDEF". Optional values: UNDEF, bt709, bt470m, bt470bg, smpte170m, smpte240m, and film.
-- Transfer <string> conversion method. The default value is "UNDEF". Options include UNDEF, bt709, bt470m, bt470bg, linear, log100, log316, smpte170m, and smpte240m.
-- Colormatrix <string> color matrix setting. The default value is "UNDEF", UNDEF/bt709/FCC/bt470bg, smpte170m/smpte240m/GBR/ycgco.
-- Chromaloc <integer> color sample specified, range: 0 ~ 5. The default value is 0.

Input and Output options:

-- Level <string> set the level (as defined by Annex A) (do not understand, please advise)
-- FPS <decimal> set Frame Rate
-- Seek <integer> specifies the start frame.
-- Frames <integer> maximum number of encoded Frames
-O/-- output specifies the output file

-- Threads <integer> encoding thread (using sharding Technology)
-- Thread-input: Run avisynth In the encoding thread
-- No-ASM disable all CPU optimization commands
-- No-SNR disable SNR Calculation
-- Quiet Mode
-V/-- verbose displays the information of each frame.
-- Progress: display the Encoding Process
-- Visualize: Display motion vectors
-- SPS-id <integer> specifies the ID of SPs and PPS. The default value is 0.
-- Aud uses data units to define symbols

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.