Measure video delay from 2 sources?

I’d like to compare two live SDI video inputs and measure how much input A is delayed relative to input B in order to troubleshoot some external video gear. Is this possible in Touch? I can do it manually by adding a Cache TOP to input B, then run both signals into a Difference TOP. Then I adjust the Cache output index until the difference is a perfect match. But in this case the latency is variable, so I’m looking for a way to measure this number (in frames) in real-time to drive a Trail CHOP.

I started working on some ideas for this but found an issue. The Cache TOP seems to add a small delay even when its output index is set to zero. The amount of this delay varies.
Also — I’m not sure if there is a way to sync two AJA SDI inputs together… assuming they are the same frame rate, can we ensure Touch reads both at the exact same time?

Think it should/could be possible. Think this thread discusses a newly added option you’re looking for (thanks to @malcolm):

Having said all that, there will be a new ‘Sync To Input Frame’ mode that is operational for AJA devices (so far) in the next 2022.20000 series build we release, which waits for a frame to arrive over an SDI input, then TD’s frame will start operating.

Curious if this might help so please let us know the end result :wink:

The Cache TOP delay - I don’t see the symptom you are seeing. Are you sending a source TOP to a default Cache TOP which is going to a Difference TOP whose second input is the source TOP?

The “Sync To Input Frame” only works for a single input actually, so it won’t work for this usage case. For this usage cause you should use the “Sync Group” feature in the Video Device In TOP. This will correlate frames together based on the time they arrive along the wire. Assuming they are genlocked, then they should get timestamps that are close enough to be correlated together.
The Cache TOP doesn’t have any delay built into it if you have it set to 0 though, so something else is happening there.
In terms of auto-detecting the offset, that’s more tricky. If you could stamp a white square that moves along the bottom of the image, you could search for that in the frames and assign a frame offset number based on that, to try to get the variance.