Watch digital TV with VDR and a streaming client

From LinuxIntro
Revision as of 14:34, 12 July 2012 by Fmherschel (Talk)

Jump to: navigation, search



This article describes some aspects to setup an enviroment with a VDR server and a xine stream client.

Here typically should be the obligatory screenshot of my desktop showing the running stream - I add that later on :)

The setup as basic for this article

We need some Hardware - I my case:

  • a laptop DELL D620
  • an external USB S2 digtital HD device TeVii S660
  • a TechnoTrend remote control (because unfortunately the remote control support of TeVii S660 is buggy in my setup)

And of course some software repositories - in my case:

  • Base OS is openSUSE 11.4
  • Additional package repositories: TBD

We setup the following componets

Setup Procedure

  • Setup your openSUSE 11.4 to have the following installation channels: please note that installing packages from untrusted sources could compromise your system
  | Alias                | Name                       | Enabled | Refresh | Priority | Type   | URI                                                                         
  | openSUSE-11.4-11.4-0 | openSUSE-11.4-11.4-0       | Yes     | No      |   99     | yast2  | cd:///?devices=/dev/disk/by-id/ata-TSSTcorp_DVD+_-RW_TS-U633F_R3476GRSB01273
  | packman-essentials   | packman-essentials         | Yes     | Yes     |   99     | rpm-md |                       
  | packman-multimedia   | packman-multimedia         | Yes     | Yes     |   99     | rpm-md |                       
  | repo-debug           | openSUSE-11.4-Debug        | No      | Yes     |   99     | NONE   |              
  | repo-debug-update    | openSUSE-11.4-Update-Debug | No      | Yes     |   99     | NONE   |                             
  | repo-non-oss         | openSUSE-11.4-Non-Oss      | Yes     | Yes     |   99     | yast2  |                
  | repo-oss             | openSUSE-11.4-Oss          | Yes     | Yes     |   99     | yast2  |                    
  | repo-source          | openSUSE-11.4-Source       | No      | Yes     |   99     | NONE   |             
  | repo-update          | openSUSE-11.4-Update       | Yes     | Yes     |   99     | rpm-md |
  • Install VDR and xine packages - sou might need also some dependent packages so use zypper to resolve dependencies
Name                  | Version   | Vendor                         | Project Url
vdr-plugin-xine       | 0.9.4     |  |
vdr                   | 1.6.0     | openSUSE                       |
libxine1-pulse        |  |  |
vdr-plugin-xine       | 0.9.4     |  |
libxine1-codecs       |  |  |
xine-ui               | 0.99.6    |  |
libxine1              |  |  |
xine-skins            | 1.0.3     | Packman                        |
gxine-browser-plugin  | 0.5.907   |  |
kdebase4-runtime-xine | 4.6.0     | openSUSE                       |
libxine2              | 1.2.1     |  |
gxine                 | 0.5.907   |  |
xinetd                | 2.3.14    | openSUSE                       |
phonon-backend-xine   | 4.4.4     | openSUSE                       |
libxine1-gnome-vfs    |  |  |
  • Install optional VDR packages
vdr-plugin-cutalot 0.0.3 openSUSE
vdr-plugin-epgsearch 0.9.24 obs://
vdr-plugin-streamdev 0.0_CVS20080716080048 openSUSE

Remark: Using the xine plugin (from repository PackMan) you could use xine for a complete VDR client (with full control over all menus).

  • Adapt plugin configuration /etc/sysconfig/vdr (the plugin "remote" is optional and can be dropped, if you use lirc)
    • With plugin remote:
VDR_PLUGINS="remote xine"
VDR_PLUGIN_ARGS_remote="-i /dev/input/ir"
    • Without plugin remote
VDR_PLUGINS="remote xine"
VDR_PLUGIN_ARGS_remote="-i /dev/input/ir"
  • Restart VDR
 /etc/init.d/vdr restart
  • start watching VDR: - You should get a OSD message from VDR that tells you to train VDR to understand your remote control or keyboard sequences
xine vdr://

In this setup we proceed to integrate the Technotrend Remote control to be able to send signals to LIRCD and than configure VDR to understand LIRCD commands...

TechnoTrend USB Remote-Control

Low Level Test with mode2

