FFmpeg Command Line Parameters
The following table describes the FFmpeg command line parameters.
Parameter |
Category |
Description |
|---|---|---|
-i |
FFmpeg built-in parameter |
Name of the input file. It corresponds to the command line parameter -i of CloudHw265App. |
-s |
FFmpeg built-in parameter |
Width and height of the input image. It corresponds to the command line parameters -w and -h of CloudHw265App. |
-vframes |
FFmpeg built-in parameter |
Number of frames to be encoded. It corresponds to the command line parameter --frames of CloudHw265App. |
-fps_num |
libhw265 encoder parameter |
Frame rate of the output video. The value range is (0, 120]. If the value does not fall within the range, the default value 25 is used. It corresponds to the command line parameter --fps_num of CloudHw265App. In this case, the default value of fps_den is 1. |
-channel |
libhw265 encoder parameter |
ID of the current encoder. The encoder ID is used to identify different encoders. The default value is 0. |
-log_level |
libhw265 encoder parameter |
Encoder log output level. The default value is 1.
|
-frame_threads |
libhw265 encoder parameter |
Number of threads for frame-level encoding. A larger value indicates a higher encoding speed. The value range is [1, 38] and the default value is 12. If this parameter is set to a value outside the range, the default value is used or an error is reported. It corresponds to the command line parameter --FrmThreadNum of CloudHw265App. |
-wpp_threads |
libhw265 encoder parameter |
Number of threads for WPP row-level encoding. A larger value indicates a higher encoding speed. The value range is [1, 20] and the default value is 8. It corresponds to the command line parameter --WppThreadNum of CloudHw265App. |
-analysis_threads |
libhw265 encoder parameter |
Number of threads for pre-analysis. Pre-analysis scans the upcoming frames in advance, which improves the encoding image quality but increases the encoding latency. The value range is [1, 48] and the default value is 5. It corresponds to the command line parameter --LookAheadThreads of CloudHw265App. |
-adap_I |
libhw265 encoder parameter |
Specifies whether to enable scene-adaptive I-frame insertion. If this function is enabled, the encoding quality is improved but the encoding speed decreases. The value range is [0, 1] and the default value is 1. If this parameter is set to a value outside the range, the default value is used. It corresponds to the command line parameter --adapt_i of CloudHw265App. |
-profile |
libhw265 encoder parameter |
Encoding complexity of the HW265 encoder. Only the main profile is supported. The default value is 0. |
-qualityset |
libhw265 encoder parameter |
Encoding quality level. Available level options are 2, 3, 5, and 6. The encoding speed increases with each level, while the corresponding encoding quality decreases. The default value is 3. It corresponds to the command line parameter --preset of CloudHw265App. |
-keyint |
libhw265 encoder parameter |
I-frame interval. Typically, a larger value indicates lower image quality and faster encoding. The value is greater than or equal to 1. The default value is 150. It corresponds to the command line parameter --keyInt of CloudHw265App. |
-bframe_nums |
libhw265 encoder parameter |
Maximum consecutive B-frames. Typically, a larger value indicates higher image quality and slower encoding at the same bit rate. The value range is [0, 7] and the default value is 7. It corresponds to the command line parameter --bframes of CloudHw265App. |
-delay |
libhw265 encoder parameter |
Number of frames buffered for time-domain analysis. Typically, a larger value indicates higher image quality and slower encoding at the same bit rate. The value range is [bframes, 150] and the default value is 25. It corresponds to the command line parameter --delay of CloudHw265App. |
-rc |
libhw265 encoder parameter |
Bit rate control policy. The value can be 0, 1, or 2, indicating constant quantization parameter (CQP), average bit rate (ABR), and constant quality factor (CRF), respectively. If the value does not fall within the range, the default value 0 is used. It corresponds to the command line parameter --rc of CloudHw265App. |
-qp |
libhw265 encoder parameter |
Quantization parameter (QP). Typically, a smaller value indicates a smaller quantization step size and higher precision. The output data volume may be larger for the same visual quality. The value range is [1, 51] and the default value is 18. This parameter is valid only in the CQP mode. |
-abr_bitrate |
libhw265 encoder parameter |
Average bit rate. Typically, a larger value indicates higher image quality and slower encoding. The value range is [40, 300000], in kbit/s. If the value is out of the range, the default value 2000 is used. It corresponds to the command line parameter --br of CloudHw265App. This parameter is valid only in the ABR mode. |
-crf |
libhw265 encoder parameter |
CRF level. Typically, a smaller value indicates a higher bit rate and image quality but slower encoding. The value range is [0, 51]. If the value is out of the range, the default value 23 is used. It corresponds to the command line parameter --crf of CloudHw265App. This parameter is valid only in the CRF mode. |
-cfps |
libhw265 encoder parameter |
Specifies whether to use a constant frame rate. 0: no; 1: yes. The default value is 1. If this parameter is set to a value outside the range, the default value is used. It corresponds to the command line parameter -vfrinput of CloudHw265App, with inverse functionality. |
-enablefixedIdrPeriod |
libhw265 encoder parameter |
Specifies whether a fixed interval always contains an I-frame. This parameter takes effect only when -adap_I is enabled. 0: no; 1: yes. The default value is 0. This parameter does not have a corresponding CloudHw265App command line parameter. |
-bitratePar |
libhw265 encoder parameter |
Peak-to-average bit rate ratio. The value range is [1, 20] and the default value is 4. If this parameter is set to a value outside the range, the default value is used. It corresponds to the command line parameter -BitRatePAR of CloudHw265App. |
-bitrateParCtrlStrength |
libhw265 encoder parameter |
Peak control strength. The value range is [0, 3] and the default value is 0. If this parameter is set to a value outside the range, the default value is used. It corresponds to the command line parameter -ParCovStrength of CloudHw265App. |
-enableResetBitrate |
libhw265 encoder parameter |
Specifies whether to enable bit rate resetting. 0: no; 1: yes. The default value is 0. It corresponds to the command line parameter -dynamicBitrateMode of CloudHw265App. If the value is 0, the bit rate is not reset. |
-bframe_ref |
libhw265 encoder parameter |
Specifies whether to use the B-frame as the reference frame. 0: no; 1: yes. The default value is 1. If this parameter is set to a value outside the range, the default value is used. It corresponds to the command line parameter -bframeRef of CloudHw265App. |
-MbTree |
libhw265 encoder parameter |
Specifies whether to enable the MBTree bit rate control algorithm to intelligently allocate the bit rate based on the macroblock importance. 0: no; 1: yes. The default value is 1. If this parameter is set to a value outside the range, the default value is used. This parameter does not have a corresponding CloudHw265App command line parameter. |
-delayTime |
libhw265 encoder parameter |
Time-domain analysis wait time. The value range is [0, 4000] and the default value is 0. It corresponds to the command line parameter -TotalDelayTime of CloudHw265App. |
-enableDelayTimeControl |
libhw265 encoder parameter |
Specifies whether to enable time-domain analysis wait time control. 0: no; 1: yes. The default value is 0. If this parameter is set to a value outside the range, the default value is used. This parameter does not have a corresponding CloudHw265App command line parameter. |
-adap_B |
libhw265 encoder parameter |
Sets the adaptive B-frame algorithm. Available options are 0 (disabled), 1 (fastest adaptation), 2 (fast adaptation), and 3 (TRELLIS-based adaptation). The default value is 1. If this parameter is set to a value outside the range, the default value is used. This parameter does not have a corresponding CloudHw265App command line parameter. |
-hdrMode |
libhw265 encoder parameter |
Sets the HDR mode. 0: disabled; 1: HDR10; 2: HDR Vivid. The default value is 0. It corresponds to the command line parameter -hdrMode of CloudHw265App. |
-repeatHeaders |
libhw265 encoder parameter |
Sets whether to repeat header information such as VPS/SPS/PPS/SEI before each IDR frame. 0: yes; 1: no. The default value is 0. It corresponds to the command line parameter -repeatHeaders of CloudHw265App. |
-max-cll |
libhw265 encoder parameter |
Sets the maximum content light level (maxContentLightLevel). The default value is 1000. This parameter requires that -hdrMode be set to 1. Same below. It corresponds to the command line parameter -max-cll of CloudHw265App. |
-max-fall |
libhw265 encoder parameter |
Sets the maximum frame average light level (maxPicAverageLightLevel). The default value is 300. It corresponds to the command line parameter -max-fall of CloudHw265App. |
-primaries-x0 |
libhw265 encoder parameter |
Sets the X coordinate of the red primary color (displayPrimariesX0). The default value is 8500. It corresponds to the command line parameter -primaries-x0 of CloudHw265App. |
-primaries-y0 |
libhw265 encoder parameter |
Sets the Y coordinate of the red primary color (displayPrimariesY0). The default value is 39850. It corresponds to the command line parameter -primaries-y0 of CloudHw265App. |
-primaries-x1 |
libhw265 encoder parameter |
Sets the X coordinate of the green primary color (displayPrimariesX1). The default value is 6550. It corresponds to the command line parameter -primaries-x1 of CloudHw265App. |
-primaries-y1 |
libhw265 encoder parameter |
Sets the Y coordinate of the green primary color (displayPrimariesY1). The default value is 2300. It corresponds to the command line parameter -primaries-y1 of CloudHw265App. |
-primaries-x2 |
libhw265 encoder parameter |
Sets the X coordinate of the blue primary color (displayPrimariesX2). The default value is 35400. It corresponds to the command line parameter -primaries-x2 of CloudHw265App. |
-primaries-y2 |
libhw265 encoder parameter |
Sets the Y coordinate of the blue primary color (displayPrimariesY2). The default value is 14600. It corresponds to the command line parameter -primaries-y2 of CloudHw265App. |
-white-x |
libhw265 encoder parameter |
Sets the X coordinate of the white point (whitePointX). The default value is 15635. It corresponds to the command line parameter -white-x of CloudHw265App. |
-white-y |
libhw265 encoder parameter |
Sets the Y coordinate of the white point (whitePointY). The default value is 16450. It corresponds to the command line parameter -white-y of CloudHw265App. |
-max-luminance |
libhw265 encoder parameter |
Sets the maximum display mastering luminance (maxDisplayMasteringLuminance). The default value is 10000000. It corresponds to the command line parameter -max-luminance of CloudHw265App. |
-min-luminance |
libhw265 encoder parameter |
Sets the minimum display mastering luminance (minDisplayMasteringLuminance). The default value is 1. It corresponds to the command line parameter -min-luminance of CloudHw265App. |
-atc-sei |
libhw265 encoder parameter |
Sets the alternative transfer characteristics for video content (preferredTransferCharacteristics). It corresponds to the command line parameter -atc-sei of CloudHw265App. |
