-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: Actual bitrate did not reach target bitrate and the actual QP is higher than MIN_QP on CBR mode #517
Comments
Couple of points:
|
I changed my parameters, but the problem is still alive: set_avc_property(amf_encoder_, USAGE, AMF_VIDEO_ENCODER_USAGE_TRANSCODING); //using default parameters
set_avc_property(amf_encoder_, RATE_CONTROL_METHOD, AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR); //overwrite rc
set_avc_property(amf_encoder_, FRAMESIZE, AMFConstructSize(width, height));
//overwrite 'TRANSCODING' default values
set_avc_property(amf_encoder_, B_PIC_PATTERN, 0);
set_avc_property(amf_encoder_, LOWLATENCY_MODE, true);
set_avc_property(amf_encoder_, MIN_QP, 20);
set_avc_property(amf_encoder_, MAX_QP, 40);
set_avc_property(amf_encoder_, ENFORCE_HRD, true);
set_avc_property(amf_encoder_, IDR_PERIOD, 600);
set_avc_property(amf_encoder_, QUERY_TIMEOUT, 200);
set_avc_property(amf_encoder_, TARGET_BITRATE, bitrate);
set_avc_property(amf_encoder_, PEAK_BITRATE, bitrate);
set_avc_property(amf_encoder_, PROFILE, main);
amf_encoder_->Init();
// after initialized, i will change target bitrate dynamic(during 600-1000kbps) based the network quality.
void onRequestChangeBitrate(uint32_t target_bitrate) {
set_avc_property(amf_encoder_, TARGET_BITRATE, target_bitrate);
set_avc_property(amf_encoder_, PEAK_BITRATE, target_bitrate);
} {943|306kbps, 31} //low bitrate and high QP
{997|528kbps, 34}
{997|683kbps, 26} I tried many combinations of parameters but all failed, I'm confused and a little frustrated. |
More points:
|
Thanks for your reply:
So I immediately built a tool to reproduce the problem,and also uploaded the video file: I run the tool and reproduced the problem, and here is my log file:
HW: AMD Radeon RX 6950XT, Driver 32.0.11027.1003 |
From what I can tell, your app records Windows desktop and test video contains also Windows desktop. So, the encoder input has mostly flat areas with pure colors: white, black etc. With such content one cannot expect that codec can keep bitrate and spend QP on large single-color areas. |
Thank you for such a detailed reply. As you said, it seems quite difficult to achieve high quality on such content. There is a sample performance on intel MFX. It seems that only NVENC perform well in my testing. |
Thanks again。 |
Hey! I have a problem with image quality.
The actual bitrate is lower than target bitrate on document scenaria(scenes where the content does not change much), but the qp of output frame is higher than min_bp.
here is my parameters(pseudocode):
I get some output like this:
here is my code to get QP:
What i want(Ideal situation):
Is there any parameter to do this?
The text was updated successfully, but these errors were encountered: