Softhddevice-plugin

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „==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 support…“)
 
K (Link zu Portalthread)
(30 dazwischenliegende Versionen von 10 Benutzern werden nicht angezeigt)
Zeile 2: Zeile 2:
 
'''Autor:''' Johns
 
'''Autor:''' Johns
  
A software and GPU emulated HD output device plugin for VDR.
+
Ein HDTV Ausgabe Plugin für VDR mit GPU Unterstützung.
*Video VA-API/VA-API (with intel, nvidia and amd backend supported)
+
*Video VA-API/VA-API (mit Intel, NVIDIA und AMD Unterstützung)
 
*Video CPU/VA-API
 
*Video CPU/VA-API
 
*Video VDPAU/VDPAU
 
*Video VDPAU/VDPAU
Zeile 14: Zeile 14:
 
*Auto-crop
 
*Auto-crop
  
<!-- ===Status=== -->
+
===Status===
 
+
Letztes Update 03/2013
==Bilder==
+
 
+
==Bedienung==
+
 
+
===[[SVDRP]] Befehle===
+
 
+
Use 'svdrpsend.pl plug softhddevice HELP' to see the SVDRP commands
+
help and which are supported by the plugin.
+
 
+
==Hardwareanforderungen==
+
  
 
==Softwareanforderungen==
 
==Softwareanforderungen==
 +
* '''ffmpeg >=0.7'''
 +
* '''alsa-lib''' or alsa oss emulation
 +
