2014-03-18, 12:50
This is a short how-to on compiling vdr + vnsi from source on Ubuntu systems.
The steps are compiled from memory. In case you find errors please let me know.
1. Install required packages
2. Clone git repositories of vdr and vnsi (I have a folder progs/src in my home directory)
3. Create a symbolic link of vsniserver in source tree of vdr. vdr automatically builds plugins found in this folder
4. Build and install vdr. Without changing anything it will install to /usr/local
5. Create folders for vdr configuration files. I have those in /var/vdr. Make sure the user who starts vdr has permissions. On my systems this is user xbmc who is in group video
6. Copy some files from vdr source folder. We are still in ~/progs/src/vdr
7: Create folders required by plugin vnsiserver
8. Create script for running vdr. The sources folder has a template: runvdr.template
9. Edit this file with an editor of your choice and replace the line starting with VDRCMD with this block:
You may want to change some parameters or add additional plugins. See vdr wiki for command line options: http://linuxtv.org/vdrwiki/index.php/VDR_options
10. Autostart vdr
10.1 Create udev rule for detecting dvb card.
/etc/udev/rules.d/85-xbmc.rules
Other devices my require different parameters.
This rule fires an event "dvb-ready" for notifying upstart to launch vdr
10.2 Create upstart script
/etc/init/vdr.conf
I run vdr on the same machine as XBMC with a slightly raised priority.
The steps are compiled from memory. In case you find errors please let me know.
1. Install required packages
Code:
sudo apt-get install build-essential libjpeg62-dev libcap-dev libfontconfig1-dev gettext libncursesw5-dev libncurses5-dev
2. Clone git repositories of vdr and vnsi (I have a folder progs/src in my home directory)
Code:
cd ~/progs/src
git clone git://projects.vdr-developer.org/vdr.git
git clone https://github.com/FernetMenta/vdr-plugin-vnsiserver
3. Create a symbolic link of vsniserver in source tree of vdr. vdr automatically builds plugins found in this folder
Code:
cd vdr/PLUGINS/src
ln -s ~/progs/src/vdr-plugin-vnsiserver vnsiserver
4. Build and install vdr. Without changing anything it will install to /usr/local
Code:
cd ~/progs/src/vdr
make
sudo make install
5. Create folders for vdr configuration files. I have those in /var/vdr. Make sure the user who starts vdr has permissions. On my systems this is user xbmc who is in group video
Code:
sudo mkdir /var/vdr
sudo chown :video /var/vdr
sudo chmod -R g+w /var/vdr
6. Copy some files from vdr source folder. We are still in ~/progs/src/vdr
Code:
cp svdrphosts.conf /var/vdr
cp diseqc.conf /var/vdr
cp sources.conf /var/vdr
7: Create folders required by plugin vnsiserver
Code:
mkdir /var/vdr/plugins
mkdir /var/vdr/plugins/vnsiserver
cp PLUGINS/src/vnsiserver/vnsiserver/allowed_hosts.conf /var/vdr/plugins/vnsiserver
8. Create script for running vdr. The sources folder has a template: runvdr.template
Code:
sudo cp runvdr.template /usr/local/bin/runvdr
9. Edit this file with an editor of your choice and replace the line starting with VDRCMD with this block:
Code:
VDRPRG="/usr/local/bin/vdr"
VDRCMD="$VDRPRG -w 60 -c /var/vdr --epgfile=/var/vdr/epg.data -l 1 --no-kbd --video=/home/xbmc/MyVideos --localedir=/usr/local/share/locale \
-P'vnsiserver -t 5' $*"
export VDR_CHARSET_OVERRIDE="ISO-8859-15"
export LANG="de_DE.UTF-8"
You may want to change some parameters or add additional plugins. See vdr wiki for command line options: http://linuxtv.org/vdrwiki/index.php/VDR_options
10. Autostart vdr
10.1 Create udev rule for detecting dvb card.
/etc/udev/rules.d/85-xbmc.rules
Code:
#DVB
SUBSYSTEM=="dvb" , KERNEL=="dvb0.frontend0", ACTION=="add", RUN+="/sbin/initctl --quiet emit --no-wait dvb-ready"
Other devices my require different parameters.
This rule fires an event "dvb-ready" for notifying upstart to launch vdr
10.2 Create upstart script
/etc/init/vdr.conf
Code:
description "vdr"
start on (local-filesystems
and net-device-up IFACE=lo
and dvb-ready)
stop on runlevel [!2345]
nice -1
pre-start script
while [ ! -e /dev/dvb/adapter0/frontend0 ]
do
sleep 1
done
end script
script
su -c /usr/local/bin/runvdr xbmc > /var/vdr/vdr.log 2>&1
end script
I run vdr on the same machine as XBMC with a slightly raised priority.