-
Notifications
You must be signed in to change notification settings - Fork 24
Description
-
when reading the frame length and the remaining frame data, you can use videostream Readasync method,
And delete readtimeout -
the received frame data can be stored in the channel and parsed in other threads, so that the socket receives and parses the video frame data and draws the interface separately
Through this, I found the reason for the picture delay
Only on my laptop, when FPS is at 30, the screen does not delay, but when FPS is at 60, the delay is very serious
When the FPS is at 30, if the CPU occupation of my notebook is high, the delay will also occur
Through observation, it is found that the main reason for the delay is that the consumption time of data analysis exceeds the time of socket receiving data, resulting in more and more serious delay
This does not happen on high-performance desktop computers
However, when multiple instances are started, for example, when 6 instances are started, 2-3 mobile phone images will delay
But scrcpy can achieve 60 FPS on my laptop
It was observed that he used GPU to parse data
I tried AV_ HWDEVICE_ TYPE_ D3D11VA
But the situation is not ideal, even worse than the current soft decoding