To test, if the IR keys are recognized on a very low level test using command mode2. This works also without lircd.

furka:~ # mode2 -d /dev/lirc0
space 3508766
pulse 806
space 744
pulse 806
lircd configuration

In openSUSE 11.4 lircd is configured via

## Description:    lirc (infrared remote control) configuration
## Type:           string
## Default:        "660"
## ServiceRestart: lirc
# permissions for /dev/lircd

## Type:        string
## Default:     "root:video"
# owner and group for /dev/lircd

## Type:        string
## Default:     ""
# use given driver

## Type:        string
## Default:     ""
# read from given device

## Type:        string(lirc_bt829,lirc_gpio,lirc_i2c,lirc_it87,lirc_parallel,lirc_sir,ir-kbd-i2c,ir-kbd-gpio)
## Default:     ""
# load given lirc driver module

## Type:        string
## Default:     ""
# listen for network connections on specified port.
# WARNING: don't use this on a machine with an internet
# connection as lircd is running as root!

## Type:        string
## Default:     ""
# connect lircd to specified host

/etc/lirc/lircd.conf (enthaelt die definition der Fernbedienungstasten)

# this config file was automatically generated
# using lirc-0.8.3(default) on Wed Jul  2 21:51:15 2008
# contributed by 
# brand:                                   Technotrend
# model no. of remote control: 
# devices being controlled by this remote: TV-Card
begin remote
 name       Technotrend
 bits                 6
 eps                 30
 aeps                100 
 one                 889   889
 zero                889   889
 plead               889
 pre_data_bits         7
 pre_data           0x55
 gap              113792
 toggle_bit            2
 frequency         36000
 duty_cycle           50
     begin codes
         Power                    0x01
         Mute                     0x18
         1                        0x03
         2                        0x04
         3                        0x05
         4                        0x06
         5                        0x07
         6                        0x08
         7                        0x09
         8                        0x0A
         9                        0x0B
         0                        0x0C
         Audio                    0x1A
         Repeat                   0x02
         vol-                     0x26
         vol+                     0x25
         Text                     0x19
         ch-                      0x24
         ch+                      0x23
         Exit                     0x13
         OK                       0x0F
         Up                       0x0D
         Down                     0x11
         Left                     0x0E
         Right                    0x10
         Red                      0x14
         Green                    0x15
         Yellow                   0x16
         Blue                     0x17
         Record                   0x3A
         Play                     0x3B
         Stop                     0x3C
         Info                     0x12
         Rew                      0x3D
         Pause                    0x3E
         Fwd                      0x3F
         EPG                      0x22
     end codes

end remote
lircd start and start at boot time
furka:~ # rclirc start
Starting lircd (/dev/lirc0)                                          done
furka:~ # chkconfig lirc on
lircd-client Connection Test

To test, if a client of lircd could recognize key presses use command irw. This command is part of package lirc.

furka:~ # irw
000000000000154c 00 0 Technotrend
000000000000154c 01 0 Technotrend
000000000000154c 00 0 Technotrend
000000000000154c 01 0 Technotrend
  • If you do NOT have a valid config file for your remote you might create one interactive using irrecord
irrecord -d /dev/lirc0 file

lirc to talk with vdr

File /etc/vdr/remote.conf needs to contain those additional entries for accepting lircd keys:

LIRC.Up         Up
LIRC.Down       Down
LIRC.Menu       Repeat
LIRC.Ok         OK
LIRC.Back       Exit
LIRC.Left       Left
LIRC.Right      Right
LIRC.Red        Red
LIRC.Green      Green
LIRC.Yellow     Yellow
LIRC.Blue       Blue
LIRC.0          0
LIRC.1          1
LIRC.2          2
LIRC.3          3
LIRC.4          4
LIRC.5          5
LIRC.6          6
LIRC.7          7
LIRC.8          8
LIRC.9          9
LIRC.Info       Info
LIRC.Play       Play
LIRC.Pause      Pause
LIRC.Stop       Stop
LIRC.Record     Record
LIRC.FastFwd    Fwd
LIRC.FastRew    Rew
LIRC.Power      Power
LIRC.Channel+   ch+
LIRC.Channel-   ch-
LIRC.Volume+    vol+
LIRC.Volume-    vol-
LIRC.Mute       Mute


