Installation of VDR 1.4.1

From Erlands Wiki

Jump to: navigation, search

Contents

Preparation of linux kernel for building VDR

  • 1. sudo apt-get install libjpeg62-dev gcc build-essential make automake autoconf libcap-dev
  • 2. export CC=/usr/bin/gcc-3.4
  • 3. sudo apt-get linux-source-2.6.15
  • 4. cd /usr/src
  • 5. umask 0002
  • 6. tar xjvf linux-source-2.6.15.tgz
  • 7. ln -s linux-source-2.6.15 linux
  • 8. cd linux
  • 9. cp /boot/config-`uname -r` .config
  • 10. make oldconfig

Compilation of VDR

  • 1. sudo useradd vdr
  • 2. sudo groupadd vdr
  • 3. sudo adduser vdr vdr
  • 4. sudo addgroup vdr video
  • 5. cd /usr/src
  • 6. umask 0002
  • 7. Add the following to /etc/apt/sources.list:
deb-src http://e-tobi.net/vdr-experimental sid base addons vdr
  • 8. Create a new file /etc/apt/preferences with the following information:
Package: *
Pin: release o=e-tobi.net
Pin-Priority: 1001
  • 9. sudo apt-get update
  • 10. apt-get source vdr
  • 11. Comment the “deb-src http://e-tobi.net/vdr-experimental sid base addons vdr” line in /etc/apt/sources.list
  • 12. sudo apt-get update
  • 13. ln -s vdr-1.4.1 VDR
  • 14. ln -s linux DVB
  • 15. cp ./Make.config.template ./Make.config
  • 16. vi Make.config
  • 17. Change the lines:
CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
VIDEODIR = /video
PLUGINLIBDIR = $(PLUGINDIR)/lib
To
CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
VIDEODIR = /mnt/vdrvideo
PLUGINLIBDIR = /usr/local/lib
Changing the VIDEODIR is of course optional, changing the CXXFLAGS is only required if you run AMD64
  • 18. export VDR_USER=vdr
  • 19. make
  • 20. sudo make install
  • 21. sudo mkdir /etc/vdr
  • 22. sudo chown -R vdr:vdr /etc/vdr
  • 23. sudo cp *.conf /etc/vdr/
  • 24. sudo
  • 25. sudo vi /usr/local/bin/runvdr
  • 26. sudo locale-gen en_US
  • 27. Add the following lines at the top of the file:
export LANG="en_US"
export LD_LIBRARY_PATH="/usr/local/lib"
  • 28. Change the line:
VDRCMD="$VDRPRG -w 60 $*"
To:
VDRCMD="$VDRPRG -w 60 -u vdr --config=/etc/vdr --lib=/usr/local/lib $*"
  • 29. Change the lines:
# Load all DVB driver modules needed for your hardware:
function LoadDriver()
{
}
# Unload all DVB driver modules loaded in LoadDriver():
function UnloadDriver()
{
}
To:
# Load all DVB driver modules needed for your hardware:
function LoadDriver()
{
return
}
# Unload all DVB driver modules loaded in LoadDriver():
function UnloadDriver()
{
return
}
  • 30. Change the line:
VDRPRG="./vdr"
To:
VDRPRG="/usr/local/bin/vdr"
  • 31. You should now be able to run vdr as:
sudo /usr/local/bin/runvdr 

Installation of ffmpeg

  • 1. sudo apt-get install xlibs-dev libasound2-dev libxv-dev zlib1g-dev
  • 2. cd /usr/src
  • 3. umask 0002
  • 4. svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
  • 5. Add current date to the directory:
mv ffmpeg ffmpeg_2007-08-06
  • 6. cd ffmpeg_2007-08-06
  • 7. ./configure –prefix=/usr/local –enable-shared –enable-pp –enable-gpl
  • 8. make clean
  • 9. make
  • 10. sudo make install
  • 11. sudo make install-libs
  • 12. mv ffmpeg ffmpeg_2006-06-11

Installation of softdevice

  • 1. Activate the following line /etc/apt/sources.list again:
deb-src http://e-tobi.net/vdr-experimental sid base addons vdr
  • 2. sudo apt-get update
  • 3. cd /usr/src/VDR/PLUGINS/src
  • 4. apt-get source vdr-plugin-softdevice
  • 5. Comment the following line /etc/apt/sources.list:
deb-src http://e-tobi.net/vdr-experimental sid base addons vdr
  • 6. sudo apt-get update
  • 7. rm vdr-plugin-softdevice_0.2.3a-3.diff.gz
  • 8. rm vdr-plugin-softdevice_0.2.3a-3.dsc
  • 9. rm vdr-plugin-softdevice_0.2.3a.orig.tar.gz
  • 10. ln -s vdr-plugin-softdevice-0.2.3a softdevice
  • 11. cd softdevice
  • 12. vi Makefile
  • 13. Change the following:
DFB_SUPPORT=1
FB_SUPPORT=1
VIDIX_SUPPORT=1
LIBXDPMS_SUPPORT = 1
SUSPEND_BY_KEY = 1
To:
#DFB_SUPPORT=1
#FB_SUPPORT=1
#VIDIX_SUPPORT=1
#LIBXDPMS_SUPPORT = 1
#SUSPEND_BY_KEY = 1
Leaving XV_SUPPORT enabled
  • 14. Save and exist
  • 15. Download softdevice-0.2.2-ffmpeg.diff and unzip it and apply the patch with:
patch < softdevice-0.2.2-ffmpeg.diff
  • 16. If you are compiling on AMD64, download softdevice-0.2.3.amd64.diff and unzip it and apply the patch with:
patch < softdevice-0.2.3.amd64.diff
  • 17. cd /usr/src/VDR
  • 18. For some reason I was required to do a “make clean” before next command due to permission errors
  • 19. make plugins
  • 20. sudo make install-plugins PLUGINLIBDIR=/usr/local/lib
  • 21. sudo vi /usr/local/bin/runvdr
  • 22. Change the line:
VDRCMD="$VDRPRG -w 60 -u vdr --config=/etc/vdr --lib=/usr/local/lib $*"
To:
VDRCMD="$VDRPRG -w 60 -u vdr --config=/etc/vdr --lib=/usr/local/lib --plugin='softdevice -vo xv:full -ao alsa' $*"

Scanning channels

  • 1. cd ~
  • 2. sudo apt-get install dvb-utils
  • 3. Create an initial tuning file for scan or find one in /usr/share/doc/dvb-utils/examples/
In my case this meant running:
scan -o vdr /usr/share/doc/dvb-utils/examples/scan/dvb-c/se-comhem > ~/channels.conf
  • 4. Edit the ~/channels.conf file and remove channels you are not interested in
  • 5. cp ~/channels.conf /etc/vdr/.
Personal tools