Softhddevice-plugin

Aus VDR Wiki
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Beschreibung

Autor: Johns

A software and GPU emulated HD output device plugin for VDR.

  • Video VA-API/VA-API (with intel, nvidia and amd backend supported)
  • Video CPU/VA-API
  • Video VDPAU/VDPAU
  • Video CPU/VDPAU
  • Audio FFMpeg/Alsa/Analog
  • Audio FFMpeg/Alsa/Digital
  • Audio FFMpeg/OSS/Analog
  • HDMI/SPDIF Passthrough
  • VA-API bob software deinterlace
  • Auto-crop






Softwareanforderungen

  • media-video/ffmpeg (version >=0.7) - Complete solution to record, convert and stream audio and video. Includes libavcodec. [1]
  • media-libs/alsa-lib - Advanced Linux Sound Architecture Library [2] or kernel support for oss/oss4 or alsa oss emulation
  • x11-libs/libva - Video Acceleration (VA) API for Linux [3]

Einen der folgenden Treiber

  • x11-libs/libva-intel-driver - HW video decode support for Intel integrated graphics [4]
  • x11-libs/vdpau-video - VDPAU Backend for Video Acceleration (VA) API [5]
  • x11-libs/xvba-video - XVBA Backend for Video Acceleration (VA) API [6]

und

  • x11-libs/libxcb - X C-language Bindings library [7]
  • x11-libs/xcb-util
  • x11-libs/xcb-util-wm
  • x11-libs/xcb-util-keysyms - X C-language Bindings library [8] Only versions >= 0.3.8 are good supported
  • x11-libs/libX11 - X.Org X11 library [9]
  • GNU Make 3.xx [10]

Warning: libav is not supported, expect many bugs with it.

Installation

  • git
git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
cd vdr-plugin-softhddevice
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.

gentoo:

make VDRDIR=/usr/include/vdr LIBDIR=.
  • tarball

Download latest version from: [11]

tar vxf vdr-softhddevice-*.tar.bz2
cd softhddevice-*
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.

You can edit Makefile to enable/disable VDPAU / VA-API / Alsa / OSS support.


Konfiguration

Parameter

Parameter Beschreibung
-a audio_device Selects audio output module and device (fe. alsa: hw:0,0 oss: /dev/dsp)

"" - to disable audio output
/... - to use oss audio module (if compiled with oss support)
other - to use alsa audio module (if compiled with alsa support)

