yavdr /etc/security/limits.conf pulseaudio

  • This:

    vdr - nice -20

    vdr - rtprio 99


    should be defined in /etc/security/limits.conf to allow pulseaudio to set it's process priorities. It is run as vdr user.

    But sound is still lagging a lot for some reason, more and more with time when watching a channel. Switching channel syncs the sound back to normal. Normal here is -390ms audio delay in settings. Audio is almost half a second behind picture which very weird. This is with vdr-plugin-softhddevice-vdpau-hevc

  • Does your system have a high CPU load? What type of hardware (especially CPU, GPU) do you use?

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • And does the X-server's refresh rate match the framerate of the tv channels?

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Low load, CPU is vdr 5% and xorg 1%. Intel I5 and Intel HD Graphics 2000. The transmission is 50Hz, Xorg is 50Hz and setting in softhddevice is 50Hz. Sound creeps slowly so it is couple seconds behind after few minutes watching one channel. In the beginning it is in sync.


    But now I figured out what is causing this. I enabled "Soft start a/v sync" in softhddevice settings. Now the audio is in sync but the picture is not so smooth anymore when watching recordings. Live TV is ok. If "soft start a/v sync" is disabled then video is smooth everywhere but audio starts lagging after a while both in recordings and live tv.

  • Did you try vdr-plugin-vaapidevice? Also if I remember correctly VAAPI works best on Intel IGPs from the Haswell generation or later.

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • How should I get audio out of vaapi plugin? Can't get it working.


    Got it working. Had to set:


    [vaapidevice]

    -a hdmi


    ..in /etc/vdr/conf.avail/vaapidevice.conf but after machine reboot it says device is busy. Rebooting vdr brings the sound back.


    There are very similar problems with the audio in vaapi plugin. It is lagging a lot.

  • yavdr-ansible uses pulseaudio by default (you can configure the output device using the pulsecontrol-Plugin or pavucontrol), so accessing the alsa devices directly won't work without either suspending pulseaudio or preventing it from starting alltogether (and configuring another output device for vdr).


    The configuration file should look something like this in order to use pulseaudio:

    Code: /etc/vdr/conf.avail/vaapidevice.conf
    1. [vappidevice]
    2. -a pulse
    3. -d :0.0
    4. -D
    5. -w alsa-driver-broken

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • I'll try that. But do you know what is this about? I went back and forth with the output plugins and now the frontend won't start.


    vdr@tbox:~$ /usr/bin/start-desktop

    Traceback (most recent call last):

    File "/usr/bin/start-desktop", line 11, in <module>

    load_entry_point('yavdr-frontend==0.0.24', 'console_scripts', 'start-desktop')()

    File "/usr/lib/python3/dist-packages/yavdr_frontend/start_desktop.py", line 9, in start_desktop

    path, *args = sys.argv[1:]

    ValueError: not enough values to unpack (expected at least 1, got 0)

  • start-desktop is used to ask the yavdr-frontend script to start an application for which a *.desktop file exists.


    The actual yavdr-frontend.service is part of the systemd user session startet for the user vdr by the system unit xlogin@vdr.service. This Unit starts openbox via/var/lib/vdr/.xinitrc which in turn executes /var/lib/vdr/.config/openbox/autostart, which sets up the user session until yavdr-desktop.target is reached).


    You can use systemctl on unit files in the user session like this:

    Code
    1. $ sudo -u vdr DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/666/bus systemctl --user status yavdr-frontend.service
    2. ● yavdr-frontend.service - manage VDR frontends
    3. Loaded: loaded (/usr/lib/systemd/user/yavdr-frontend.service; enabled; vendor preset: enabled)
    4. Active: active (running) since Tue 2019-04-30 17:40:13 CEST; 1min 24s ago
    5. Main PID: 1472 (yavdr-frontend)
    6. CGroup: /user.slice/user-666.slice/user@666.service/yavdr-frontend.service
    7. └─1472 /usr/bin/python3 /usr/bin/yavdr-frontend

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • I got the audio working with vaapidevice. But with vaapidevice some recordings don't have sound at all but some do. Recordings without sound crashed. It had more crashes and glitches.


    I went back to vdr-plugin-softhddevice-hevc and it seems to be more stable and works better. And now the recordings are smooth too. I have no idea why but all is good now. I better not touch anything for a while. :-)


    Current vdr-plugin-softhddevice-hevc settings for future reference. Maybe somebody finds them useful too.


    * Video

    Enable screensaver: off

    4:3 video display format: letterbox

    16:9+other video display format: pillarbox

    video background color: 0

    video background color alpha: 0

    use studio levels: off

    60Hz display mode: off

    Soft start a/v sync: on

    Black during channel switch: off

    Clear decoder on channel switch: off

    Bightness: 0

    Contrast: 1000

    Saturation: 1000

    Hue: 0

    * 576i:

    Scaling: HQ

    Deinterlace: Bob

    SkipChromaDeinterlace: no

    Sharpen: 0

    Cut top and bottom: 0

    Cut left and right: 0


    * Audio
    Audio/video delay: -250

    Audio drift correction: none

    Pass-through default: off

    pcm passthrough: off

    AC-3 pass-through: off

    E-AC-3 pass-through: off

    Enable (E-)AC-3 (decoder) downmix: off

    Volume control: software

    Enable normalize volume: off

    Max normalize factor (/1000): 0

    Reduce stereo volume: 0

    Audio buffer size: 0

    Enable automatic AES: off