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