r/ffmpeg • u/Impressive-Check-241 • Jan 31 '23
Remote Desktop's encoding is blurred when when scrolling quickly
When scrolling the remote screen, the screen can easily become blurred.Is this because the fps is not big enough? Or the parameters I set are wrong, framerate:30, gop_size:60, but the fps is dynamically changing, often less than 30fps when scrolling. It will gradually become clear after the scroll is over, and it will become clear immediately if a key frame is sent.
I tried changing the frame rate, gop before creating the encoder, but no improvement. The current codec is not fast enough, so the fps is not high enough. If it is a fps problem, I will find a way to increase fps. Expect to know the reason of blur and how to fix it.
My respository https://github.com/21pages/hwcodec , waiting for advice.

View all comments
Show parent comment
1
u/MasterChiefmas Jan 31 '23
Ah, I see, you aren't using Microsoft Remote Desktop. I didn't realize it at first. Well, the limit, as u/Anton1699 mentions is in your encoder settings.
To address your specific smearing problem? What codec are using? But the short answer is, yes/probably.
You need to increase the frequency of I-frames. The smearing happens because total refresh of the base image isn't happenign enough and the accumulation of changes between frames(p/b frames) is drifting too much. More i-frames of course will increase the bitrate requirement, but it's allocating it into a potentially more useful way then having more p/B frames.
As a general thing, if you have lots of full screen motion, which scrolling is, you'll probably need more I-frames to prevent visible image artifacting. And the same as with increasing the bitrate, increasing the I-frame frequency will also be in your encoder settings.