-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathREADME
214 lines (149 loc) · 7.93 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
This is a "plugin" for the Video Disk Recorder (VDR).
Written by: Thomas Keil <[email protected]>
Sascha Volkenandt <[email protected]>
Currently maintained by: Markus Ehrnsperger ( MarkusE @ https://www.vdr-portal.de)
Previously Maintained by:
Dieter Hametner <[email protected]>
Christian Wieninger <[email protected]>
Jasmin Jessich <[email protected]>
Project's homepage: https://github.com/MarkusEh/vdr-plugin-live
Project's old homepage: http://live.vdr-developer.org
Latest version available at: https://github.com/MarkusEh/vdr-plugin-live
See the file COPYING for license information.
Description:
============
Live, the "Live Interactive VDR Environment", is a VDR plugin providing
a web interface to VDR and some of it's plugins.
Requirements:
=============
System using an UTF-8 locale
VDR >= 2.4.0
gcc >= v8, must support -std=c++17. -std=c++1z should also work for complilers not yet supporting -std=c++17.
Tntnet >= 2.2.1 - http://www.tntnet.org/download.hms // https://web.archive.org/web/20160314183814/http://www.tntnet.org/download.html
Cxxtools >= 2.2.1 - http://www.tntnet.org/download.hms // https://web.archive.org/web/20160314183814/http://www.tntnet.org/download.html
Tntnet provides basic Web server functions for live and needs cxxtools.
PCRE2 >= 10.38 - https://github.com/PhilipHazel/pcre2/releases
PCRE2 provides filtering for recordings using Perl regexp language.
If you don't need filtering, PCRE2 is optional.
Installation:
=============
If you compile the plugin outside of the VDR source code you must
copy the resulting binary to the directory where VDR plugins are expected.
You also must copy the subdirectory 'live' from the source distribution
to the directory where the VDR plugins look for their resource files.
The VDR default for this config directory is: /video/plugins, but this
depends also on the parameters -c or -v (see 'vdr --help' for details).
cp -a <live-src-dir>/live <vdr-resource-dir>/plugins
On debian like systems, <vdr-resource-dir> is /usr/share/vdr
======
Setup:
======
Configuration files:
====================
siteprefs.css
- Allows UI adjustments
ffmpeg.conf
- To play live tv / recordings directly in the browser, data must be converted.
ffmpeg commands used for this are in ffmpeg.conf
On debian like systems:
- These files are installed in /etc/vdr/plugins/live
- /var/lib/vdr/plugins/live/ffmpeg.conf is a symbolic link to /etc/vdr/plugins/live/ffmpeg.conf
- /usr/share/vdr/plugins/live/css/siteprefs.css is a symbolic link to /etc/vdr/plugins/live/siteprefs.css
Command line options:
=====================
The default port is 8008. You can change this via command line:
-p PORT, --port=PORT use PORT to listen for incoming connections
(default: 8008)
-i IP, --ip=IP bind server only to specified IP, may appear
multiple times
(default: 0.0.0.0, ::0)
Additional SSL options are available. See "How to make LIVE listen
for SSL connections" section below on hints how to setup SSL.
To display images or channel logos, you can use:
-e <...> --epgimages=/path/to/epgimages use EPG images created by plugins like tvm2vdr
--chanlogos=/path/to/channellogos use channel logos (PNG only, case sensitive)
Settings in VDR's OSD:
======================
Note: These settings are also available in the web interface.
Live provides a username/password protection. The default username and password are:
admin/live
The password is stored as a MD5 hash.
"Last Channel" is the last channel in the channels list, that live displays.
This is especially useful if you have VDR's automatic channel update active.
For example, you can add a group separator ":@1000 Found automatically" to
channels.conf and set this parameter to "1000". Thus, everything VDR finds
during scanning (which can after a few months be well more than 3000
channels) won't be displayed.
How to make LIVE listen to SSL connections:
============================================
In order to start the SslListener LIVE requires a SSL certificate. If
no SSL certificate is specified via command-line option, LIVE will try
to use the default certificate location
'$VDRDIR/plugins/live/live.pem'.
If neither the default nor the custom certificate (given by the
command-line option) could be found, LIVE will only start the default
HTTP Listener (default: 8008)
If you want do disable the SslListener for any reason, specify SSL port
number 0 with the command-line option.
SSL Command-line options:
=========================
-s PORT, --sslport=PORT use PORT to listen for incoming SSL connections
(default: 8443)
use PORT 0 to disable incoming SSL connections
-c CERT, --cert=CERT path to a custom SSL certificate file
(default: $CONFIGDIR/live.pem)
-k KEY, --cert=CERT path to a custom SSL certificate key file
(default: $CONFIGDIR/live-key.pem)
Creating a self-signed SSL server certificate:
==============================================
To create a self-signed certificate file you'll have to run this command:
$> cd /put/your/path/here/vdr/plugins/live
$> openssl req -new -x509 -keyout live-key.pem -out live.pem -days 365 -nodes
While generating the certificate you'll be asked to answer a couple of
questions. When it prompts to enter the "Common Name" you'll have to
specify the full qualified DNS server name of the machine LIVE is
running on (e.g. vdr.example.com). If your VDR doesn't have a full
qualified DNS name, you should use the IP Live is listening on.
Note: This is just a quick-and-dirty way to create a SSL self-signed
certificate. Browsers will complain about it because the certificate
wasn't signed by a known Certificate Authority (CA).
So how does LIVE work?
======================
Basically, Live itself is a Tntnet Web server integrated into the
plugin structure VDR needs.
This Web server, running in VDR's environment, is provided with all
public data structures VDR provides for plugins and thus has very fast
access to information like the EPG, timers or recordings.
Live's "pages" are written in "ecpp", a language integrating C++ and
HTML in one file, very much like e.g. PHP or ASP weave functionality
and "static" content information together.
Contribute!
===========
If you would like to contribute, please read doc/dev-contribute.txt
and doc/TODO.txt.
Security considerations:
========================
Please use live in a controlled environment only, like your home network
or a save VPN of your home network.
You cannot expect sufficient security to expose live to the public internet.
Of course, better security is always appreciated, so please send
patches increasing security.
One possible security issue (there might be others ...):
Live uses the Tntnet MapUrl mechanism to map different request URLs to
Tntnet components. One component 'content.ecpp' delivers files found
in the file system. When given the wrong 'path' it could retrieve any
file from the server where live runs on. Therefore content.ecpp has
been enhanced to check the paths before returning files. A second
measure against misuse is to limit the mappings from MapUrl to only
valid files. In the current version this approach has been taken. But
due to the 'difficulty' to fully understand regular expressions, this
might get spoiled again by 'unchecked' code contribution.
Errors
======
If VDR crashes on start with these journal messages:
loading plugin: /usr/local/lib/vdr/libvdr-live.so.x.x.
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Most likely, the locale is not installed correctly. On Debian based systems, use:
dpkg-reconfigure locales
and restart VDR.