HDMI Capturing and latency

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

pixout

  • Posts: 8
  • Joined: Wed Jan 24, 2024 2:26 pm
  • Location: Latvia
  • Real Name: Dmitry Klepikov

HDMI Capturing and latency

PostThu Jan 25, 2024 9:29 am

I have found somewhere on the BMD forum mentioning about 2 / 3 frames latency on DeckLink card while capturing HDMI. I'm planning to use W-DLK-33 (DeckLink Mini Recorder 4K).

Let's assume I have 1080P 60Hz resolution:
    1. Each ~17ms DeckLink should send a callback with a new frame
    2. I need to process each frame. Iterate over it (usually partially, only region) and proceed around 2K RGB pixels. It could get till 10ms

What kind of latency could be in such a situation?

p.s
Of course, I can optimize it, and process data in the additional thread so BMD callback will return immediately.
Offline

pixout

  • Posts: 8
  • Joined: Wed Jan 24, 2024 2:26 pm
  • Location: Latvia
  • Real Name: Dmitry Klepikov

Re: HDMI Capturing and latency

PostTue Jan 30, 2024 2:47 pm

Getting answer on my question from BMD support team, maybe it will be useful for others:

The Latency would depend on several different factors, but capture with DirectGPU should have low latency. 

When using Nvidia GPUDirect, frames are passed directly from the frame buffer on the card to your GPU. This process bypasses the CPU for extremely fast frame delivery. 

The InputLoopThrough (CPU) sample provides latency measurements for input, processing and output. The "processing" section of the sample is just simulated processing time using delays, but you can use the same latency measuring techniques to check for latency here. 

For reference, on my MacBook Pro M2 with InputLoopThrough, I am getting a capture latency of roughly 35ms, processing latency of 5ms and output latency of roughly 58ms. In total, this is about 3 frames.

However, this is with CPU processing and not GPU processing with DirectGPU. The GPUDirect process will perform differently from InputLoopThrough's CPU processing but unfortunately, that sample does not have latency measurements.


Return to Software Developers

Who is online

Users browsing this forum: No registered users and 14 guests