From faee0573b093e3e4d40c15ae50f1d882da4d8faa Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 5 Apr 2017 23:24:39 +0200 Subject: [PATCH] Write about timecode and loop debugging. --- hdmisdi.rst | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/hdmisdi.rst b/hdmisdi.rst index 55ea0a5..064fe85 100644 --- a/hdmisdi.rst +++ b/hdmisdi.rst @@ -194,5 +194,34 @@ lowest and highest will be printed. Do note that the measurement is still done over a single *output* frame; it is *not* a measurement over the last 100 output frames, even though the statistics are only printed every 100th. -TODO: Write something about time codes here. - +Another trick that can be useful in some situations is *looping* your signal, +ie., connecting your output back into your input. This allows you to measure +delays that don't happen within Nageru itself, like any external converters, +delays in the input driver, etc.. (It can also act as a sanity check to make +sure your A/V chain passes the signal through without quality degradation, +if you first set up a static picture as a signal and then switch to the loop +input to verify that the signal stays stable without color shifts e.g. [#]_) + +For this, the *timecode output* is useful; you can turn it on from the Video +menu, or through the command-line flag *--timecode-stream*. (You can also +output it to standard output with the flag *--timecode-stdout*.) It contains +some information about frame numbers and current time of day; if you activate +it, switch to the loop input and then deactivate it while still holding the +loop input active, the timecode will start repeating with roughly the +same length as your latency. (It can't be an exact measurement, as delay is +frequently fractional, and a loop length cannot be.) The easiest way to find +the actual length is to look at the recorded video file by e.g. dumping each +frame to an image file and looking at the sequence. + +In general, using Nageru's own latency measurement is both the simplest and +the most precise. However, the timecode is a useful supplement, since it +can also test external factors, such as network stream latency. + +.. [#] If you actually try this with Nageru, you will see some + dark “specks” slowly appear in the image. This is a consequence of + small roundoff errors accumulating over time, combined with Nageru's + static dither pattern that causes rounding to happen in the same + direction each time. The dithering used by Nageru is a tradeoff between + many factors, and overall helps image quality much more than it + hurts, but in the specific case of an ever-looping signal, it will + cause such artifacts. -- 2.39.2