]> git.sesse.net Git - nageru-docs/commitdiff
Write about latency measurement.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 3 Apr 2017 21:51:00 +0000 (23:51 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 3 Apr 2017 21:51:00 +0000 (23:51 +0200)
conf.py
hdmisdi.rst
streaming.rst

diff --git a/conf.py b/conf.py
index 422f6e9c3526f09b831503edd6e674c1ab8f9e33..ad652dc91814639d0e89cc4ab6039322164271ab 100644 (file)
--- a/conf.py
+++ b/conf.py
@@ -30,7 +30,9 @@
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
-extensions = []
+extensions = [
+    'sphinx.ext.autosectionlabel',
+]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
index c3028af503a97103fb347743756528823e94d173..64fc924675b93bb31dc4c04a5d95c89fc7ad3958 100644 (file)
@@ -166,7 +166,32 @@ and for HDMI/SDI output.
 Measuring latency
 .................
 
-TODO: Write about latency measurements.
+In order to optimize latency, it can be useful to measure it, but for most
+people, it's hard to measure delays precisely enough to distinguish reliably
+between e.g. 70 and 80 milliseconds by eye alone. Nageru gives you some simple
+tools that will help.
+
+The most direct is the flag *--print-video-latency*. This samples, for every
+100th frame, the latency of that frame through Nageru. More precisely,
+it measures the wall clock time from the point where the frame is received from
+the input card driver (and put into the input queue) to up to four different
+points:
+
+ * **Mixer latency:** The frame is done processing on the GPU.
+ * **Quick Sync latency:** The frame is through :ref:`VA-API H.264 encoding <digital-intermediate>`
+   and ready to be muxed to disk. (Note that the mux might still be waiting
+   for audio before actually outputting the frame.)
+ * **x264 latency:** The frame is through :ref:`x264 encoding <transcoded-streaming>`
+   and ready to be muxed to disk and/or the network. (Same caveat about the
+   mux as the previous point.)
+ * **DeckLink output latency:** The HDMI/SDI output card reports that it has
+   shown the frame.
+
+As every output frame can depend on multiple input frames, each with different
+input queue latencies, latencies will be measured for each of them, and the
+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.
 
index 13d68db3377d1715f247764b524aff164b20e0c2..d6c44560b0ce5b882a7eaeb677510d77443f350a 100644 (file)
@@ -12,6 +12,8 @@ machines you may have available, you can choose two different
 approaches for streaming: **Transcoded** or **direct**.
 
 
+.. _transcoded-streaming:
+
 Transcoded streaming
 --------------------