Auf dem Laptop Latitude D820 habe ich einen vdr installiert mit einer externen USB-Box TVii 660

Installation of the DVB-S2 USB-Box


Installation vdr



We need / expore the following VDR plugins:

  • xine
  • streamdev
  • libxineoutput

Video clients

Remote Streaming: vdr-plugin-streamdev

vlc - What is already running is that you can watch TV and also switch the programm. But you do not have full control over VDR using that method.


URL in general:


You need to setup the file /etc/vdr/streamdev.conf:

# streamdev.conf:

Passender /etc/sysconfig/vdr Auszug


With xineliboutput

vlc tcp://localhost:37890

But how to switch the program using this connection?

Best practice local access with OSD: vdr-plugin-xine

This is the recommended way if you want to watch TV on the computer where VDR is running.

Using the xine plugin (from repository PackMan) you could use xine for a complete VDR client (with full control over all menus).

  • install it:
yast -i vdr-plugin-xine
  • Matching line in /etc/sysconfig/vdr (the plugin "remote" is optional and can be dropped, if you use lirc)
 VDR_PLUGINS="remote xine"
 VDR_PLUGIN_ARGS_remote="-i /dev/input/ir"
  • Restart VDR
 /etc/init.d/vdr restart
  • start watching TV:
xine vdr://

Remote Control

TeVii S660 remote control is a bit painfull for me

Translation: <TBD>

  • Mit dem Update von c.a. Mitte März auf den Herstellerseiten (auf Simplon Download/Tevii) geht nun die Erkennung der Fernbedienung
  • Kleiner Patch in ./v4l/dw2102.c die Ausgaben von "query RC..." auskommentiert (also nicht aktiv), weil sonst der syslog voll läuft
  • VDR meldet (ohne Config s.u.) beim Starten, dass er kein lirc findet, allerdings scheint die Fernbedienung als Tastatur zur funktionieren:
    • Test mit fb bringt messages im syslog (kann ggf später entfallen)
    • xev zeigt tastaturreaktion, wenn man fb bedient
    • KDE lautstärke regler funktioniert bereits :)
    • Cursorbewegungen (auf/ab/rechts/links) funktinieren u.a. hier im wiki :)
    • war jetzt nach einigen Eingaben nicht stabil - prüfen!

In den VDR bindet man die Fernbedienung mit dem plugin remote ein. Passender Auszug aus der /etc/sysconfig/vdr

 VDR_PLUGIN_ARGS_remote="-i /dev/input/ir

Die Berechtigungen für das IR-device (/dev/input/ir) müssen so eingestellt werden, dass der VDR (Benutzer vdr) darauf Zugreifen darf.

 chown vdr:users /dev/input/ir

Die FB muss beim ersten Benutzen im VDR trainiert werden, wenn die Datei /etc/vdr/remote.conf nicht angepasst wird (Datei stelle ich bei Bedarf zur Verfügung :).


Liste der Xine und VDR Pakete
Pakete und DISTURL
  • obs://
libdvdread4 obs://
libdvdread3 obs://
xine-skins obs://
xine-ui obs://
xine-browser-plugin obs://
gxine obs://
gxine-browser-plugin obs://
vdr-plugin-xine obs://
  • obs://
libxine1 obs://
libxine1-codecs obs://
libxine1-gnome-vfs obs://
libxine1-pulse obs://
  • obs://
xinetd obs://
vdr-plugin-epgsearch obs://
vdr-plugin-cutalot obs://
phonon-backend-xine obs://
vdr-plugin-remote obs://
vdr-plugin-streamdev obs://
vdr obs://
  • obs://
vdr-plugin-xineliboutput obs://
Pakete und VENDOR

rpm -qa --queryformat "%{NAME} %{VENDOR}\ " | egrep '(vdr|xine)' | sort -k2

  • Packman
gxine Packman
gxine-browser-plugin Packman
xine-browser-plugin Packman
xine-skins Packman
  • obs://
vdr-plugin-xineliboutput obs://
  • openSUSE
phonon-backend-xine openSUSE
vdr openSUSE
vdr-plugin-cutalot openSUSE
vdr-plugin-epgsearch openSUSE
vdr-plugin-remote openSUSE
vdr-plugin-streamdev openSUSE
xinetd openSUSE

See also