VDR

From Gentoo Wiki
Jump to: navigation, search
This page is a translated version of the page VDR and the translation is 55% complete.

Other languages:
English • ‎español • ‎日本語 • ‎한국어
The information in this article is probably outdated as of 12 de marzo de 2015. You can help the Gentoo Wiki by verifying and updating this article.

Este artículo contiene instruciones acerca de cómo preparar Gentoo Linux para DVB y VDR.

Información general de DVB

¿Qué es DVB?

DVB es el acrónimo de Digital Video Broadcasting (Difusión de Vídeo Digital). DVB describe métodos para transferir información digital de TV, radio, servicios interactivos como MHP, EPG y teletexto. Usando compresión de datos MPEG-2 o H.264 para HDTV es posible transferir varios canales en la misma frecuencia. A mayor compresión de datos, mayor número de canales que se pueden transferir, sin embargo se paga una pérdida de la calidad.

DVB puede transferirse de varias formas. La última letra identifica el método de transferencia, por ejemplo, DVB-T< para transmisiones terrestres. Existen otros tipos:

  • DVB-S para transmisión vía satélite.
  • DVB-C para transmisión por cable.
  • DVB-H para transmisión a dispositivos móviles (terrestres).
  • DVB-IPI para transmisión sobre redes IP, por ejemplo Internet.
  • DVB-RC(S/C/T) canal de retorno para la transmisión de servicios de datos, por ejemplo Internet de banda ancha.

Tipos y requerimientos de tarjetas DVB

Además de los diferentes métodos existentes para recibir un stream DVB, las tarjetas se clasifican por el tipo de salida producida. Hay tarjetas con decodificador implementado que ofrece acceso directo al stream por medio del dispositivo /dev/video. Estas tarjetas son tarjetas completas (full featured). Otras tarjetas no tienen decodificador, requieren un software instalado en el ordenador y son de bajo coste. Esto implica mayores requisitos del sistema. La CPU del ordenador debe funcionar al menos a 600 MHz y disponer de al menos de 256MB de RAM. Esta lista puede ser útil para identificar la tarjeta.

Preparar el sistema

Configurar el núcleo

En primer lugar, debe asegurarse de que el núcleo ofrece soporte para DVB y el dispositivo DVB instalado. Desde la versión 2.6 los controladores necesarios están incluidos. Compruebe la configuración del núcleo y asegúrese de seleccionar las siguientes opciones como controladores estáticos o como módulos.

KERNEL Opciones necesarias del núcleo
Input Device Support --->
* Event Interface
Device Drivers --->
<M> Multimedia Support --->
  [*] Digital TV support
   M  [Habilitar controlador(es)]

Additionally select the proper driver for the system's hardware. To find the right module for the card mark every driver as module. If a PCI card is being used, then install the sys-apps/pciutils package if it has not been previously installed. This will provide a helpful tool called lspci. For built-in drivers or if there is no PCI card in the system then skip this step and continue with Checking the kernel output.

root #emerge --ask sys-apps/pciutils

Después de arrancar desde el nuevo núcleo, lance pcimodules para listar los módulos requeridos.

root #pcimodules
ohci-hcd
ehci-hcd
sis900
snd-emu10k1
b2c2-flexcop-pci
nvidia nvidiafb

In this case the module b2c2-flexcop-pci needs to be loaded. Add the module's name to the /etc/conf.d/modules file:

ARCHIVO /etc/conf.d/modules
modules="b2c2-flexcop-pci"

Comprobar la salida del núcleo

It is recommended to mark every driver as module, so that the required module can be added dynamically, especially if it is unclear at first which module should be added. If the module name is known then select the driver as a built-in driver. Compile the kernel, install the modules, and boot the new kernel. Verify the kernel has successfully detected the PCI card by using the dmesg utility.

If the system has a TerraTec Cinergy T2 card the output might look something like the following:

root #dmesg | grep DVB
DVB: registering new adaptor (TerraTec/qanu USB2.0 Highspeed DVB-T Receiver).
input: TerraTec/qanu USB2.0 Highspeed DVB-T Receiver remote control as /class/input/input2

Instalar VDR

To install VDR simply emerge it:

root #emerge --ask media-video/vdr

Installing the remote control

There are at least two ways to control VDR via an infrared remote control. If the TV card has an onboard IR receiver then vdr-remote can be used. Otherwise, use LIRC.

Instalar vdr-remote

Install the plugin via an emerge command:

root #emerge --ask media-plugins/vdr-remote
root #eselect vdr-plugin enable remote

When using the remote plugin for the IR port on a DVB card everything should be fine with the default configuration. It automatically uses the input device which has "dvb" in its name. For more advanced uses take a look at /etc/conf.d/vdr.remote file.