-p audio_device audio device for pass-through (hw:0,1 or /dev/dsp1)
-c channel_name audio mixer channel name (fe. PCM)
-d display display of x11 server (fe. :0.0)
-D start plugin detached, meaning it does not open a window on the X server. svdrp command ATTA shows the window (This information comes from YaVDR part of VDR portal
-f start with fullscreen window (only with window manager)
-g geometry x11 window geometry WxH+X+Y
-v device video device (va-api, vdpau, noop)
-s start in suspended mode
-x start x11 server
-w workaround enable/disable workarounds

no-hw-decoder - disable hw decoder, use software decoder only
no-mpeg-hw-decoder - disable hw decoder for mpeg only
alsa-driver-broken - disable broken alsa driver message
ignore-repeat-pict - disable repeat pict message

Einstellungen

remote.conf

Add "XKeySym." definitions to remote.conf to control the vdr and plugin with the connected input device. fe.

XKeySym.Up Up

XKeySym.Down Down

...

Additional to the x11 input sends the window close button "Close".

fe.

XKeySym.Power Close

Umgebungsvariablen

DISPLAY=:0.0 X11 Display Name
NO_HW=1 wenn 1, keine Hardwaredekoder verwenden
NO_MPEG_HW=1 wenn 1, keine Hardwaredekoder für MPEG1/2 verwenden
STUDIO_LEVELS=1 wenn 1, dann Studio Levels mit VDPAU verwenden (veraltet, nun als Plugin-Setupparameter (setup.conf) verfügbar)
folgende Variablen nur bei Verwendung von ALSA:
ALSA_DEVICE=default ALSA PCM Gerätename
ALSA_AC3_DEVICE= ALSA Gerät für AC3 Pass-Through
ALSA_MIXER=default ALSA-Mixer Gerätname
ALSA_MIXER_CHANNEL=PCM ALSA-Mixer Kanalname
folgende Variablen nur bei Verwendung von OSS:
OSS_AUDIODEV=/dev/dsp OSS DSP Gerätename
OSS_AC3_AUDIODEV= OSS AC3 Pass-Through Gerätename
OSS_MIXERDEV=/dev/mixer OSS-Mixer Gerätename
OSS_MIXER_CHANNEL=pcm OSS-Mixer Kanalname

setup.conf

softhddevice.MakePrimary = 1 0 = unverändert, 1 softhddevice wird Primärgerät beim Start
softhddevice.HideMainMenuEntry = 0 0 = zeige Hauptmenüeintrag von softhddevice, 1 = verstecke Eintrag
<res> der folgenden Paramenter ist 576i, 720p, 1080i_fake oder 1080i.

1080i_fake sind "krumme" Auflösungen wie 1280x1080 oder 1440x1080
1080i ist "echtes" FullHD mit 1920x1080

softhddevice.<res>.Scaling = 0 0 = normal, 1 = fast, 2 = HighQuality, 3 = anamorphic
softhddevice.<res>.Deinterlace = 0 0 = bob, 1 = weave, 2 = temporal, 3 = temporal_spatial, 4 = software

(bei VAAPI nur 0 und 1 unterstützt)

softhddevice.<res>.SkipChromaDeinterlace = 0 0 = nicht verwendet, 1 = verwendet (für weniger leistungsfähige Grafikkarten, schlechtere Qualität)
softhddevice.<res>.Denoise = 0 0 .. 1000 Rauschreduzierung (0 aus, 1000 maximal)
softhddevice.<res>.Sharpness = 0 -1000 .. 1000 Schärfeneinstellung (0 aus, -1000 maximal unscharf, 1000 maximal scharf)
softhddevice.AudioDelay = 0 Tonversatz +n oder -n in ms
softhddevice.AudioPassthrough = 0 0 = nicht verwendet, 1 = AC-3, für AC-3 wird das Pass-Through Gerät verwendet.
softhddevice.AutoCrop.Interval = 0 0 deaktiviert Autocrop

n: Autocrop prüft alle 'n' Frames.
Je kleiner desto mehr Leistung kostet es. 10 entspricht alle 200ms.

softhddevice.AutoCrop.Delay = 0 Sofern 'n' geprüfte Intervalle gleich sind, wird der erkannte Crop-Bereich abgeschnitten.

Je größer desto länger dauert es das umgeschaltet wird.

softhddevice.AutoCrop.Tolerance = 0 Wenn der ermittelte Crop-Bereich zu klein ist, werden maximal 'n' Pixel oben und unten abgeschnitten.

Je größer desto mehr Pixel können weggeschnitten werden, wenn nicht 100% 16:9 oder 14:9.

softhddevice.SkipLines = 0 Schneide 'n' Pixel Zeilen oben und unten des Videos weg.
softhddevice.StudioLevels = 0 0 verwende PC Levels (0-255) mit VDPAU.
1 verwende Studiolevels (16-235)mit vdpau.
softhddevice.Suspend.Close = 0 1 stoppt softhddevice und schliesst das X11 Fenster, Verbindungen und das Audiogerät.

(nutze svdrpsend plug softhddevice RESU zum Fortsetzen, wenn LIRC nicht verwendet wird)

softhddevice.Suspend.X11 = 0 1 beendet ebenfalls den X11-Server beim Stoppen von softhddevice (derzeit noch ohne Funktion)
softhddevice.60HzMode = 0 0 deaktiviert den 60Hz-Modus, 1 aktiviert den 60Hz-Modus (z.B. für LC-Displays)
softhddevice.SoftStartSync = 0 0 deaktiviert eine weiche Video/Audiosyncronisation, 1 aktiviert diese
VideoDisplayFormat = ? Auswahl des Modus der Videoanzeige:
0 pan and scan
1 letter box
2 center cut-out
(VDR-Einstellung)

Sonstiges

Tipps

Audio

  • Kein Ton bei 6 Kanal Ton

Entweder kann die Soundkarte kein 6 Kanalton oder libav/ffmpeg hat Probleme beim Umwandeln.

im .asoundrc im Heimverzeichnis des VDR Benutzers oder global zu /etc/asound.conf hinzufügen:

pcm.51to20 {
    type route
    slave.pcm {
        type hw
        card <deine karte>
        device <dein device>
        channels 2
   }
   ttable.0.0 1      # front links -> links
   ttable.1.1 1      # front rechts -> rechts
   ttable.2.0 0.707  # hinten links -> links, Dämpfung 3dB
   ttable.3.1 0.707  # hinten rechts -> rechts, Dämpfung 3dB
   ttable.4.0 0.5    # zentrum -> links, Dämpfung 6dB
   ttable.4.1 0.5    # zentrum -> rechts, Dämpfung 6dB
   ttable.5.0 0.5    # basskanal -> links, Dämpfung 6dB
   ttable.5.1 0.5    # basskanal -> rechts, Dämpfung 6dB
}

Dann bei vdr Argument fürs plugin '--plugin="softhddevice ... -a pcm.51to20 ..."' hinzufügen oder ändern. Dann im Menu -> Setup -> Plugins -> softhddevice -> Audio pass-through None stellen.


  • Keine Lautstärkenregelung möglich

Analog softhddevice regelt den "PCM" Regler automatisch. Wenn dieser anders heißt, kann man dies softhddevice mitteilen. Dazu mit "alsamixer" nachsehen wie dieser nun heißt. "Master" regelt alle Eingänge, zur Not kann man diesen nehmen. Bei Rechnern mit 6 Analogen Ausgängen ist es meist "Front". Das Vdr Startscript um

export ALSA_MIXER_CHANNEL=Front

ergänzen. Digital Digitale Ausgänge kann softhddevice nicht regeln. (noch nicht)

Mit diesem Eintrag in asound.conf kann man den Digitalen Ausgang trotzdem regeln.

pcm.!default hdmi_complete
pcm.hdmi_hw {
  type hw
  card 1    #  <- Hier die Nummer der Karte
  device 7  #  <- Nummer des Device
}
pcm.hdmi_formatted {
  type plug
  slave {
    pcm hdmi_hw
    #rate 48000    #  <- Optional! Hier die gewünschte Rate. 
    #channels 2    #  <- Optional! Anzahl der Kanäle.
  }
}
pcm.hdmi_complete {
  type softvol
  slave.pcm hdmi_formatted
  control.name hdmi_volume
  control.card 1    #  <- Hier die Nummer der Karte
} 

Nun muß man noch softhddevice mitteilen, welchen Regler es regeln soll. Dazu das Vdr Startscript um

export ALSA_MIXER_CHANNEL=hdmi_volume

ergänzen.


GIT Snapshot

git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git

Links

  1. Homepage des Plugin
  2. Thread im vdr-portal
In anderen Sprachen