[英]x264 rate control set
我學習x264編碼已有幾個月了。 我需要控制速率並獲得平均比特率。 以下是我的設置,我得到了平均比特率,但是圖像質量很差,因此我需要您的建議或可以幫助我進一步了解x264的內容。
Params.rc.i_rc_method = X264_RC_ABR ;
Params.rc.i_bitrate = nBitRate*0.65/1000 ;
Params.rc.i_vbv_buffer_size = nBitRate/1000;
Params.rc.i_vbv_max_bitrate = nBitRate*0.65/1000 ;
Params.rc.f_vbv_buffer_init = 1.0 ;
Params.rc.f_rate_tolerance = 1.0 ;
Params.i_fps_num = ParamIn.dFrameRate*0.6 ;
Params.i_fps_den = 1 ;
Params.i_width = ParamIn.nWidth ;
Params.i_height = ParamIn.nHeight ;
好吧,如果您的視頻質量不好...您需要提高比特率。 這就是我用於編碼的內容:
x264 --preset fast --profile high --level 4.1 --tune animation --ref 10 --subme 9 --merange 32 --bitrate 500 --me umh --input-res 848x480 --trellis 2 --pass 1 -o Outvideo.mp4 input.mp4
x264 --preset fast --profile high --level 4.1 --tune animation --ref 10 --subme 9 --merange 32 --bitrate 330 --me umh --input-res 848x480 --trellis 2 --pass 2 -o Outvideo.mp4 input.mp4
好吧,我進行了2次通過,因為由於許多原因它比1次通過要好,如果您使用的是基於BIT-RATE的編碼,那么2次通過總是有幫助的! 您可以使用“ --bitrate x
”選項來選擇比特率。 只需將“ x
”更改為所需的平均比特率即可。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.