OpenSuSE DVB-S2 - VDR

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Shutdownskript erstellen und ablegen)
(runvdr anpassen)
Zeile 94: Zeile 94:
  
 
====runvdr anpassen====
 
====runvdr anpassen====
cd /usr/local/bin
+
<pre>
vi runvdr
+
cd /usr/local/bin
 +
vi runvdr
 +
</pre>
 +
{{Box Datei | /usr/local/bin/runvdr |
 +
<pre>
 +
#!/bin/sh
 +
 +
# runvdr: Loads the DVB driver and runs VDR
 +
#
 +
# If VDR exits abnormally, the driver will be reloaded
 +
# and VDR restarted.
 +
#
 +
# In order to actually use this script you need to implement
 +
# the functions DriverLoaded(), LoadDriver() and UnloadDriver()
 +
# and maybe adjust the VDRPRG and VDRCMD to your particular
 +
# requirements.
 +
#
 +
# Since this script loads the DVB driver, it must be started
 +
# as user 'root'. Add the option "-u username" to run VDR
 +
# under the given user name.
 +
#
 +
# Any command line parameters will be passed on to the
 +
# actual 'vdr' program.
 +
#
 +
# See the main source file 'vdr.c' for copyright information and
 +
# how to reach the author.
 +
#
 +
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $<br>
  
#!/bin/sh
+
export LANG=de_DE
 +
export LC_COLLATE=de_DE
 +
 
 +
PATH=/usr/local/bin:$PATH
 +
VDRPRG="/usr/local/bin/vdr"
 +
VDRCMD="$VDRPRG -t /dev/tty8 -w 60 -c /etc/vdr -E /var/vdr --vfat \
 +
      -L /usr/local/src/vdr/PLUGINS/lib \
 +
      -s /usr/local/bin/vdrpoweroff.sh \
 +
      $*"
 
   
 
   
# runvdr: Loads the DVB driver and runs VDR
+
KILL="/usr/bin/killall -q -TERM"
#
+
 
# If VDR exits abnormally, the driver will be reloaded
+
# Detect whether the DVB driver is already loaded
# and VDR restarted.
+
# and return 0 if it *is* loaded, 1 if not:
#
+
function DriverLoaded()
# In order to actually use this script you need to implement
+
{
# the functions DriverLoaded(), LoadDriver() and UnloadDriver()
+
return 1
# and maybe adjust the VDRPRG and VDRCMD to your particular
+
}
# requirements.
+
 
#
+
# Load all DVB driver modules needed for your hardware:
# Since this script loads the DVB driver, it must be started
+
function LoadDriver()
# as user 'root'. Add the option "-u username" to run VDR
+
{
# under the given user name.
+
modprobe stb6100
#
+
modprobe stb0899
# Any command line parameters will be passed on to the
+
modprobe lnbp21
# actual 'vdr' program.
+
modprobe budget-ci
#
+
}
# See the main source file 'vdr.c' for copyright information and
+
# Unload all DVB driver modules loaded in LoadDriver():
# how to reach the author.
+
function UnloadDriver()
#
+
{
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $<br>
+
modprobe -r budget-ci
+
modprobe -r lnbp21
export LANG=de_DE
+
modprobe -r stb0899
export LC_COLLATE=de_DE
+
modprobe -r stb6100
+
}
PATH=/usr/local/bin:$PATH
+
# Load driver if it hasn't been loaded already:
VDRPRG="/usr/local/bin/vdr"
+
if ! DriverLoaded; then
VDRCMD="$VDRPRG -t /dev/tty8 -w 60 -c /etc/vdr -E /var/vdr --vfat \
+
  LoadDriver
        -L /usr/local/src/vdr/PLUGINS/lib \
+
  fi
        -s /usr/local/bin/vdrpoweroff.sh \
+
while (true) do
        $*"
+
+
KILL="/usr/bin/killall -q -TERM"
+
+
# Detect whether the DVB driver is already loaded
+
# and return 0 if it *is* loaded, 1 if not:
+
function DriverLoaded()
+
{
+
  return 1
+
}<br>
+
# Load all DVB driver modules needed for your hardware:
+
function LoadDriver()
+
{
+
modprobe stb6100
+
modprobe stb0899
+
modprobe lnbp21
+
modprobe budget-ci
+
}<br>
+
# Unload all DVB driver modules loaded in LoadDriver():
+
function UnloadDriver()
+
{
+
modprobe -r budget-ci
+
modprobe -r lnbp21
+
modprobe -r stb0899
+
modprobe -r stb6100
+
}<br>
+
# Load driver if it hasn't been loaded already:
+
if ! DriverLoaded; then
+
  LoadDriver
+
  fi<br>
+
while (true) do
+
 
       eval "$VDRCMD"
 
       eval "$VDRCMD"
 
       if test $? -eq 0 -o $? -eq 2; then exit; fi
 
       if test $? -eq 0 -o $? -eq 2; then exit; fi
Zeile 169: Zeile 173:
 
       echo "`date` restarting VDR"
 
       echo "`date` restarting VDR"
 
       done
 
       done
 +
</pre>
 +
}}

Version vom 29. September 2007, 21:19 Uhr

Inhaltsverzeichnis

Installation VDR

Videoverzeichnis vorbereiten

cd /data
mkdir vdrrecords
cd /
ln -s /data/vdrrecords/ video

VDR herunterladen und vorbereiten