Alternativa: instalar LIRC

If the card can be remotely controlled but managing it via vdr-remote is not desired, then LIRC should be configured. LIRC interprets the pressed keys and returns a name for each one. A program that supports LIRC waits for key events and runs the action configured in the configuration file, mostly stored in the configuration directory of the executing program (e.g. mplayer loads the file ~/.mplayer/lircrc). Before LIRC is installed add lirc as a USE flag and add a special variable called LIRC_DEVICES to /etc/portage/make.conf Use this list to find the proper arguments for the new make.conf variable.

ARCHIVO /etc/portage/make.conf
# (Reemplace "devinput" por el controlador apropiado) LIRC_DEVICES="devinput"
USE="lirc"
root #emerge --ask app-misc/lirc

At start each key code must be defined with a name. Most supported remote controls are configured already, so take a look at the remote list. Download the required file and save it as /etc/lircd.conf. Now find out where to access the remote control. Run the following command to get a list of the current input devices (make sure the device is running).

root #cat /proc/bus/input/devices
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="TerraTec/qanu USB2.0 Highspeed DVB-T Receiver remote control"
P: Phys=usb-0000:00:1d.7-1/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event1 B: EV=100003
B: KEY=108fc210 2043 0 0 0 0 8000 2080 1 9e1680 0 0 ffc

In this case the Terratec Cinergy T2 device plugged in, so the device can be accessed over /dev/input/<event1>. Replace <event1> with the matching device listed in the output.

lircd needs to know the device to use. Add the following line to the /etc/conf.d/lircd file. Remember to replace <devinput> with the name of the driver and <event1> with the actual device:

ARCHIVO /etc/conf.d/lircd
LIRCD_OPTS="-H <devinput> -d /dev/input/<event1>"

It is time to start lircd:

root #/etc/init.d/lircd start

Now it should be possible to watch lircd capturing and decoding key presses. Run the irw command. Stop it by pressing Ctrl+C when enough keys have been pressed.

root #irw
0000000000001aa2 00 Exit Technisat_TTS35AI.conf 
0000000000001a8d 00 Mute Technisat_TTS35AI.conf 
0000000000000a97 00 OK Technisat_TTS35AI.conf 
0000000000000a97 01 OK Technisat_TTS35AI.conf 
0000000000000a92 00 Menu Technisat_TTS35AI.conf

Next, add it to the default runlevel so that it starts automatically at boot time:

root #rc-update add lircd default

To be able to use the remote control, LIRC support must be enabled in VDR. Add the following line to the /etc/conf.d/vdr file:

ARCHIVO /etc/conf.d/vdr
IR_CTRL="lirc"

Video output methods

Now decide on one (and only one) of the following video output devices which show the picture and the overlayed On Screen Display (OSD).

Decodificación Hardware: Tarjetas DVB completas (full featured)

Install media-plugins/vdr-dvbhddevice when using an TechnoTrend Premium S2-6400 Twin HD, or general hardware decoding for SDTV and HDTV (MPEG2 and MPEG4 AVC/H.264):

root #emerge --ask media-plugins/vdr-dvbhddevice

Para Fujitsu_Siemens, Hauppage WinTV, TechnoTrend Premium S2300 y tarjetas basadas en este diseño de referencia o hardware de decodificación general para SDTV (MPEG1 y MPEG2):

root #emerge --ask vdr-dvbsddevice

Decodificación Hardware: Tarjetas DXR3/Hollywood+

To use a DXR3 card for VDR output the vdr-dxr3 plugin is needed:

root #emerge --ask vdr-dxr3
ARCHIVO /etc/conf.d/modules
modules="em8300"

El módulo em8300 necesita alguna configuración que depende de la revisión exacta de la tarjeta.

Decodificación Hardware: Tarjetas PVR350

Since PVR350 cards have an onboard MPEG-Decoder chip it should be used to its full potential. In order for this to happen the vdr-pvr350 plugin is needed. If ivtv-driver is not yet installed emerge should automatically install it. To have the ivtv module loaded at boot time add it to the /etc/conf.d/modules list:

root #emerge --ask media-plugins/vdr-pvr350
ARCHIVO /etc/conf.d/modules
modules="ivtv"

Decodificación Software: vdr-xineliboutput

Some people prefer to use vdr-xineliboutput, because it can work remotely. Follow the next set of instructions to configure vdr-xineliboutput on a host and client. First, the host setup:

root #emerge --ask media-plugins/vdr-xineliboutput
root #eselect vdr-plugin enable xineliboutput

Adding command line options at this point is crucial for xineliboutput to work. For more options, see vdr --help.

ARCHIVO /etc/conf.d/vdr.xineliboutput
_EXTRAOPTS="--local=none --remote=37890"