* [http://www.freedesktop.org/wiki/Software/vaapi Video Acceleration (VA) API for Linux ('''libva''')]
  
media-video/ffmpeg (version >=0.7)
+
Einen der folgenden Treiber
Complete solution to record, convert and stream audio and video. Includes libavcodec. [http://ffmpeg.org]
+
* [http://www.freedesktop.org/wiki/Software/vaapi x11-libs/'''libva-intel-driver''' - HW video decode support for Intel integrated graphics]
media-libs/alsa-lib
+
* [http://www.freedesktop.org/wiki/Software/vaapi x11-libs/'''vdpau-video''' - VDPAU Backend for Video Acceleration (VA) API ]
Advanced Linux Sound Architecture Library [http://www.alsa-project.org]
+
* [http://www.freedesktop.org/wiki/Software/vaapi x11-libs/'''xvba-video''' - XVBA Backend for Video Acceleration (VA) API]
or kernel support for oss/oss4 or alsa oss emulation
+
  
x11-libs/libva
+
und
Video Acceleration (VA) API for Linux [http://www.freedesktop.org/wiki/Software/vaapi]
+
* [http://xcb.freedesktop.org x11-libs/'''libxcb''' - X C-language Bindings library]
x11-libs/libva-intel-driver
+
* x11-libs/'''xcb-util'''
HW video decode support for Intel integrated graphics [http://www.freedesktop.org/wiki/Software/vaapi]
+
* x11-libs/'''xcb-util-wm'''
 
+
* [http://xcb.freedesktop.org x11-libs/'''xcb-util-keysyms >= 0.3.8''' - X C-language Bindings library]
or
+
* [http://xorg.freedesktop.org x11-libs/'''libX11''' - X.Org X11 library]
x11-libs/vdpau-video
+
VDPAU Backend for Video Acceleration (VA) API [http://www.freedesktop.org/wiki/Software/vaapi]
+
 
+
or
+
x11-libs/xvba-video
+
XVBA Backend for Video Acceleration (VA) API [http://www.freedesktop.org/wiki/Software/vaapi]
+
 
+
and
+
x11-libs/libxcb,
+
X C-language Bindings library [http://xcb.freedesktop.org]
+
x11-libs/xcb-util,
+
x11-libs/xcb-util-wm,
+
x11-libs/xcb-util-keysyms
+
X C-language Bindings library [http://xcb.freedesktop.org]
+
Only versions >= 0.3.8 are good supported
+
 
+
x11-libs/libX11
+
X.Org X11 library [http://xorg.freedesktop.org]
+
 
+
GNU Make 3.xx [http://www.gnu.org/software/make/make.html]
+
  
 
'''Warning: libav is not supported, expect many bugs with it.'''
 
'''Warning: libav is not supported, expect many bugs with it.'''
  
 
==Installation==
 
==Installation==
* git
 
git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
 
 
  cd vdr-plugin-softhddevice
 
  cd vdr-plugin-softhddevice
 
  make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
 
  make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
Zeile 81: Zeile 51:
 
  make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
 
  make VDRDIR=<path-to-your-vdr-files> LIBDIR=.
 
You can edit Makefile to enable/disable VDPAU / VA-API / Alsa / OSS support.
 
You can edit Makefile to enable/disable VDPAU / VA-API / Alsa / OSS support.
 
===Optionen===
 
  
 
==Konfiguration==
 
==Konfiguration==
 
 
===Parameter===
 
===Parameter===
 +
{| class="wikitable"
 +
|-
 +
!Parameter
 +
!Beschreibung
 +
|-
 +
| -a audio_device        || Selects audio output module and device (fe. alsa: hw:0,0 oss: /dev/dsp)<br>
 +
"" - to disable audio output<br>
 +
/... - to use oss audio module (if compiled with oss support)<br>
 +
other - to use alsa audio module (if compiled with alsa support)<br>
 +
|-
 +
| -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 {{vdrportal board|115062|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<br>
 +
no-hw-decoder - disable hw decoder, use software decoder only<br>
 +
no-mpeg-hw-decoder - disable hw decoder for mpeg only<br>
 +
still-hw-decoder - enable hardware decoder for still-pictures<br>
 +
alsa-driver-broken - disable broken alsa driver message<br>
 +
alsa-close-open - [https://www.vdr-portal.de/forum/index.php?thread/121118-softhddevice-gibt-sounddevice-nicht-frei/&postID=1181738#post1181738 this needs a description]<br>
 +
alsa-close-open-delay - [https://www.vdr-portal.de/forum/index.php?thread/121118-softhddevice-gibt-sounddevice-nicht-frei/&postID=1181738#post1181738 this needs a description]<br>
 +
ignore-repeat-pict - disable repeat pict message<br><br>
 +
Angabe von mehreren Optionen wie folgt:<br>-w workaround1 -w workaround2 ...
 +
|}
  
Use vdr -h to see the command line arguments supported by the plugin.
+
=== xorg.conf(.d) ===
 
+
Der X Server sollte so konfiguriert werden, dass Power Magament deaktiviert ist und der Bildschirm/TV mit genau 50Hz non-interlaced arbeitet.
-a audio_device
+
 
+
<pre>
Selects audio output module and device.
+
Section "ServerLayout"
 
+
    ...
"" to disable audio output
+
    Option        "NoPM" "true"
 +
    Option        "BlankTime" "0"
 +
    Option        "StandbyTime" "0"
 +
    Option        "SuspendTime" "0"
 +
    Option        "OffTime" "0"
 +
EndSection
 +
</pre>
  
/... to use oss audio module (if compiled with oss support)
+
Die Bildwiederholrate lässt sich z.B. mit xrandr prüfen (Stern = aktuelle Auflösung).
 +
Bei Bedarf lässt sich die Auflösung durch Einfügen einer passenden Modeline in die xorg.conf ändern.
 +
<pre>
 +
xrandr
 +
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
 +
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
 +
VGA-0 disconnected (normal left inverted right x axis y axis)
 +
DVI-I-1 disconnected (normal left inverted right x axis y axis)
 +
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1150mm x 650mm
 +
  1920x1080    60.00 +  59.94    50.00*  29.97    25.00    23.97    60.05    60.00    50.04
 +
  1280x1024    60.02
 +
  1280x720      60.96    60.00    59.94    50.00
 +
  1024x768      60.00
 +
  800x600      60.32
 +
  720x576      50.00    50.08
 +
  720x480      59.94
 +
  640x480      59.95    59.94    59.93
 +
</pre>
  
other to use alsa audio module (if compiled with alsa support)
+
Beispiel einer 1920x1080 Modeline
 +
<pre>
 +
Section "Monitor"
 +
(..)
 +
Modeline  "1920x1080_50"  148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 +
EndSection
 +
</pre>
 +
Hinweis: Die Wiederholrate ergibt sich im Beispiel aus einem Pixelclock von 148.5MHz und 2640 Pixeln je Zeile und 1125 Zeilen je Frame: 148.5MHz / (2640 * 1125) = 50Hz. Aus einer Modeline kann also unmittelbar die Bild-Wiederholrate berechnet werden.
  
 
===Einstellungen===
 
===Einstellungen===
 
 
====remote.conf ====
 
====remote.conf ====
Add "XKeySym." definitions to remote.conf to control the vdr and plugin with the connected input device.
+
Add "XKeySym." definitions to [[Struktur|$VDRCONFIG]]/[[remote.conf]] to control the vdr and plugin with the connected input device.
 
fe.
 
fe.
  
 
XKeySym.Up Up  
 
XKeySym.Up Up  
 
 
XKeySym.Down Down
 
XKeySym.Down Down
 
 
...
 
...
  
Zeile 118: Zeile 150:
 
XKeySym.Power Close
 
XKeySym.Power Close
  
====environment====
+
====keymacros.conf ====
Following is supported:
+
The following macros can be used for the PIP feature:
DISPLAY=:0.0
+
<Taste>    @softhddevice 1 # Enable detached mode
x11 display name
+
<Taste>    @softhddevice 2 # Toggle on/off
only if alsa is configured
+
<Taste>    @softhddevice 3 # PIP Zap Mode (not implemented)
ALSA_DEVICE=default
+
<Taste>    @softhddevice 4 # PIP Channel+
alsa PCM device name
+
<Taste>    @softhddevice 5 # PIP Channel-
 +
<Taste>    @softhddevice 6 # PIP on/swap channels
 +
<Taste>    @softhddevice 7 # PIP Swap position
 +
<Taste>    @softhddevice 8 # PIP Close
  
ALSA_AC3_DEVICE=
+
===Umgebungsvariablen===
alsa AC3/pass-though device name
+
{| class="wikitable"
 +
|-
 +
| bgcolor=#efefef | DISPLAY=:0.0
 +
| X11 Display Name
 +
|-
 +
| bgcolor=#efefef | NO_HW=1
 +
| wenn 1, keine Hardwaredekoder verwenden
 +
|-
 +
| bgcolor=#efefef | NO_MPEG_HW=1
 +
| wenn 1, keine Hardwaredekoder für MPEG1/2 verwenden
 +
|-
 +
| bgcolor=#efefef | STUDIO_LEVELS=1
 +
| wenn 1, dann Studio Levels mit VDPAU verwenden (veraltet, nun als Plugin-Setupparameter (setup.conf) verfügbar)
 +
|-
 +
| bgcolor=#efefef | folgende Variablen nur bei Verwendung von ALSA:
 +
|
 +
|-
 +
| bgcolor=#efefef | ALSA_DEVICE=default
 +
| ALSA PCM Gerätename
 +
|-
 +
| bgcolor=#efefef | ALSA_AC3_DEVICE=
 +
| ALSA Gerät für AC3 Pass-Through
 +
|-
 +
| bgcolor=#efefef | ALSA_MIXER=default
 +
| ALSA-Mixer Gerätname
 +
|-
 +
| bgcolor=#efefef | ALSA_MIXER_CHANNEL=PCM
 +
| ALSA-Mixer Kanalname
 +
|-
 +
| bgcolor=#efefef | folgende Variablen nur bei Verwendung von OSS:
 +
|
 +
|-
 +
| bgcolor=#efefef | OSS_AUDIODEV=/dev/dsp
 +
| OSS DSP Gerätename
 +
|-
 +
| bgcolor=#efefef | OSS_AC3_AUDIODEV=
 +
| OSS AC3 Pass-Through Gerätename
 +
|-
 +
| bgcolor=#efefef | OSS_MIXERDEV=/dev/mixer
 +
| OSS-Mixer Gerätename
 +
|-
 +
| bgcolor=#efefef | OSS_MIXER_CHANNEL=pcm
 +
| OSS-Mixer Kanalname
 +
|}
  
ALSA_MIXER=default
+
===setup.conf===
alsa control device name
+
{| class="wikitable"
 +
|-
 +
| bgcolor=#efefef | softhddevice.MakePrimary = 1
 +
| 0 = unverändert, 1 softhddevice wird Primärgerät beim Start
 +
|-
 +
| bgcolor=#efefef | softhddevice.HideMainMenuEntry = 0
 +
| 0 = zeige Hauptmenüeintrag von softhddevice, 1 = verstecke Eintrag
 +
|-
 +
| bgcolor=#efefef | <res> der folgenden Paramenter ist 576i, 720p, 1080i_fake oder 1080i.<br>
 +
1080i_fake sind "krumme" Auflösungen wie 1280x1080 oder 1440x1080<br>
 +
1080i ist "echtes" FullHD mit 1920x1080
 +
|
 +
|-
 +
| bgcolor=#efefef | softhddevice.<res>.Scaling = 0
 +
| 0 = normal, 1 = fast, 2 = HighQuality, 3 = anamorphic
 +
|-
 +
| bgcolor=#efefef | softhddevice.<res>.Deinterlace = 0
 +
| 0 = bob, 1 = weave, 2 = temporal, 3 = temporal_spatial, 4 = software
 +
(bei VAAPI nur 0 und 1 unterstützt)
 +
|-
 +
| bgcolor=#efefef | softhddevice.<res>.SkipChromaDeinterlace = 0
 +
| 0 = nicht verwendet, 1 = verwendet (für weniger leistungsfähige Grafikkarten, schlechtere Qualität)
 +
|-
 +
| bgcolor=#efefef | softhddevice.<res>.Denoise = 0
 +
| 0 .. 1000 Rauschreduzierung (0 aus, 1000 maximal)
 +
|-
 +
| bgcolor=#efefef | softhddevice.<res>.Sharpness = 0
 +
| -1000 .. 1000 Schärfeneinstellung (0 aus, -1000 maximal unscharf, 1000 maximal scharf)
 +
|-
 +
| bgcolor=#efefef | softhddevice.AudioDelay = 0
 +
| Tonversatz +n oder -n in ms
 +
|-
 +
| bgcolor=#efefef | softhddevice.AudioPassthrough = 0
 +
| 0 = nicht verwendet, 1 = AC-3, für AC-3 wird das Pass-Through Gerät verwendet.
 +
|-
 +
| bgcolor=#efefef | softhddevice.AutoCrop.Interval = 0
 +
| 0 deaktiviert Autocrop
 +
n: Autocrop prüft alle 'n' Frames.<br>
 +
Je kleiner desto mehr Leistung kostet es. 10 entspricht alle 200ms.
 +
|-
 +
| bgcolor=#efefef | softhddevice.AutoCrop.Delay = 0
 +
| Sofern 'n' geprüfte Intervalle gleich sind, wird der erkannte Crop-Bereich abgeschnitten.<br>
 +
Je größer desto länger dauert es das umgeschaltet wird.
 +
|-
 +
| bgcolor=#efefef | softhddevice.AutoCrop.Tolerance = 0
 +
| Wenn der ermittelte Crop-Bereich zu klein ist, werden maximal 'n' Pixel oben und unten abgeschnitten.<br>
 +
Je größer desto mehr Pixel können weggeschnitten werden, wenn nicht 100% 16:9 oder 14:9.
 +
|-
 +
| bgcolor=#efefef | softhddevice.SkipLines = 0
 +
| Schneide 'n' Pixel Zeilen oben und unten des Videos weg.
 +
|-
 +
| bgcolor=#efefef | softhddevice.StudioLevels = 0
 +
|  0 verwende PC Levels (0-255) mit VDPAU.<br>1 verwende Studiolevels (16-235)mit vdpau.
 +
|-
 +
| bgcolor=#efefef | 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)
 +
|-
 +
| bgcolor=#efefef | softhddevice.Suspend.X11 = 0
 +
| 1 beendet ebenfalls den X11-Server beim Stoppen von softhddevice (derzeit noch ohne Funktion)
 +
|-
 +
| bgcolor=#efefef | softhddevice.60HzMode = 0
 +
| 0 deaktiviert den 60Hz-Modus, 1 aktiviert den 60Hz-Modus (z.B. für LC-Displays)
 +
|-
 +
| bgcolor=#efefef | softhddevice.SoftStartSync = 0
 +
| 0 deaktiviert eine weiche Video/Audiosyncronisation, 1 aktiviert diese
 +
|-
 +
| bgcolor=#efefef | VideoDisplayFormat = ?
 +
| Auswahl des Modus der Videoanzeige:<br>0 pan and scan<br>1 letter box<br>2 center cut-out<br>(VDR-Einstellung)
  
ALSA_MIXER_CHANNEL=PCM
+
|}
alsa control channel name
+
===[[SVDRP]] Befehle===
 +
{| class="wikitable"
 +
|-
 +
!style="width:30%" | Parameter           
 +
!Beschreibung
 +
|-
 +
| SUSP      || Suspend plugin.<br>
 +
The plugin is suspended to save energie. Depending on the setup
 +
'softhddevice.Suspend.Close = 0' only the video and audio output
 +
is stopped or with 'softhddevice.Suspend.Close = 1' the video
 +
and audio devices are closed.
 +
If 'softhddevice.Suspend.X11 = 1' is set and the X11 server was
 +
started by the plugin, the X11 server would also be closed.
 +
(Stopping X11 while suspended isn't supported yet)
 +
|-
 +
| RESU      || Resume plugin.<br>
 +
Resume the suspended plugin. The plugin could be suspended by
 +
the command line option '-s' or by a previous SUSP command.
 +
If the x11 server was stopped by the plugin, it will be
 +
restarted.
 +
|-
 +
| DETA      || Dettach plugin.<br>
 +
The plugin will be detached from the audio, video and DVB
 +
devices.  Other programs or plugins can use them now.
 +
|-
 +
| ATTA <nowiki><-d display> <-a audio> <-p pass></nowiki>      || Attach plugin.<br>
 +
Attach the plugin to audio, video and DVB devices. Use:
 +
-d display      display of x11 server (fe. :0.0)
 +
-a audio        audio device (fe. alsa: hw:0,0 oss: /dev/dsp)
 +
-p pass        audio device for pass-through (hw:0,1 or /dev/dsp1)
 +
|-
 +
| PRIM <n>  || Make <n> the primary device.<br>
 +
<n> is the number of device. Without number softhddevice becomes
 +
the primary device. If becoming primary, the plugin is attached
 +
to the devices. If loosing primary, the plugin is detached from
 +
the devices.
 +
|-
 +
| HOTK <key>      || Execute hotkey.<br>
 +
<key> is the hotkey number, following are supported:
 +
10: disable audio pass-through
 +
11: enable audio pass-through
 +
12: toggle audio pass-through
 +
13: decrease audio delay by 10ms
 +
14: increase audio delay by 10ms
 +
20: disable fullscreen
 +
21: enable fullscreen
 +
22: toggle fullscreen
 +
23: disable auto-crop
 +
24: enable auto-crop
 +
25: toggle auto-crop
 +
30: stretch 4:3 to display
 +
31: pillar box 4:3 in display
 +
32: center cut-out 4:3 to display
 +
39: rotate 4:3 to display zoom mode
 +
40: stretch other aspect ratios to display
 +
41: letter box other aspect ratios in display
 +
42: center cut-out other aspect ratios to display
 +
49: rotate other aspect ratios to display zoom mode
 +
|-
 +
| STAT      || Display SuspendMode of the plugin.<br>
 +
reply code is 910 + SuspendMode
 +
SUSPEND_EXTERNAL == -1  (909)
 +
NOT_SUSPENDED    ==  0  (910)
 +
SUSPEND_NORMAL  ==  1  (911)
 +
SUSPEND_DETACHED ==  2  (912)
 +
|-
 +
| 3DOF      || turns 3D OSD off.
 +
|-
 +
| 3DTB      || enable 3D OSD Top and Bottom.
 +
|-
 +
| 3DSB      || enable 3D OSD Side by Side.
 +
|-
 +
| HELP <command> || prints out HELP for <command>
 +
|}
  
only if oss is configured
+
==Sonstiges==
OSS_AUDIODEV=/dev/dsp
+
===Tipps===
oss dsp device name
+
====Audio====
 +
;Kein Ton bei 6 Kanal Ton:
 +
:Entweder kann die Soundkarte kein 6 Kanalton oder libav/ffmpeg hat Probleme beim Umwandeln. Dazu 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.
  
OSS_AC3_AUDIODEV=
 
oss AC3/pass-though device name
 
  
OSS_MIXERDEV=/dev/mixer
+
;Keine Lautstärkenregelung möglich:
oss mixer device name
+
* 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
  
OSS_MIXER_CHANNEL=pcm
+
export ALSA_MIXER_CHANNEL=Front
oss mixer channel name
+
ergänzen.
  
==== setup.conf ====
+
* Digital
Following is supported:
+
Digitale Ausgänge kann softhddevice nicht regeln. (noch nicht)
  
softhddevice.MakePrimary = 1
+
Mit diesem Eintrag in asound.conf kann man den Digitalen Ausgang trotzdem regeln.
0 = no change, 1 make softhddevice primary at start
+
  
softhddevice.HideMainMenuEntry = 0
+
pcm.!default hdmi_complete
0 = show softhddevice main menu entry, 1 = hide entry
+
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
 +
}
  
<res> of the next parameters is 576i, 720p, 1080i_fake or 1080i.
+
Nun muß man noch softhddevice mitteilen, welchen Regler es regeln soll.
1080i_fake is 1280x1080 or 1440x1080
+
Dazu das Vdr Startscript um
1080i is "real" 1920x1080
+
export ALSA_MIXER_CHANNEL=hdmi_volume
 +
ergänzen.
  
softhddevice.<res>.Scaling = 0
+
===Logmeldungen zum Timing===
0 = normal, 1 = fast, 2 = HQ, 3 = anamorphic
+
  
softhddevice.<res>.Deinterlace = 0
+
z.b. im Syslog
0 = bob, 1 = weave, 2 = temporal, 3 = temporal_spatial, 4 = software
+
Jul 12 01:43:20 [vdr] video: TT:TT:TT.TTT  +SS  AAAA  DDD/\ms  BB+C v-buf
(only 0, 1 supported with vaapi)
+
  
softhddevice.<res>.SkipChromaDeinterlace = 0
+
'''TT:TT:TT.TTT'''
0 = disabled, 1 = enabled (for slower cards, poor qualität)
+
Ist der aktuelle Videozeitstempel, damit man Fehler in Aufnahmen wiederfindet.
 +
Wenn der Fehler immer an der gleichen Stelle auftritt.
  
softhddevice.<res>.Denoise = 0
+
'''+SS'''
0 .. 1000 noise reduction level (0 off, 1000 max)
+
Das ist der aktuelle Audio Video Abstand in ms. Ob nun bei + der Ton vor dem Bild ist oder umgekehrt keine Ahnung.
 +
Die 0 ist nicht wirklich der optimale Wert, da durch Verzögerungen im Kernel oder Treibern, sowohl Bild als Ton verzögert werden können. Auch ein Fernseher mit seinen Bildverbessern oder ein A/V Receiver hat noch zusätzliche unbekannte Verzögerungen.
 +
Dieser Wert sollte sich nach max 1 min auf einen konstanten Wert einbendeln.
 +
+8888 sagt das kein A/V Sync mehr versucht wird.
  
softhddevice.<res>.Sharpness = 0
+
'''AAAA'''
-1000 .. 1000 noise reduction level (0 off, -1000 max blur, 1000 max sharp)
+
Dies ist die Größe des Audiobuffers in ms. Enthält den Plugin Buffer und Kernel Buffer.
 +
Je kleiner desto schneller ging und geht das Umschalten, Bei zu kleinen Werten gibt es Audioaussetzer und diese führen zu Bild Mikrorucklern.
  
softhddevice.AudioDelay = 0
+
'''DDD'''
+n or -n ms
+
Dieser Wert zeigt den max. Fehler bei den Zeitstempeln in ms an. Normalerweise erwartet man, das ein Bild alle 20ms kommt. Kommt eins früher oder später dann wird der Fehler gemerkt und hier angezeigt. Manche Sender haben einen konstanten Fehler, dieser kommt so vom Sender und wird von ffmpeg/libav nicht abgefangen. Kann aber auch bei Störungen entstehen.
  
softhddevice.AudioPassthrough = 0
+
'''BB'''
0 = none, 1 = AC-3
+
Wieviel undekodiertes Video gebuffert ist.
  
for AC-3 the pass-through device is used.
+
'''C'''
softhddevice.AutoCrop.Interval = 0
+
Wieviele fertig dekodierte Bilder gebuffert sind. Sind im Moment max 8 für Interlaced und 4 für 720p.
0 disables auto-crop
+
n each 'n' frames auto-crop is checked.
+
  
softhddevice.AutoCrop.Delay = 0
+
Siehe: [http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/123632-erledigt-softhddevice-bild-und-ton-asynchron/?highlight= Ton und Bild asynchron]
if auto-crop is over 'n' intervals the same, the cropping is used.
+
  
softhddevice.AutoCrop.Tolerance = 0
+
===Bugs und Wünsche===
if detected crop area is too small, cut max 'n' pixels at top and
+
[http://projects.vdr-developer.org/projects/plg-softhddevice/issues bug tracker]
bottom.
+
  
softhddevice.SkipLines = 0
+
===GIT Snapshot===
skip 'n' lines at top and bottom of the video picture.
+
git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
  
softhddevice.Suspend.Close = 0
+
Hier gibt es einen Fork mit [[HEVC]] Unterstützung.
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
+
git clone https://github.com/jojo61/vdr-plugin-softhddevice.git
1 suspend stops X11 server (not working yet)
+
  
==Sonstiges==
+
Und folgender Fork unterstützt VA-API, [[HEVC]] und aktuelle ffmpeg-Versionen:
<!-- ===Probleme=== -->
+
===Tipps===
+
====Audio====
+
  
<!-- ===Wunschliste=== -->
+
git clone https://github.com/pesintta/vdr-plugin-softhddevice.git
  
===GIT Snapshot===
+
==Aktuelle Version==
git clone git://projects.vdr-developer.org/vdr-plugin-softhddevice.git
+
[http://projects.vdr-developer.org/attachments/download/1284/vdr-softhddevice-0.6.0rc3.tgz 0.6.0-rc3]
  
 
==Links==
 
==Links==
# [http://projects.vdr-developer.org/projects/plg-softhddevice Homepage des Plugin]
+
# [http://projects.vdr-developer.org/projects/plg-softhddevice Homepage des Plugins]
 
# [http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1036674-softhddevice-software-vdpau-va-api-cpu-decoder-und-ausgabe-plugin/#post1036674 Thread im vdr-portal]  
 
# [http://www.vdr-portal.de/board17-developer/board21-vdr-plugins/p1036674-softhddevice-software-vdpau-va-api-cpu-decoder-und-ausgabe-plugin/#post1036674 Thread im vdr-portal]  
  
 
[[Kategorie:Plugins]]
 
[[Kategorie:Plugins]]
 +
[[Kategorie:Ausgabe-Plugins]]
 
[[Kategorie:Budget-Only_Systeme]]
 
[[Kategorie:Budget-Only_Systeme]]
 
{{i18n|softhddevice-plugin}}
 
{{i18n|softhddevice-plugin}}

Version vom 29. Januar 2018, 19:44 Uhr

Inhaltsverzeichnis

Beschreibung

Autor: Johns

Ein HDTV Ausgabe Plugin für VDR mit GPU Unterstützung.

  • Video VA-API/VA-API (mit Intel, NVIDIA und AMD Unterstützung)
  • 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

Status

Letztes Update 03/2013

Softwareanforderungen

Einen der folgenden Treiber

und

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

Installation

cd vdr-plugin-softhddevice
make VDRDIR=<path-to-your-vdr-files> LIBDIR=.

gentoo:

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

Download latest version from: [1]

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
still-hw-decoder - enable hardware decoder for still-pictures
alsa-driver-broken - disable broken alsa driver message
alsa-close-open - this needs a description
alsa-close-open-delay - this needs a description
ignore-repeat-pict - disable repeat pict message

Angabe von mehreren Optionen wie folgt:
-w workaround1 -w workaround2 ...

xorg.conf(.d)

Der X Server sollte so konfiguriert werden, dass Power Magament deaktiviert ist und der Bildschirm/TV mit genau 50Hz non-interlaced arbeitet.

Section "ServerLayout" 
    ...
    Option         "NoPM" "true" 
    Option         "BlankTime" "0" 
    Option         "StandbyTime" "0" 
    Option         "SuspendTime" "0" 
    Option         "OffTime" "0" 
EndSection

Die Bildwiederholrate lässt sich z.B. mit xrandr prüfen (Stern = aktuelle Auflösung). Bei Bedarf lässt sich die Auflösung durch Einfügen einer passenden Modeline in die xorg.conf ändern.

xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1150mm x 650mm
   1920x1080     60.00 +  59.94    50.00*   29.97    25.00    23.97    60.05    60.00    50.04
   1280x1024     60.02
   1280x720      60.96    60.00    59.94    50.00
   1024x768      60.00
   800x600       60.32
   720x576       50.00    50.08
   720x480       59.94
   640x480       59.95    59.94    59.93

Beispiel einer 1920x1080 Modeline

Section "Monitor"
(..)
Modeline  "1920x1080_50"  148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
EndSection

Hinweis: Die Wiederholrate ergibt sich im Beispiel aus einem Pixelclock von 148.5MHz und 2640 Pixeln je Zeile und 1125 Zeilen je Frame: 148.5MHz / (2640 * 1125) = 50Hz. Aus einer Modeline kann also unmittelbar die Bild-Wiederholrate berechnet werden.

Einstellungen

remote.conf

Add "XKeySym." definitions to $VDRCONFIG/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

keymacros.conf

The following macros can be used for the PIP feature:

<Taste>    @softhddevice 1 # Enable detached mode
<Taste>    @softhddevice 2 # Toggle on/off
<Taste>    @softhddevice 3 # PIP Zap Mode (not implemented)
<Taste>    @softhddevice 4 # PIP Channel+
<Taste>    @softhddevice 5 # PIP Channel-
<Taste>    @softhddevice 6 # PIP on/swap channels
<Taste>    @softhddevice 7 # PIP Swap position
<Taste>    @softhddevice 8 # PIP 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)

SVDRP Befehle

Parameter Beschreibung
SUSP Suspend plugin.

The plugin is suspended to save energie. Depending on the setup 'softhddevice.Suspend.Close = 0' only the video and audio output is stopped or with 'softhddevice.Suspend.Close = 1' the video and audio devices are closed. If 'softhddevice.Suspend.X11 = 1' is set and the X11 server was started by the plugin, the X11 server would also be closed. (Stopping X11 while suspended isn't supported yet)

RESU Resume plugin.

Resume the suspended plugin. The plugin could be suspended by the command line option '-s' or by a previous SUSP command. If the x11 server was stopped by the plugin, it will be restarted.

DETA Dettach plugin.

The plugin will be detached from the audio, video and DVB devices. Other programs or plugins can use them now.

ATTA <-d display> <-a audio> <-p pass> Attach plugin.

Attach the plugin to audio, video and DVB devices. Use:

-d display      display of x11 server (fe. :0.0)
-a audio        audio device (fe. alsa: hw:0,0 oss: /dev/dsp)
-p pass         audio device for pass-through (hw:0,1 or /dev/dsp1)
PRIM <n> Make <n> the primary device.

<n> is the number of device. Without number softhddevice becomes the primary device. If becoming primary, the plugin is attached to the devices. If loosing primary, the plugin is detached from the devices.

HOTK <key> Execute hotkey.

<key> is the hotkey number, following are supported:

10: disable audio pass-through
11: enable audio pass-through
12: toggle audio pass-through
13: decrease audio delay by 10ms
14: increase audio delay by 10ms
20: disable fullscreen
21: enable fullscreen
22: toggle fullscreen
23: disable auto-crop
24: enable auto-crop
25: toggle auto-crop
30: stretch 4:3 to display
31: pillar box 4:3 in display
32: center cut-out 4:3 to display
39: rotate 4:3 to display zoom mode
40: stretch other aspect ratios to display
41: letter box other aspect ratios in display
42: center cut-out other aspect ratios to display
49: rotate other aspect ratios to display zoom mode
STAT Display SuspendMode of the plugin.

reply code is 910 + SuspendMode

SUSPEND_EXTERNAL == -1  (909)
NOT_SUSPENDED    ==  0  (910)
SUSPEND_NORMAL   ==  1  (911)
SUSPEND_DETACHED ==  2  (912)
3DOF turns 3D OSD off.
3DTB enable 3D OSD Top and Bottom.
3DSB enable 3D OSD Side by Side.
HELP <command> prints out HELP for <command>

Sonstiges

Tipps

Audio

Kein Ton bei 6 Kanal Ton
Entweder kann die Soundkarte kein 6 Kanalton oder libav/ffmpeg hat Probleme beim Umwandeln. Dazu 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.

Logmeldungen zum Timing

z.b. im Syslog

Jul 12 01:43:20 [vdr] video: TT:TT:TT.TTT  +SS  AAAA   DDD/\ms  BB+C v-buf

TT:TT:TT.TTT Ist der aktuelle Videozeitstempel, damit man Fehler in Aufnahmen wiederfindet. Wenn der Fehler immer an der gleichen Stelle auftritt.

+SS Das ist der aktuelle Audio Video Abstand in ms. Ob nun bei + der Ton vor dem Bild ist oder umgekehrt keine Ahnung. Die 0 ist nicht wirklich der optimale Wert, da durch Verzögerungen im Kernel oder Treibern, sowohl Bild als Ton verzögert werden können. Auch ein Fernseher mit seinen Bildverbessern oder ein A/V Receiver hat noch zusätzliche unbekannte Verzögerungen. Dieser Wert sollte sich nach max 1 min auf einen konstanten Wert einbendeln. +8888 sagt das kein A/V Sync mehr versucht wird.

AAAA Dies ist die Größe des Audiobuffers in ms. Enthält den Plugin Buffer und Kernel Buffer. Je kleiner desto schneller ging und geht das Umschalten, Bei zu kleinen Werten gibt es Audioaussetzer und diese führen zu Bild Mikrorucklern.

DDD Dieser Wert zeigt den max. Fehler bei den Zeitstempeln in ms an. Normalerweise erwartet man, das ein Bild alle 20ms kommt. Kommt eins früher oder später dann wird der Fehler gemerkt und hier angezeigt. Manche Sender haben einen konstanten Fehler, dieser kommt so vom Sender und wird von ffmpeg/libav nicht abgefangen. Kann aber auch bei Störungen entstehen.

BB Wieviel undekodiertes Video gebuffert ist.

C Wieviele fertig dekodierte Bilder gebuffert sind. Sind im Moment max 8 für Interlaced und 4 für 720p.

Siehe: Ton und Bild asynchron

Bugs und Wünsche

bug tracker

GIT Snapshot

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

Hier gibt es einen Fork mit HEVC Unterstützung.

git clone https://github.com/jojo61/vdr-plugin-softhddevice.git

Und folgender Fork unterstützt VA-API, HEVC und aktuelle ffmpeg-Versionen:

git clone https://github.com/pesintta/vdr-plugin-softhddevice.git

Aktuelle Version

0.6.0-rc3

Links

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