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)
-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 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 = no change, 1 make softhddevice primary at start
softhddevice.HideMainMenuEntry = 0 0 = show softhddevice main menu entry, 1 = hide entry
<res> of the next parameters is 576i, 720p, 1080i_fake or 1080i.

1080i_fake is 1280x1080 or 1440x1080
1080i is "real" 1920x1080

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

(only 0, 1 supported with vaapi)

softhddevice.<res>.SkipChromaDeinterlace = 0 0 = disabled, 1 = enabled (for slower cards, poor quality)
softhddevice.<res>.Denoise = 0 0 .. 1000 noise reduction level (0 off, 1000 max)
softhddevice.<res>.Sharpness = 0 -1000 .. 1000 noise reduction level (0 off, -1000 max blur, 1000 max sharp)
softhddevice.AudioDelay = 0 +n or -n ms
softhddevice.AudioPassthrough = 0 0 = none, 1 = AC-3, for AC-3 the pass-through device is used.
softhddevice.AutoCrop.Interval = 0 0 disables auto-crop

n each 'n' frames auto-crop is checked.
je kleiner desto mehr Leistung kostet es. 10 sind alle 200ms.

softhddevice.AutoCrop.Delay = 0 if auto-crop is over 'n' intervals the same, the cropping is used.

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

softhddevice.AutoCrop.Tolerance = 0 if detected crop area is too small, cut max 'n' pixels at top and

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

softhddevice.SkipLines = 0 skip 'n' lines at top and bottom of the video picture.
softhddevice.Suspend.Close = 0 1 suspend closes x11 window, connection and audio device.

(use svdrpsend plug softhddevice RESU to resume, if you have no lirc)

softhddevice.Suspend.X11 = 0 1 suspend stops X11 server (not working yet)

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