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