Skip to content

a-mair/vdr-plugin-live

This branch is 87 commits behind MarkusEh/vdr-plugin-live:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Markus Ehrnsperger
Mar 29, 2024
7cbf8bb · Mar 29, 2024
Feb 13, 2015
Apr 4, 2013
Jan 11, 2021
Jan 21, 2024
Mar 29, 2024
Jan 18, 2024
May 25, 2017
Jan 1, 2011
Jan 2, 2007
Jun 18, 2023
Jan 3, 2024
Dec 2, 2023
Nov 19, 2023
Nov 19, 2023
May 23, 2021
Jan 3, 2024
Jan 3, 2024
Jan 3, 2024
Nov 24, 2023
Aug 9, 2020
Dec 4, 2023
Aug 9, 2020
May 22, 2021
May 22, 2021
May 26, 2017
May 22, 2021
May 23, 2021
May 20, 2017
May 20, 2017
Dec 1, 2023
Jan 25, 2023
May 13, 2021
Jan 17, 2023
Aug 9, 2020
Aug 9, 2020
Oct 9, 2022
Oct 9, 2022
Oct 29, 2023
Sep 17, 2007
Mar 29, 2024
Jan 27, 2024
Oct 27, 2023
Jan 25, 2023
Dec 3, 2023
Jan 4, 2024
Jun 17, 2017
Feb 16, 2021
May 23, 2021
Mar 29, 2024
Jan 27, 2024
May 22, 2021
May 13, 2021
May 22, 2021
Dec 3, 2023
Jun 11, 2023
Jan 3, 2024
Nov 19, 2023
Dec 4, 2023
Jul 16, 2022
Feb 10, 2015
Jan 29, 2024
Jan 3, 2024
Dec 3, 2023
Feb 16, 2021
Nov 23, 2023
Nov 23, 2023
Nov 23, 2023

Repository files navigation

This is a "plugin" for the Video Disk Recorder (VDR).

Written by:                  Thomas Keil <tkeil@datacrystal.de>
                             Sascha Volkenandt <sascha@akv-soft.de>

Currently maintained by:
                             Markus Ehrnsperger ( MarkusE @ https://www.vdr-portal.de)

Previously Maintained by:
                             Dieter Hametner <dh+vdr@gekrumbel.de>
                             Christian Wieninger <cwieninger@gmx.de>
                             Jasmin Jessich <jasmin@anw.at>

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 plugin providing the
possibility to interactively control the VDR and some of it's plugins by
a web interface.

Unlike external utility programs that communicate with VDR and it's plugins
by SVDRP, Live has direct access to VDR's data structures and is thus very
fast.


Requirements:
=============

VDR >= 2.4.0

gcc >= v8, must support -std=c++17
PCRE2 >= 10.38     	- https://github.com/PhilipHazel/pcre2/releases
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 webserver functions for live and needs cxxtools.
Boost provides some data structures we need. While currently relying on the
full blown package we might provide a stripped down version in the future.

PCRE2 provides filtering for recordings using perl regexp language.
If you don't need filtering, PCRE2 is optional.

If you optionaly want to regenerate the i18n-generated.h header file
for backward compatible i18n (VDR version prior to 1.5.7) you also
need: (See also the Internationalization section below)

Locale::PO 		- perl module from CPAN www.cpan.org

The default i18n-generated.h header contains all
translations from GIT. Users that just want to stay on bleeding development
edge of live do not need Locale::PO installed.

How to get Locale::PO
- Use search function on www.cpan.org to obtain module.
- Check if your distribution provides the package.
  (e.g. in Debian the package name is liblocale-po-perl)

If you added new translations in your language specific .po file and
still want to use an VDR older than version 1.5.7 you must regenerate
i18n-generated.h by calling make with the target generate-i18n. Only
in this case you need to have Locale::PO installed on your system.


Installation:
=============

If you compile the plugin outside of the VDR source codes you must
copy the resulting binary to VDRs directory where the other plugins
are expected.

In order to work correctly you must copy the subdirectory 'live' from
the source distribution to the directory where the vdr plugins look
for their resource files. The pure VDR default for this config
directory is: /video/plugins, but this depends also from the
parameters -c or -v (see 'vdr --help' for details).

cp -a <live-src-dir>/live <vdr-resource-dir>/plugins


Setup:
======

Live provides a username/password protection, so that it can be used from
the internet. The default username and password are:

	admin/live

The default port is 8008.

You can also specifiy this parameter via commandline:

  -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 now. 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
  -t <...>  --tvscraperimages=/path/to/tvscraperimages	use images created by tvscraper   DEPRECATED!
  --chanlogos=/path/to/channellogos                      use channel logos (PNG only, case sensitive)
Example:
  --tvscraperimages=/var/cache/vdr/plugins/tvscraper   DEPRECATED!
Note: tvscraperimages is not required any more, live uses the internal service interface "GetEnvironment" for plugins to get this information from tvscraper/scraper2vdr


The rest of the parameters can be adjusted in VDR's OSD or in the web
interface.

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 seperator ":@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 for ssl connections:
============================================

To make LIVE listen for incoming ssl connections you`ll have to use a
Tntnet version > 1.6.0.6. By default it will listen on port 8443.

	* Example: https://localhost:8443

In order to start the SslListener LIVE requires a SSL certificate. If
no SSL certificate is specified via commandline 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
commandline 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 commandline option.

Note: Since the gnutls SslListener was broken in Tntnet versions prior
to SVN revision 1035 you will have to recompile Tntnet with
"./configure --with-ssl=openssl" to make it work. Alternatively
install version 1.6.2 or higher of tntnet on your system.


SSL Commandline 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 litte
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 certifcate 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 (eg. 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'n dirty way to create a SSL self-signed
certicate.  Recent browsers (like Firefox 3) 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 webserver integrated into the
plugin structure VDR needs.

This webserver, 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.


Internationalization (i18n)
===========================

LIVE uses the same i18n support like VDR does since version 1.5.7.
This version of LIVE can not support i18n compatible with VDR versions
older than 1.5.7.

All localization files are found in the po subdirectory of the LIVE
plugin source.


Security consideratios
======================

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
beem enhanced to check the paths before returning files.  A second
measure against missuse 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.

Packages

No packages published

Languages

  • C++ 73.3%
  • JavaScript 19.6%
  • CSS 5.0%
  • Makefile 1.2%
  • C 0.4%
  • Shell 0.3%
  • Other 0.2%