-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Is it possible to add a real-time latency display in the projector window using USB? and how to implement it? #4256
Comments
Sorry, I don't understand. Could you elaborate? |
It is as the following: In the computer screen, there is a mobile phone projection window (via USB). I want to add the real-time delayed display (latency) in the projection window (like 177 ms or 120 ms, a dynamic number show the latency between phone and display in the computer via USB connection) Is it possible for scrcpy? Thanks very much. |
It's very difficult to get a precise, accurate and meaningful value. First, the clock difference between the device and the computer must be estimated (with some NTP-like protocol), this might introduce some error. But there are other sources of error. For example, there might be a difference between the timestamp reported by MediaCodec and the "real" time when the image becomes visible on the physical Android device display. Also, on the computer side, when we draw a frame at some instant t, it will be actually "sent" at the next vblank (at 60Hz, it's every ~16.7ms). So if the frame is drawn 1ms after the previous vblank, there are additional 15ms not taken into account. After this, the compositor may add some delay, and the physical display may also add delay. Instead, it is more meaningful to measure the "glass-to-glass latency", by filming the device display and the computer display at the same time (basically what I did here, but with very poor hardware). |
Dear rom1v, I konw it is difficult to get a precise as 1 ms, we do not need so much precision. Is it possible for scrcpy as precise as 30-70 ms to show the real-time latency? |
In theory you could create a timer of some sort android side and then look at it on both monitors, and this would show you the latency by subtracting the PC's side from phones's side |
Scrcpy is very usefull to me. However, I wonder the following:
Is it possible to add a real-time latency display in the projector window using USB? and how to implement it?
I can pay for this function.
The text was updated successfully, but these errors were encountered: