-
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] How 'low-latency-mode' affect encoding latency? #500
Comments
Hard to tell without actual code but few random thoughts:
|
Thanks for such a detailed answer. I was wrong. The real problem is that low latency mode is not set. case 1 (no latency-mode, no sleep): res = encoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, false); case 2(no latency-mode, sleep): res = encoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, false);
//..
amf_sleep(16); This problem can reproduced from here: #501 I will see gpu-view for more details later (Study now) |
But in this case seem situation is clear: if low latency parameter is false and you insert sleep after encoding, GPU power management sees that jobs submissions are spaced in time and will reduce VCN clocks and encoding will be longer, so latency increases. The main reason for adding low latency parameters is to force clocks to stay high and keep latency low. |
Thanks for answer. “GPU power management” and "VCN clocks" is really new thing for me, I'll learn it right away. By the way, I found that encoding latency will very large when 3D Game running in the foreground. Is there any d3d api or something to increase gpu priority for app (just for capturing desktop and encoding) when 3d game running(take almost 100% gpu 3D resources). |
Yes, game can interfere with some graphic jobs but not with encoder. To avoid this in the sample, use "-prerender" parameter as in this sample graphics is used for preparation of inputs only. Though, if your GPU/APU doesn't have ability to accept RGBA directly for encoding, the encoder will use shader based color converter. |
In following two case, encoding latency will be totally different(both of them are set low-latency mode):
case 1:
case2:
Both of them are low-latency mode, why the encoding latency totally different.
It can be reproduced by 'EncoderLatency' example.
The text was updated successfully, but these errors were encountered: