1

I'm working on an application that screen captures a monitor in real-time, encodes it, sends it over ethernet, decodes it, then displays that monitor in an application.

So I put the decoder application on the same monitor that is being captured. I then open a timer application and put it next to the decoder application. I can then start the timer and see the latency between main instance of the timer and the timer within the application.

What's weird is that if I take a picture of the monitor with a camera, I get one latency measurement (almost always ~100ms) but if I take a Print Screen of the monitor, the latency between the two is much lower (~30-60ms).

Why is that? How does Print Screen work? Why would it result in 40+ ms difference? Which latency measurement should I trust?

jpdev
  • 27
  • 1
  • 3

1 Answers1

-1

Print Screen saves the screenshot to your clipboard which is stored on your RAM (highest speed storage system in your computer), whereas what you are doing probably writes the screenshot data to your HDD/SSD and then reads it again to send over the internet, which takes a lot longer to do.

  • One of them is a Print Screen of the monitor and one is a picture of the monitor with a camera phone. My theory is that print screen is pulling directly from the frame buffer where as the camera is taking a picture after monitor/display lag. So the 40ms difference ends up being monitor latency. However, the monitor claims its got a 10ms response time. So something isn't adding up. – jpdev May 29 '20 at 01:09
  • With virtual memory, you do not *ever* control, whether any given block of memory resides in physical RAM. Besides, if RAM were indeed the *"highest speed storage system in your computer"*, we certainly wouldn't need to spend transistors on L1, L2, and L3 caches, or CPU register files. – IInspectable Jun 23 '20 at 05:15
  • I understand what you're saying about the caches on CPU, but general users don't have to worry about that so I did not bother mentioning it. I'll be sure to include a more verbose description next time. Thanks for the tip – Arshia Rostami Jun 25 '20 at 21:22