]> git.sesse.net Git - nageru/blob - README
Release Nageru 1.7.2.
[nageru] / README
1 Nageru is a live video mixer, based around the standard M/E workflow.
2
3
4 Features:
5
6  - High performance on modest hardware (720p60 with two input streams
7    on my Thinkpad X240[1]); almost all pixel processing is done on the GPU.
8
9  - High output quality; Lanczos3 scaling, subpixel precision everywhere,
10    white balance adjustment, mix of 16- and 32-bit floating point
11    for intermediate calculations, dithered output, optional 10-bit input
12    and output support.
13
14  - Proper sound support: Syncing of multiple unrelated sources through
15    high-quality resampling, multichannel mixing with separate effects
16    per-bus, cue out for headphones, dynamic range compression,
17    three-band graphical EQ (pluss a fixed low-cut), level meters conforming
18    to EBU R128, automation via MIDI controllers.
19
20  - Theme engine encapsulating the design demands of each individual
21    event; Lua code is responsible for setting up the pixel processing
22    pipelines, running transitions etc., so that the visual look is
23    consistent between operators.
24
25  - HTML rendering (through Chromium Embedded Framework), for high-quality
26    and flexible overlay or other graphics.
27
28  - Comprehensive monitoring through Prometheus metrics.
29
30 [1] For reference, that is: Core i7 4600U (dualcore 2.10GHz, clocks down
31 to 800 MHz after 30 seconds due to thermal constraints), Intel HD Graphics
32 4400 (ie., without the extra L4 cache from Iris Pro), single-channel DDR3 RAM
33 (so 12.8 GB/sec theoretical memory bandwidth, shared between CPU and GPU).
34
35
36 Nageru currently needs:
37
38  - An Intel processor with Intel Quick Sync, or otherwise some hardware
39    H.264 encoder exposed through VA-API. Note that you can use VA-API over
40    DRM instead of X11, to use a non-Intel GPU for rendering but still use
41    Quick Sync (Nageru does this automatically for you if needed).
42
43  - Two or more Blackmagic USB3 or PCI cards, either HDMI or SDI.
44    The PCI cards need Blackmagic's own drivers installed. The USB3 cards
45    are driven through the “bmusb” driver, using libusb-1.0. If you want
46    zerocopy USB, you need libusb 1.0.21 or newer, as well as a recent
47    kernel (4.6.0 or newer). Zerocopy USB helps not only for performance,
48    but also for stability. You need at least version 0.7.0.
49
50  - Movit, my GPU-based video filter library (https://movit.sesse.net).
51    You will need at least version 1.5.2.
52
53  - Qt 5.5 or newer for the GUI.
54
55  - QCustomPlot for the histogram display in the frame analyzer.
56
57  - libmicrohttpd for the embedded web server.
58
59  - x264 for encoding high-quality video suitable for streaming to end users.
60
61  - ffmpeg for muxing, and for encoding audio. You will need at least
62    version 3.1.
63
64  - Working OpenGL; Movit works with almost any modern OpenGL implementation.
65    Nageru has been tested with Intel on Mesa (you want 11.2 or newer, due
66    to critical stability bugfixes), and with NVIDIA's proprietary drivers.
67    The status of AMD's proprietary drivers is currently unknown.
68
69  - libzita-resampler, for resampling sound sources so that they are in sync
70    between sources, and also for oversampling for the peak meter.
71
72  - LuaJIT, for driving the theme engine.
73
74  - Optional: CEF (Chromium Embedded Framework), for HTML graphics.
75    If you build without CEF, the HTMLInput class will not be available from
76    the theme. You can get binary downloads of CEF from
77
78      http://opensource.spotify.com/cefbuilds/index.html
79
80    Simply download the right build for your platform (the “minimal” build
81    is fine) and add CEF_DIR=<path>/cef_binary_X.XXXX.XXXX.XXXXXXXX_linux64
82    on the make command line (substituting X with the real version as required).
83
84
85 If on Debian stretch or something similar, you can install everything you need
86 with:
87
88   apt install qtbase5-dev libqt5opengl5-dev qt5-default libqcustomplot-dev \
89     pkg-config libmicrohttpd-dev libusb-1.0-0-dev libluajit-5.1-dev \
90     libzita-resampler-dev libva-dev libavcodec-dev libavformat-dev \
91     libswscale-dev libavresample-dev libmovit-dev libegl1-mesa-dev \
92     libasound2-dev libx264-dev libbmusb-dev protobuf-compiler \
93     libprotobuf-dev
94
95 Exceptions as of April 2018:
96
97   - You will need Movit from testing or unstable; stretch only has 1.4.0.
98
99   - You will need bmusb from testing or unstable; stretch only has 0.5.4.
100
101   - Debian does not carry CEF (but it is optional).
102
103 The patches/ directory contains a patch that helps zita-resampler performance.
104 It is meant for upstream, but was not in at the time Nageru was released.
105 It is taken to be by Steinar H. Gunderson <sesse@google.com> (ie., my ex-work
106 email), and under the same license as zita-resampler itself.
107
108 To start it, just hook up your equipment, type “make” and then “./nageru”.
109 It is strongly recommended to have the rights to run at real-time priority;
110 it will make the USB3 threads do so, which will make them a lot more stable.
111 (A reasonable hack for testing is probably just to run it as root using sudo,
112 although you might not want to do that in production.) Note also that if you
113 are running a desktop compositor, it will steal significant amounts of GPU
114 performance. The same goes for PulseAudio.
115
116 Nageru will open a HTTP server at port 9095, where you can extract a live
117 H264+PCM signal in nut mux (e.g. http://127.0.0.1:9095/stream.nut).
118 It is probably too high bitrate (~25 Mbit/sec depending on content) to send to
119 users, but you can easily send it around in your internal network and then
120 transcode it in e.g. VLC. A copy of the stream (separately muxed) will also
121 be saved live to local disk.
122
123 If you have a fast CPU (typically a quadcore desktop; most laptops will spend
124 most of their CPU on running Nageru itself), you can use x264 for the outgoing
125 stream instead of Quick Sync; it is much better quality for the same bitrate,
126 and also has proper bitrate controls. Simply add --http-x264-video on the
127 command line. (You may also need to add something like "--x264-preset veryfast",
128 since the default "medium" preset might be too CPU-intensive, but YMMV.)
129 The stream saved to disk will still be the Quick Sync-encoded stream, as it is
130 typically higher bitrate and thus also higher quality. Note that if you add
131 ".metacube" at the end of the URL (e.g. "http://127.0.0.1:9095/stream.ts.metacube"),
132 you will get a stream suitable for streaming through the Cubemap video reflector
133 (cubemap.sesse.net). A typical example would be:
134
135   ./nageru --http-x264-video --x264-preset veryfast --x264-tune film \
136       --http-mux mp4 --http-audio-codec libfdk_aac --http-audio-bitrate 128
137
138 If you are comfortable with using all your remaining CPU power on the machine
139 for x264, try --x264-speedcontrol, which will try to adjust the preset
140 dynamically for maximum quality, at the expense of somewhat higher delay.
141
142 See --help for more information on options in general.
143
144 The name “Nageru” is a play on the Japanese verb 投げる (nageru), which means
145 to throw or cast. (I also later learned that it could mean to face defeat or
146 give up, but that's not the intended meaning.)
147
148
149 Nageru's home page is at https://nageru.sesse.net/, where you can also find
150 contact information, full documentation and link to the latest version.
151
152
153 Legalese: TL;DR: Everything is GPLv3-or-newer compatible, and see
154 Intel's copyright license at quicksync_encoder.h.
155
156
157 Nageru is Copyright (C) 2015 Steinar H. Gunderson <steinar+nageru@gunderson.no>.
158 Portions Copyright (C) 2003 Rune Holm.
159 Portions Copyright (C) 2010-2015 Fons Adriaensen <fons@linuxaudio.org>.
160 Portions Copyright (C) 2012-2015 Fons Adriaensen <fons@linuxaudio.org>.
161 Portions Copyright (C) 2008-2015 Fons Adriaensen <fons@linuxaudio.org>.
162 Portions Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.
163
164
165 This program is free software: you can redistribute it and/or modify
166 it under the terms of the GNU General Public License as published by
167 the Free Software Foundation, either version 3 of the License, or
168 (at your option) any later version.
169
170 This program is distributed in the hope that it will be useful,
171 but WITHOUT ANY WARRANTY; without even the implied warranty of
172 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
173 GNU General Public License for more details.
174
175 You should have received a copy of the GNU General Public License
176 along with this program.  If not, see <http://www.gnu.org/licenses/>.
177
178
179 Portions of quicksync_encoder.h and quicksync_encoder.cpp:
180
181 Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.
182
183 Permission is hereby granted, free of charge, to any person obtaining a
184 copy of this software and associated documentation files (the
185 "Software"), to deal in the Software without restriction, including
186 without limitation the rights to use, copy, modify, merge, publish,
187 distribute, sub license, and/or sell copies of the Software, and to
188 permit persons to whom the Software is furnished to do so, subject to
189 the following conditions:
190
191 The above copyright notice and this permission notice (including the
192 next paragraph) shall be included in all copies or substantial portions
193 of the Software.
194
195 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
196 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
197 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
198 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
199 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
200 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
201 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
202
203
204 All files in decklink/:
205
206 Copyright (c) 2009 Blackmagic Design
207 Copyright (c) 2015 Blackmagic Design
208
209 Permission is hereby granted, free of charge, to any person or organization
210 obtaining a copy of the software and accompanying documentation covered by
211 this license (the "Software") to use, reproduce, display, distribute,
212 execute, and transmit the Software, and to prepare derivative works of the
213 Software, and to permit third-parties to whom the Software is furnished to
214 do so, all subject to the following:
215
216 The copyright notices in the Software and this entire statement, including
217 the above license grant, this restriction and the following disclaimer,
218 must be included in all copies of the Software, in whole or in part, and
219 all derivative works of the Software, unless such copies or derivative
220 works are solely in the form of machine-executable object code generated by
221 a source language processor.
222
223 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
226 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
227 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
228 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
229 DEALINGS IN THE SOFTWARE.
230
231
232 Marked parts of theme.cpp (Lua shims):
233
234 The MIT License (MIT)
235
236 Copyright (c) 2013 Hisham Muhammad
237
238 Permission is hereby granted, free of charge, to any person obtaining a copy of
239 this software and associated documentation files (the "Software"), to deal in
240 the Software without restriction, including without limitation the rights to
241 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
242 the Software, and to permit persons to whom the Software is furnished to do so,
243 subject to the following conditions:
244
245 The above copyright notice and this permission notice shall be included in all
246 copies or substantial portions of the Software.
247
248 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
249 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
250 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
251 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
252 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
253 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.