How to compile vdr + vnsiserver from source
#1
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
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.
Reply
#2
Hi Fernet Menta

What is the option "t -5 " in your VDRCMD ?
Are there more options ?
I didn't find any information about options until now.
(not in https://github.com/opdenkamp/xbmc-pvr-ad...vnsiserver
README ... and not in some howtos)

Any other options/settings needed for getting the VDR-OSD visible ?
I just get an empty window in client-specifi-section until now. But i see that i have to press "Info" with IR-remote to get out from the unvisible OSD.
(Compiling on Opensuse13.1, vdr 2.0.5, xbmc-13 and vnsiserver5+addon from git March 17th)

Everything else runs great !!! Thanks a lot !
Reply
#3
Quote:What is the option "t -5 " in your VDRCMD ?

This means that vnsiserver sends status of a TV stream every 5 seconds. This is a legacy option and should be moved to setup in the future. All other configurable parameters can be set via vdr setup menu, plugins section.

Quote:Any other options/settings needed for getting the VDR-OSD visible ?

It should be visible as soon as you enter this dialog. Sometimes you have to press ok when in controlling UI mode. If you do not see the UI, you may have loaded other plugins like LiveAdmin which grab the UI before vnsi can. VNSI only hooks into the UI if this dialog is shown.
Reply
#4
The compile has faild for me at vdr compiling:

*** Plugin skincurses:
g++ -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -c -DPLUGIN_NAME_I18N='"skincurses"' -I/home/progs/src/vdr/include -o skincurses.o skincurses.c
skincurses.c:9:21: fatal error: ncurses.h: No such file or directory
#include <ncurses.h>
^
compilation terminated.
make[1]: *** [skincurses.o] Error 1

*** Plugin status:
make[1]: Nothing to be done for `all'.

*** Plugin svdrpdemo:
make[1]: Nothing to be done for `all'.

*** Plugin vnsiserver:
make[1]: Nothing to be done for `all'.

*** failed plugins: skincurses

make: *** [plugins] Error 1

P.s.:
I just wanted to give it a try since i am on iptv but it is pain in the ass to install compared to tvheadend. So i just used thise ppa:yavdr/unstable-vdr but even there it will not start when i try to run it.

root@Biostar:/home/progs/src/vdr# sudo /etc/init.d/vdr restart
Restarting Linux Video Disk Recorder: vdr - seems not to be running
Searching for plugins (VDR 2.0.3/2.0.0) (cache hit): vnsiserver5.

and it never starts.
Reply
#5
install libncurses5-dev
sudo apt-get install libncurses5-dev
Reply
#6
Om now it has installed.
Note a small typo in line:
sudo cp runvdr.template /usr/local/bin/runvdr

Still it will not run. Under ls is not listed and also no interface is available at port 8008. It says:

root@Biostar:~# /usr/local/bin/vdr
vdr: no primary device found - using first device!
I assume it is because i have no dvb cards installed. Will try to compile iptv for vdr and will see if it will fire.
Reply
#7
Hi FernetMenta

I using xbmcbuntu 13 i compiled vdr 2.1.6 from git and vnsiserver from yours git repository

I have problem making autostart script I make udev rule and copy the init vdr.conf file

After reboot vdr don't start and don't know what could be problem

Please help
Reply
#8
try to narrow the issue down:

1) does vdr start with /usr/local/bin/runvdr ?
2) does it start with sudo start vdr ?

did you copy the vdr.conf posted without modification?
Reply
#9
vdr start from terminal command "sudo vdr -P vnsiserver -P dvbapi" and everything ok
yes i copy it without modification

maybe binary file is somewhere else?
Reply
#10
you did not answer my questions.

1) does vdr start with /usr/local/bin/runvdr work?
Reply
#11
I will try...
Reply
#12
(2014-10-15, 21:16)FernetMenta Wrote: you did not answer my questions.

1) does vdr start with /usr/local/bin/runvdr work?

Yes vdr start with this command hmm i am out of my mind where is the problem?
Reply
#13
now try 2) sudo start vdr
does this work?
Reply
#14
Hi

When I type "sudo start vdr" i get: vdr stop/waiting
Reply
#15
I followed your HowTo but somethimg must going wrong.
VDR doesent start.. i get the following error

Code:
xbmc@mediacenter:~$ /usr/local/bin/runvdr
/usr/local/bin/runvdr: 50: /usr/local/bin/runvdr: Syntax error: "(" unexpected
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply

Logout Mark Read Team Forum Stats Members Help
How to compile vdr + vnsiserver from source1