vdr-plugin-mpv

  • without any ao device:

    Code
    mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all  enticement-13.hours.bd.1080p.mkv
    (+) Video --vid=1 (*) (h264 1920x800 23.976fps)
    (+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
    Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
    (+) Subs  --sid=1 --slang=ger (*) (f) (subrip)
    Using hardware decoding (cuda).
    AO: [pulse] 48000Hz 5.1(side) 6ch float
    VO: [gpu] 1920x800 cuda[nv12]
    AV: 00:00:19 / 02:24:29 (0%) A-V:  0.000 Cache: 128s/150MB

    result: 2 channel stereo sound


    adding audio-spdif parameter:


    result: no sound


    adding --ao=pulse:


    Code
    mpv --vo=gpu --hwdec=cuda --hwdec-codecs=all --ao=pulse --audio-spdif=ac3,dts,dts-hd,truehd enticement-13.hours.bd.1080p.mkv
    (+) Video --vid=1 (*) (h264 1920x800 23.976fps)
    (+) Audio --aid=1 --alang=ger (*) (ac3 6ch 48000Hz)
    Audio --aid=2 --alang=eng (ac3 6ch 48000Hz)
    (+) Subs  --sid=1 --slang=ger (*) (f) (subrip)
    Using hardware decoding (cuda).
    [ao] Failed to initialize audio driver 'pulse'
    AO: [pulse] 48000Hz 5.1(side) 6ch float
    VO: [gpu] 1920x800 cuda[nv12]
    AV: 00:00:05 / 02:24:29 (0%) A-V:  0.000 Cache: 131s/150MB

    with pipewire:


    Code
    mpv --ao=help
    Available audio outputs:
    pulse            PulseAudio audio output
    alsa             ALSA audio output
    oss              OSS/ioctl audio output
    jack             JACK audio output
    null             Null audio output
    pcm              RAW PCM/WAVE file writer audio output

    trying --ao=jack:

    Code
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    [ao/jack] cannot open server
    [ao] Failed to initialize audio driver 'jack'

    VDR1: ACT-620, Asus P8B75-M LX, Intel Core i3-3240, 4 GB DDR3 RAM 1600 MHz, passive Geforce GT1030 von MSI, Sandisk 2TB SSD, 2xWinTV DualHD, Atric-IR-Einschalter. SW: Xubuntu 20.04 auf 64GB Sandisk SSD.

    VDR2: Odroid N2+ mit CoreELEC und Ubuntu in chroot, WinTV DualHD

    VDR3: Tanix TX3 mit CoreELEC und Ubuntu in chroot, WinTV DualHD

  • Ich versuche hier gerade das MPV-Plugin 1.2.4 in einer VM ohne jegliche Hardwarebeschleunigung mit vdr-sxfe zu betreiben:

    das Plugin wird mit -v x11 -h no aufgerufen.

    Wenn ich eine MP3-Datei mit eingebettetem Cover abspielen lasse, sehe ich auch für einen Bruchteil einer Sekunde das Cover am Schirm, aber dann wird der Bildschirm schwarz bevor wieder das normale TV kommt. MP3-Ton kommt keiner.


    lnj

    I'm trying to run the MPV plugin 1.2.4 without any hardware acceleration with vdr-sxfe in a virtual machine:

    the plugin is configured to run with -v x11 -h no.

    When I open a MP3 file with an embedded cover, I can see it for a split second before the screen turns black and returns to live TV. No MP3 audio playback at all.


    syslog

  • > Try -v auto -h auto


    Causes a crash when attempting to play the MP3 file, see the attached log.


    > Also, test mpv without vdr.


    Works, below is the default output when calling mpv without any options:

  • What I get when I try to enforce pulse (-a pulse)

    Nov 14 12:48:20 vdr-VirtualBox vdr[7107]: [7224] [mpv]: Failed to initialize audio driver 'pulse'

    Nov 14 12:48:20 vdr-VirtualBox vdr[7107]: [7224] [mpv]: Could not open/initialize audio device -> no sound.

    and alsa (-a alsa)

    Zitat

    Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: could not open audio: ALSA: Couldn't open audio device: Das Gerät oder die Ressource ist belegt

    Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: event: 18 audio-reconfig

    Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: event: 10 track-switched

    Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: Failed to initialize audio driver 'sdl'

    Nov 14 12:46:56 vdr-VirtualBox vdr[6819]: [6932] [mpv]: Could not open/initialize audio device -> no sound.

  • > Look aplay -L, try -a default.


    -a default results in cansel 0


    Below is the output of aplay -L.

    The problem is definitely on the audio side, since -a null shows the cover art without exiting (with no audio of course)

    I've tried

    -a default

    -a sysdefault

    -a pulse


    What choice would you suggest to try from the options below?

  • > Try -a alsa/front:CARD=I82801AAICH,DEV=0


    Modified 50-mpv.conf accordingly and followed by systemctl restart vdr.

    Result:

  • Both options play fine:

  • I put pulseaudio into -vvv verbosity, attached is the result.

    The mpv-plugin was configured with -a alsa/front:CARD=I82801AAICH,DEV=0


    Edit: the quoted code below is the log with -a pulse


  • I was finally able to solve the Init failed problem after seahawk1986 explained it to me like a 5yo.

    The reason are missing environment variables for the vdr process caused by its startup procedure.
    As a result mpv (starting in the context of the vdr process) lacks the necessary informations to connect to an audio server.


    How to fix this:

    1. Run the following as vdr user
      env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR\|XDG_DATA_DIRS" > ~/.session-env
    2. Create /etc/systemd/system/vdr.service.d/load-environ.conf with the following content
    Code: /etc/systemd/system/vdr.service.d/load-environ.conf
    [Service]
    EnvironmentFile=-/etc/default/locale
    Environment=XDG_RUNTIME_DIR=/run/user/1000/ # <- 1000 is the UID for the first user in Ubuntu dists, might differ for you
    EnvironmentFile=-/home/vdr/.session-env # <- path needs to match the location of your .session-env
    Environment=VDR_ID=0

    In my case including -a pulse in /etc/vdr/conf.d/50-mpv.conf was required in addition.

    After a restart you should finally have a working vdr-plugin-mpv with audio.

  • I have a problem building the mpv plugin against the yaVDR vdr if the patch for the pin-Plugin is active (the last version I was able to build successfully was 1.2.4) - and I fail to see how this patch affects the SignalStats method:

    With the patches before the one for the Pin-Plugin: https://github.com/seahawk1986…4ea48df59f4b66483c76a7f83

    After applying the patch for the pin-plugin: https://github.com/seahawk1986…52acc3f102bd12f692c3ad2e2

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Ah, so the #define Status int in the header X11/Xlib.h would cause the preprocessor to replace a variable name Status with int in the function signature causing a syntax error - using https://gcc.gnu.org/onlinedocs…02fPop-Macro-Pragmas.html to do a #undef Status around this function signature seems to do the trick:


    Or is there a better solution to this like renaming the variable or doing the undef in den mpv-Plugin after the include of the X11 header files?

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

    2 Mal editiert, zuletzt von seahawk1986 ()

  • This seems to work and is quite simple to maintain as a patch for the plugin:

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Noch eine Ersuchen/Frage zum Aufruf von MPV. Da kommt zuerst die Dateiauswahl. Wie lösche ich hier eine Datei ?

    Liebe Grüße g ;)

    NCV6dvbS2+Alphacrypt+ORF, BM2LTS4.4 NUC11i3 NVMe+HDD, BM2LTS2.94.4 AVG1 T7400 SSD+HDD NvidiaGT720

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!