vdr-plugin-mpv

  • Zitat

    Um mit mpv auch in Hardware zu dekodieren musst du wohl den vaapi decoder auswählen. Nur dann kann mpv wohl nicht über das drm API ausgeben.

    Denn eigentlich ist das drm API dafür gedacht mit dem v4lm2m decoder zusammen zu arbeiten. Nur gibt es denn noch nicht im ffmpeg für intel.

    hm, nur wo nimmt das sofhdvaapi die API (DRM) her um auf HLG-HDR zu schalten wenn man *.ts (UHD1) mit dem mpv plugin abspielt?


    Grüße

    cinfo

    (VDR) NUC11PAH & GEEKOM MINI-IT11-11. Generation * BM2LTS * DD NET S2 Max * NC * (Sound) Cinebar Lux Set * (Stream) Apple TV 4K (2022) *

    (Light) PHILIPS Hue Play HDMI Sync Box & Gradient Lightstrip * (OLED TV) LG OLED65G29LA

  • Ich meinte das mpv den vaapi decoder nutzen muss. Das hat nix mit dem softhdvaapi zu tun. Du hast da noch ein paar Verständnisslücken :)


    Hier mal als Bild. das plugin softhddrm hat folgende Architektur:

    stream---> HW_vaapi_decoder--->drm API (mit HDR steuerung) --->Screen


    Bei mpv ist das dann so:

    stream--->software_decoder---->drm API---->Screen

    Wobei mpv aber die HDR Informationen im Stream nicht nutzt um HDR über das drm API zu steuern. Das ist einfach (noch) nicht implementiert.

    Wie man sieht ist hier keine HW Beschleunigung vorhanden.

    Wenn man bei mpv den vaapi decoder auswählt dann wird auch das vaapi ausgabe API genutzt:

    stream--->HW vaapi Decoder----->vaapi Ausgabe API----->Screen

    Das vaapi Ausgabe API läuft aber nur unter X.

  • Zitat

    Du hast da noch ein paar Verständnisslücken

    Danke diese wurde gerade geschlossen :S


    Grüße

    cinfo

    (VDR) NUC11PAH & GEEKOM MINI-IT11-11. Generation * BM2LTS * DD NET S2 Max * NC * (Sound) Cinebar Lux Set * (Stream) Apple TV 4K (2022) *

    (Light) PHILIPS Hue Play HDMI Sync Box & Gradient Lightstrip * (OLED TV) LG OLED65G29LA

  • Könnte man denn beim Aufruf von mpv den HW-Dekoder dann direkt angeben ? Weil Option -h gäbe es ja:

    Code
    # -a audio      mpv --ao (Default: alsa:device=default)
    # -v video      mpv --vo (Default: vdpau)
    # -h hwdec      mpv --hwdec-codecs (Default: vdpau)
    -v drm
    -h vaapi
    -a alsa/hdmi:CARD=PCH,DEV=0

    stream--->HW vaapi decoder---->drm API---->Screen

    geht also nicht, weil eben sobald der vaapi decoder gewählt ist, damit "hart codiert" das vaapi API angesteuert wird ?


    (Was wäre denn wenn beide Plugins aktiv sind ?)

    Liebe Grüße g ;)

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

    Einmal editiert, zuletzt von gggggg ()

  • jojo61 noch eine Frage zum Volume Prob: Du speicherst ja CurrentVolume ...

    1 Ich nehme an wenn mpv gestartet wird, passiert das (weil ja LiveTV beendet wird auch) ? Falls NEIN ist das ev. ein Prob.


    2 Nun erhöht man die Lautst. im mpv.

    Beim Verlassen von mpv per Stop Taste startet LiveTV jedoch nicht auf der letzten Current sondern am Wert von mpv = zu laut.


    3 Nun senke ich die LS im LiveTV wieder.

    Starte ich mpv erneut läuft das, obwohl zwischendurch im LiveTV die LS von mir reduziert wurde, mit dem Letztwert von mpv.

    WAS JA OK wäre. Aber sobald ich die Volumetaste drücke, springt die LS auf den Wert des Letzwertes v. LiveTV u. ist also wieder leise


    Volume level with soft control I will see how I can, with a quick test, I cannot reproduce, need more time.

    But the crash and the wrong video mode after the mpv exit must be watched from the side of the softhddrm plugin.

    jojo61, can you install mpv (libmpv) and test mpv plugin with drm output?

    gggggg, if you do svdprpsend plug softhddrm DETA, svdprpsend plug softhddrm ATTA, or svdprpsend plug softhddrm SUSP, svdprpsend plug softhddrm RESU - the problem will be or not?

    @Inj but the prob starts with the call of mpv, wher the volume is way to low and also mpv should store its current in setup.conf ...

    Liebe Grüße g ;)

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

    2 Mal editiert, zuletzt von gggggg ()

  • Zitat

    stream--->HW vaapi decoder---->drm API---->Screen

    At the moment MPV cannot do it.

    Zitat

    but the prob starts with the call of mpv, wher the volume is way to low and also mpv should store its current in setup.conf

    The mpv plugin save the volume level. I will try to watch it today or tomorrow.

  • I think I figured out the problem.

    The volume level of the MPV plugin must match the volume level of the vdr, and this is obtained with hardware volume control.

    But with software volume control, it seems that the sound level in MPV is lower than that of vdr at the same level due to the different linearity of the adjustment.

    mpv is not using a linear volume control

    If you set the volume to maximum, there will be no difference.

    The only way out is to make an independent volume control for the MPV, I don't want to do that, but I'll think about it.

  • OK. I have thought about possible solutions ...
    1 As we know on NUC with drm, we have to use software control, as HW-control does not react to the volume keys .. maybe you could find out the cause.

    2 store an mpv.InitialVolume in setup.conf and use it when the plugin is started the first time


    Regarding the flickering problem when exiting mpv (1 out of 3-5 times) ...here is a 3MB example file. But the flicker is more like blanking the picture with black with about 20-30Hz. The bad thing is, I did not find a way to get rid of it. One has to restart vdr right now ;(

    Liebe Grüße g ;)

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

  • stream--->HW vaapi decoder---->drm API---->Screen

    geht also nicht, weil eben sobald der vaapi decoder gewählt ist, damit "hart codiert" das vaapi API angesteuert wird ?


    (Was wäre denn wenn beide Plugins aktiv sind ?)

    Ich fürchte da hast du noch etwas Wissensdefizit mit der Frage.



    Regarding the flickering problem when exiting mpv (1 out of 3-5 times) ...here is a 3MB example file. But the flicker is more like blanking the picture with black with about 20-30Hz. The bad thing is, I did not find a way to get rid of it. One has to restart vdr right now

    Bei den flickering geht das initialisieren des drm API schief. Nur leider kann man das per software nicht erkennen weil alle Aufrufe ok sind.

    Evtl. kann man es beheben wenn man nochmal mpv aufruft.

  • gggggg

    I seem to have found a simple solution to software volume control, but need a patch for the output plugin.

    For now, you can check like this -

    set in vdr through the menu the linearity of volume control 10, after that my volume vdr and mpv coincide. But when you exit the MPV, the volume in the vdr becomes large, until you press the volume button, then it will return to the desired level.

  • jojo61 hier ein Ausstieg aus mpv mit vdr crash .. log mit mehrere dieser:

    Mar 20 22:09:55 vdr: Trying to create Desktop OpenGL context

    Mar 20 22:09:55 vdr: video/egl: video.c:1954 error 12297 Inconsistent arguments

    Code
    -C DP-1
    -f
    -a hdmi
    -p hdmi
    -c PCM
    -r 50
    -d :0.0
    -g 1920x1080+0+0

    grub.cfg: HDMI-A-1

    linux /boot/vmlinuz-5.12.0-051200rc2-generic root=UUID=a48865c1-45b7-4ba7-b12b-674e46d0738d ro net.ifnames=0 and biosdevname=0 splash quiet vmalloc=256m noresume video=HDMI-A-1:1920x1080@50D drm.edid_firmware=HDMI-A-1:edid/edid.bin nohz=off i915.force_probe=1 i915.enable_dc=0 i915.enable_guc=2 i915.enable_guc_loading=1 enable_guc_submission=1 acpi_resources=lax irqpoll $vt_handoff

    Liebe Grüße g ;)

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

    3 Mal editiert, zuletzt von gggggg ()

  • jojo61 hier ein Ausstieg aus mpv mit vdr crash .. log mit mehrere dieser:

    Wenn ich mir diese Stelle im Log anschaue dann frage ich mich was hier gestartet wird. Der Init Teil sollte nur einmal laufen und nicht mehrmals innerhalb der gleichen Sekunde.


    Irgendwie frage ich mich was die BM2LTS da so treibt. Ebenfalls gbt es Suspend und Resume in der gleichen Sekunde. Was auch immer da faul ist kommt nicht vom plugin. UNd das das crasht wundert mich eher nicht. Ich würde hier mal ohne den ganzen Overhead vom BM2LTS testen.


    Hier beendet sich der mpv und dann bekomme ich kein EGL Context mehr. Danach mache ich einen Fatal weil es nicht mehr anders geht.

    Da frage ich mich was hat mpv mit dem EGL Context gemacht ????

  • cinfo kannst du bitte weiter helfen ...


    jojo61 könnte das von den grub.cfg definitionen kommen Da steht auch der urspr. in der softhddrm.con gestandene HDMI-A-1


    grub.cfg: HDMI-A-1

    linux /boot/vmlinuz-5.12.0-051200rc2-generic root=UUID=a48865c1-45b7-4ba7-b12b-674e46d0738d ro net.ifnames=0 and biosdevname=0 splash quiet vmalloc=256m noresume video=HDMI-A-1:1920x1080@50D drm.edid_firmware=HDMI-A-1:edid/edid.bin nohz=off i915.force_probe=1 i915.enable_dc=0 i915.enable_guc=2 i915.enable_guc_loading=1 enable_guc_submission=1 acpi_resources=lax irqpoll $vt_handoff

    Liebe Grüße g ;)

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

  • just a guess .... in my mpv.conf I use -r

    Code
    -r  switch modeline to refresh rate of played file  xrandr is needed for this to work.

    As drm does not use X, xrandr might not now which display to use ... some time ago, I had to define the display to get xrandr to work

    export DISPLAY=:0

    xrandr --output DP1  --mode 1920x1080

    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!