El siguiente paso es editar /etc/vdr/svdrphosts.conf. Este fichero describe un número de direcciones de servidor a las cuales está permitido conectarse al puerto SVDRP del grabador del disco de vídeo que se está ejecutando en el sistema servidor.

ARCHIVO /etc/vdr/svdrphosts.conf
# (La sintaxis correcta es: Dirección-[/Máscara de red])
127.0.0.1 (aceptar siempre localhost)
192.168.1.0/24 (cualquier máquina de la red local)
#204.152.189.113 (una máquina específica)
#0.0.0.0/0 (cualquier máquina en cualquier red. ¡ÚSELO CON CUIDADO!)

When using vdr-xineliboutput to view the picture on the same computer as the one running VDR it is now possible to continue with #creating the channel list.

Otherwise, simply emerge media-plugins/vdr-xineliboutput on the client:

root #emerge --ask media-plugins/vdr-xineliboutput

Later (after having started VDR) the vdr-sxfe xvdr://hostname command can be used to connect to the VDR and view its picture and OSD.

Nota
There is also a plugin which simulates the existence of a real output device (vdr-dummydevice) for some fancy uses like record-only servers, but that is more advanced than a normal VDR setup.

Creating a channel list

To make VDR really useful an appropriate channel list must be created. There is more than one way to get a working list of channels (besides downloading one). The channel list installed by default is for DVB-S reception on Astra on 19.2° E.

Usar dvbscan desde linuxtv-dvb-apps

root #emerge --ask media-tv/linuxtv-dvb-apps

Find the correct frequency list for region and type of reception of interest. These files are stored under /usr/share/dvb. For reception with DVB-T in Germany, Berlin /usr/share/dvb/dvb-t/de-Berlin should be used:

user $dvbscan -o vdr /usr/share/dvb/scan/dvb-t/de-Berlin > /etc/vdr/channels.conf

Usar vdr-reelchannelscan

First, delete the contents of the existing channel list:

root #rm /etc/vdr/channels.conf
root #emerge --ask vdr-reelchannelscan
root #eselect vdr-plugin enable reelchannelscan

Canales para sistemas con vdr-analogtv

It is a good idea to configure channels at this point. The VDR project provides users with some examples which can be found at /usr/share/doc/vdr-analogtv-$version/examples/, as long as media-plugins/vdr-analogtv-1.0.00-r1 and up has been installed.

Arrancar VDR

After having all basic software parts ready on the system the VDR with its OSD must be configured.

If a hardware decoder for picture output is used, then the connected TV should be turned on. When using software output the client for this must be started after VDR.

First, learn the key definitions; that is, connecting keys on the remote control to VDR's internal commands.

Nota
To edit the keyboard configuration, or (more likely) to delete it to go back to learning the keys the special configuration file can be modified. VDR stores its key-definitions in /etc/vdr/remote.conf.

Comenzamos arrancando VDR:

root #/etc/init.d/vdr start
* Preparing start of vdr:
* config files ... [ ok ]
* Waiting for prerequisites (devices nodes etc.) ... [ ok ]
* Starting vdr ... [ ok ]
* First start of vdr: No check for running vdr possible
* until control device (remote/keyboard) keys are learnt!
Nota
Los usuarios de decodificadores software deben arrancar ahora el programa cliente que abre la ventana para mostrar la imagen de TV y el OSD.

Para los usuarios de vdr-softdevice:

root #ShmClient

Para los usuarios de vdr-xineliboutput:

root #vdr-sxfe xvdr://nombre_de_máquina

Las teclas más útiles para VDR son:

  • Teclas del cursor (Izquierda/Derecha/Arriba/Abajo)
  • Menu/Salir/Ok
  • Colores (Rojo/Verde/Amarillo/Azul)
  • Teclas numéricas (0-9)
Importante
If not many keys exist on the remote be sure to assign these. Some remotes have Play/Pause/etc. on the same keys as the colors, so use them for the colors.

Now that the basic installation is over it is time to configure VDR. Switch to the output screen and follow the on-screen instructions. VDR asks the user to press various keys on the remote control so it can learn the correct key codes. If a remote control is not present, then the keyboard can be used as an alternative.

Now add the VDR init script to the default runlevel to get it started each time the computer boots:

root #rc-update add vdr default

Solución de problemas

If help is needed feel free to ask someone in #gentoo-vdr, or look around on the Gentoo forums


This article is based on a document formerly found on our main website gentoo.org.
The following people have contributed to the original document: Norman Golisz, Dimitry Bradt, Matthias Schwarzott, Joshua Saddler
They are listed here as the Wiki history does not provide for any attribution. If you edit the Wiki article, please do not add yourself here, your contributions are recorded on the history page.