]> git.sesse.net Git - nageru-docs/blob - hdmisdi.rst
80a7a4c81e3c5f65b98552a86b1c5811972411e0
[nageru-docs] / hdmisdi.rst
1 HDMI/SDI output
2 ===============
3
4 Sometimes, what you want from a video mixer isn't a stream, just another
5 output that goes to e.g. a projector—or you might want the live stream,
6 but also a monitor output on a separate display. You could of course play
7 the stream on another PC, but for many uses, the end-to-end latency is
8 too high, and you might not want to involve a full extra PC just for this
9 anyway.
10
11 Thus, since 1.5.0, Nageru supports using a spare output card for HDMI/SDI
12 output, turning it into a simple, reasonably low-latency audio/video switcher.
13
14
15 Setting up HDMI/SDI output
16 --------------------------
17
18 Turning on HDMI/SDI output is simple; just right-click on the live view and
19 select the output card. (Equivalently, you can access the same functionality
20 from the _Video_ menu in the regular menu bar.) Currently, this is supported
21 for DeckLink cards only (PCI/Thunderbolt), as the precise output protocol for
22 the Intensity Shuttle cards is still unknown. The stream and recording will
23 keep running just as before.
24
25 A video mode will automatically be picked for you, favoring 59.94 fps if possible,
26 but you can change the mode on-the-fly to something else if you'd like,
27 as long as the resolution matches with what you've set up at program start.
28 Note that whenever HDMI/SDI output is active, the output card will be the
29 master clock; you cannot change it to any of the input cards. This also means
30 that the frame rate you choose here will determine the frame rate for the
31 stream.
32
33
34 A note on latency
35 -----------------
36
37 For a regular stream, a few seconds of latency is usually acceptable
38 (clients will typically buffer at least a few seconds), and thus,
39 working hard to shave off single frames' worth of latency is not worth it.
40 However, for a live output, every millisecond of latency counts;
41 if you have a stage with a projector behind it, 500 ms latency on
42 the projector looks distinctly out of sync with what's happening
43 on stage. Thus, HDMI/SDI output typically has much stricter
44 latency demands than usual streaming.
45
46 Nageru is capable of low latency operation, but not extremely low latency;
47 for instance, it waits for an entire frame to arrive before processing
48 it. (This is a complexity and flexibility tradeoff; anything else would make
49 e.g. scaling nearly impossible.) Well-designed hardware switcher setups can do
50 **cut-through switching** to get latency down to as little as one frame [#]_ or
51 less, ie. 16.7 ms at 60 fps; Nageru can get down to 2–3 frames (50 ms)
52 given the right hardware, and in general, 100 ms isn't hard. 
53
54 .. [#] Since almost all latency in a realtime video setup is caused by processing of various
55        forms and not by length of the cable, most forms of latency will be
56        proportional to the length of a frame. Thus, one will often see latency
57        calculated in terms of number of frames, not milliseconds, and video at
58        higher frame rates will often see less delay. Networking (and by extension
59        streaming) is different; there, jitter and delay is more often caused
60        by propagation and administrative delays, and latency is more often
61        independent of the frame rate.
62
63
64 Typical sources of latency
65 ..........................
66
67 This section aims to illuminate some of the sources of latency and how to deal
68 with them. Note that often, latency is at odds with throughput, and so,
69 tradeoffs must be made. The most important sources of latency are:
70
71 - Jitter and queuing latency
72 - Processing latency
73 - Output latency
74 - Audio latency
75
76 TODO: Write something about them.
77
78 (TODO: Write something about time codes here.)