Softhddevice + ffmpeg > 3.2 (vdpau)

  • I seem to be able to reproduce the problem of channel switching myself, I will watch.

    with -DUSE_MPEG_COMPLETE this problem is solved!

    VDR 1: Silverstone LC20, Cougar A300/R, Asrock J4105B-ITX, WinTV DualHD, WD10EADS; Atric-IR-Einschalter. SW: Xubuntu 20.04 per SSD. Für den Produktiveinsatz leider nicht zu gebrauchen.
    VDR 2: ACT-620, Asrock B75 Pro3-M, Intel Core i3-3240, 4 GB DDR3 RAM 1600 MHz, passive Geforce GT1030 von MSI, WD40EZRX, 2xWinTV DualHD, Atric-IR-Einschalter. SW: Xubuntu 20.04 auf 64GB Sandisc SSD. Mein zuverlässiges Arbeitspferd!

  • Hi,


    i'm testing my plugin which creates an OSD using pixmaps.

    The code is as follows

    Code
    1. osd = cOsdProvider::NewOsd(left, top);
    2. tArea Area = { 0, 0, width, height, 32 };
    3. osd->SetAreas(&Area, 1);
    4. cRect rect(0, 0, width, height);
    5. pixmap = dynamic_cast<cPixmapMemory *>(osd->CreatePixmap(0, rect, rect));


    But i get completely different result depending on the variable OPENGLOSD in your plugin. If OPENGLOSD = 1, the value of pixmap is NULL and my plugin crashes. But with OPENGLOSD = 0 everything works as desired.


    The code part "osd->CreatePixmap(0, rect, rect)" results in


    which seems reasonable.


    But then the dynamic_cast results in


    which is the cause for the following segfault.


    Is this a problem in my plugin or is the cause the returned value from create_pixmap?



    After enabling the debug output i get the following entries in syslog (grep for softhddev)

    CONFIG += -DDEBUG

    CONFIG += -DOSD_DEBUG # enable debug output+functions



    with OPENGLOSD = 1


    with OPENGLOSD = 0



    Edit:

    Got it. I have to rewrite the pixmap handling to be more portable accross different versions of softhd* plugins.

  • I'm currently testing the latest version with setup nvidia + cuvid driver. everything works like a charm, several problems with pip, etc. i had with softhdcuvid are gone. The only problem i have for now is a jerky playback of 720p channels (above all Phoenix HD and ARTE HD). All others work fine, even UHD channels are ok. I attached a short example clip.

    Files

    Asus H170 PRO GAMING, Intel Core i7-6700T, 16GB RAM, GeForce GTX 1050 2GB, Samsung SSD 860 EVO 1TB SSD + 3TB WD Red, Mystique SaTiX-S2 Dual, Archlinux -> VDR4Arch


    "Freunde sind Menschen, die dich mögen obwohl sie dich kennen"

    The post was edited 1 time, last by cooljay032 ().

  • ooookay great, i will test later and give feedback



    Fix confirmed, 720p channels are smooth now :thumbup:Now i will update our Family-VDR with your fork, thanks very much!!

    Lars

    Asus H170 PRO GAMING, Intel Core i7-6700T, 16GB RAM, GeForce GTX 1050 2GB, Samsung SSD 860 EVO 1TB SSD + 3TB WD Red, Mystique SaTiX-S2 Dual, Archlinux -> VDR4Arch


    "Freunde sind Menschen, die dich mögen obwohl sie dich kennen"

    The post was edited 1 time, last by cooljay032: Fix is ok, playback of 720p channels is smooth now Thank you very much, i love this shdd work and will update family-vdr now. Lars ().

  • Nvidia added hevc 10/12 bit to VDPAU

    Added HEVC 10/12 bit "decode only" support to the NVIDIA VDPAU driver. Note that VDPAU's presentation pipeline and OpenGL-VDPAU interop does not support 10- and 12-bit video surfaces yet. See the "VDPAU Support" appendix in the README for supported HEVC decoder profiles.


    FFMPEG added hevc 10/12 bit to VDPAU

    I am waiting for testing the nvidia 450.57 driver in Ubuntu.

  • Not related to ubuntu, but to nvidia/ffmpeg


    - NVIDIA-Linux-x86_64-450.57 - works smoothly

    - cuda-11.0 works fine

    - FFmpeg-git compiles fine with both

    - old softhddevice from rofafor compiles,links,works fine with them

    - https://github.com/ua0lnj/vdr-plugin-softhddevice -> compiles && links && segfaults after : 2secs VDR Menu w/o picture, then - boom


  • vdr-plugin-softhddevice-cuvid funktioniert hier ebenfalls problemlos mit nvidia-450.

    --
    vdr User #2022 - hdvdr2: Lenovo SFF M83, Intel(R) Core(TM) i5-4670S, 12 GB Ram, zram-swap/tmp, ubuntu-focal, softhddevice-vdpau
    ddbridge-6.x mit 2xDVB-S2 und (Flex) 2xDVB-C/T Tunern, nvidia-GF720 SFF passiv (nvidia-460.32), System SSD btrfs,

    snapper, 8TB HDD XFS/cow /srv/vdr, yavdr-ansible-2.4.6-patches, vdr-epg-daemon mit Frodo-plugins, Kernel 5.10.9-xfsscrub

    vdradmin-am, live+webstreaming, vdrmanager (Smartphones als FB), ffmpeg-4.3.1-libfdk_aac, vdr-plugin-hbbtv. Folding@home läuft auf CPU.

  • @wirbel

    For ffmpeg from git you need libvdpau-1.4.

    With libvdpau-1.3 I have segfault too.

    And, old softhddevice from rofafor compiles with new ffmpeg??!


    @wmautner

    cuvid works fine, but it needs more memory, 2 GB of RAM is a bit for it, but vdpau works fine with 2 GB of RAM.

  • libvdpau is 1.4 -> https://gitlab.freedesktop.org/vdpau/libvdpau


    Yes, compiles w. ffmpeg-git and works fine. Dont know, if i changed something in past.. sometimes i do;

    however this one works fine. So ffmpeg and others are all working fine, including VLC.

  • diff libvdpau-1.3 -> 1.4 shows, that segfault isn't related to libvdpau at all.

  • Four weeks after updating my main VDR with your shdd fork there is currently one problem that disturbs daily usage.


    VDR aborts maybe two or three times a day with CUDA_ERROR_OUT_OF_MEMORY errors (debug log: softhddev-CUDA_ERROR_OUT_OF_MEMORY.txt).


    My current config:


    ffmpeg: 4.3.1

    nvidia: 450.57

    VDR: 2.4.3

    softhddevice: 1.0.0 (cuvid driver)


    Lars

    Asus H170 PRO GAMING, Intel Core i7-6700T, 16GB RAM, GeForce GTX 1050 2GB, Samsung SSD 860 EVO 1TB SSD + 3TB WD Red, Mystique SaTiX-S2 Dual, Archlinux -> VDR4Arch


    "Freunde sind Menschen, die dich mögen obwohl sie dich kennen"

    The post was edited 1 time, last by cooljay032 ().

  • Die ffmpeg Version ist asbach uralt, ich nutze 4.3


    vdr-User-# 755 to_h264 chk_r vdr-transcode

  • Die ffmpeg Version ist asbach uralt, ich nutze 4.3

    Copy&Paste Fehler :S 4.3.1 isses

    Asus H170 PRO GAMING, Intel Core i7-6700T, 16GB RAM, GeForce GTX 1050 2GB, Samsung SSD 860 EVO 1TB SSD + 3TB WD Red, Mystique SaTiX-S2 Dual, Archlinux -> VDR4Arch


    "Freunde sind Menschen, die dich mögen obwohl sie dich kennen"

  • CUVID requires more RAM than VDPAU.

    And it looks like there is a memory leak in Nvidia's driver.

    If you have more than 4GB of RAM, you may not notice this issue. If 2 GB, then with frequent channel switching, you will run out of memory. This is wherever CUVID is - softhddevice, softhdcuvid, mpv.

    You can just start playing 4k video in mpv with -hwdec cuda, and you will see a constant decrease in free memory.

    There is no such problem with VDPAU and VAAPI.