cd /data/installfiles/vdr
wget ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.5.9.tar.bz2
cd /usr/local/src
tar -xjf /data/installfiles/vdr/vdr-1.5.9.tar.bz2
mv vdr-1.5.9/ vdr

VDR Patches herunterladen

Den hier aufgeführten Patch habe ich aus der Mailinglist entnommen.

cd /data/installfiles/vdr
wget http://www.linuxtv.org/pipermail/vdr/attachments/20070927/9b023c8d/attachment-0001.bin
mv attachment-0001.bin vdr-1.5.9-dvbs2-h264-syncearly-framespersec.diff

VDR für h264/DVBS2 patchen

cd /usr/local/src/vdr
patch -p1 -i /data/installfiles/vdr/vdr-1.5.9-dvbs2-h264-syncearly-framespersec.diff

Makefile anpassen

cd /usr/local/src/vdr
vi Makefile

LOCDIR   = /usr/local/src/vdr/locale
DVBDIR   = /usr/local/src/dvb/linux

ifdef DVBDIR
INCLUDES += -I$(DVBDIR)/include
endif

skincurses.c anpassen

cd /usr/local/src/vdr/PLUGINS/src/skincurses
vi skincurses.c

cCursesOsd::cCursesOsd(int Left, int Top)
:cOsd(Left, Top, 0)

Skripte und Konfigurationsdateien vorbereiten

cd /usr/local/src/vdr
cp -a svdrpsend.pl /usr/local/bin
mkdir -p /etc/vdr/plugins /var/vdr
mv *.conf /etc/vdr
mv channels.conf.cable /etc/vdr
mv channels.conf.terr /etc/vdr

channels.conf editieren und HDTV Kanäle hinzufügen

cd /etc/vdr
vi channels.conf
Datei
$VDRCONFIG/channels.conf
 
PREMIERE HD:11915:hM8:S19.2E:27500:767:771:0:0:129:0:6:0
DISCOVERY HD:11915:hM8:S19.2E:27500:1023:1027:0:0:130:0:6:0
ASTRA HD+:11915:hM8:S19.2E:27500:1279:1283:0:0:131:0:6:0
CANAL HD:12168:v:S19.2E:27500:169:116:0:0:9510:1:1088:0
ASTRA HD 01:12610:v:S19.2E:22000:133:134:0:0:21102:1:1112:0
ProSieben HD:12722:hM8:S19.2E:22000:255:259:0:0:10200:0:1119:0
Sat.1 HD:12722:hM8:S19.2E:22000:511:515:0:0:10201:0:1119:0
ASTRA HD:12722:hM8:S19.2E:22000:767:768:0:0:10202:0:1119:0
ANIXE HD:12722:hM8:S19.2E:22000:1023:1027:0:0:10203:0:1119:0
:@1000 New channels


Shutdownskript erstellen und ablegen

cd /usr/local/bin
vi vdrpoweroff.sh 
Datei
/usr/local/bin/vdrpoweroff.sh
 
#!/bin/bash
/sbin/poweroff 


cd /usr/local/bin
chmod +x vdrpoweroff.sh

VDR installieren

cd /usr/local/src/vdr/
make VFAT=1 all plugins && make install

VDR mittels runvdr starten

Das Skript runvdr wird benötigt um die DVB Treiber sowie den VDR zu starten.

runvdr anpassen

cd /usr/local/bin
vi runvdr
Datei
/usr/local/bin/runvdr
 
#!/bin/sh
 
# runvdr: Loads the DVB driver and runs VDR
#
# If VDR exits abnormally, the driver will be reloaded
# and VDR restarted.
#
# In order to actually use this script you need to implement
# the functions DriverLoaded(), LoadDriver() and UnloadDriver()
# and maybe adjust the VDRPRG and VDRCMD to your particular
# requirements.
#
# Since this script loads the DVB driver, it must be started
# as user 'root'. Add the option "-u username" to run VDR
# under the given user name.
#
# Any command line parameters will be passed on to the
# actual 'vdr' program.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $<br>

export LANG=de_DE
export LC_COLLATE=de_DE

PATH=/usr/local/bin:$PATH
VDRPRG="/usr/local/bin/vdr"
VDRCMD="$VDRPRG -t /dev/tty8 -w 60 -c /etc/vdr -E /var/vdr --vfat \
       -L /usr/local/src/vdr/PLUGINS/lib \
       -s /usr/local/bin/vdrpoweroff.sh \
       $*"
 
KILL="/usr/bin/killall -q -TERM"

# Detect whether the DVB driver is already loaded
# and return 0 if it *is* loaded, 1 if not:
function DriverLoaded()
{
 return 1
}

# Load all DVB driver modules needed for your hardware:
function LoadDriver()
{
modprobe stb6100
modprobe stb0899
modprobe lnbp21
modprobe budget-ci
}
# Unload all DVB driver modules loaded in LoadDriver():
function UnloadDriver()
{
modprobe -r budget-ci
modprobe -r lnbp21
modprobe -r stb0899
modprobe -r stb6100
}
# Load driver if it hasn't been loaded already:
if ! DriverLoaded; then
  LoadDriver
  fi
while (true) do
      eval "$VDRCMD"
      if test $? -eq 0 -o $? -eq 2; then exit; fi
      echo "`date` reloading DVB driver"
      $KILL $VDRPRG
      sleep 10
      UnloadDriver
      LoadDriver
      echo "`date` restarting VDR"
      done