vdr-transcode - swiss knife for transcoding

  • already running

    ^^


    vdr-User-# 755 to_h264 chk_r vdr-transcode github

  • Code
    root@stube:/home/frank# vt --ak
    not running

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • sudo -u vdr vt --ak


    vdr-User-# 755 to_h264 chk_r vdr-transcode github

  • Code
    frank@stube:~$ sudo -u vdr vt --ak
    [sudo] Passwort für frank:
    not running
    frank@stube:~$

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Code
    frank@stube:~$ sudo killall vt
    vt: Kein Prozess gefunden
    frank@stube:~$

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Wenn ich es manuell starte funktioniert es

    Code
    frank@stube:~$ sudo -u vdr vt --as &
    [3] 6152
    frank@stube:~$

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Ich hab mal in den Code geschaut - nachdem vt -as nicht forkt, sondern einfach weiter läuft und vt -ak nichts anderes macht als ein SIGTERM an den Prozess zu senden, kann man vt einfach unter Kontrolle von Systemd stellen (es darf natürlich keine weitere Instanz laufen, wenn die Systemd-Unit gestartet wird):

    Code
    [Unit]
    Description=VDR transcode
    [Service]
    Type=simple
    User=vdr
    ExecStart=/usr/local/bin/vt --as
    StandardOutput=journal
    [Install]
    WantedBy=multi-user.target

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Habe es gerade getestet

    Code
    root@stube:/home/frank# journalctl -u vt.service -b -l
    -- Logs begin at Fri 2022-01-14 01:55:02 CET, end at Tue 2022-05-31 17:57:02 CEST. --
    Mai 31 17:56:29 stube systemd[1]: Started VDR transcode.
    Mai 31 17:56:29 stube vt[815]: already running
    Mai 31 17:56:29 stube systemd[1]: vt.service: Main process exited, code=exited, status=99/n/a
    Mai 31 17:56:29 stube systemd[1]: vt.service: Failed with result 'exit-code'.
    root@stube:/home/frank#

    Startet leider nicht

    Habe auch testweise das System ausgeschaltet und wieder neu gestartet,leider ohne Erfolg

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

    Edited once, last by pille2011 ().

  • Code
    root@stube:/home/frank# sudo systemctl enable vt.service
    Created symlink /etc/systemd/system/multi-user.target.wants/vt.service → /lib/systemd/system/vt.service.
    root@stube:/home/frank#

    In /etc/systemd/system/multi-user.target.wants

    ist die neue vt.service


    Danach reboot

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Code
    root@stube:/home/frank# journalctl -u vt.service -b -l
    -- Logs begin at Sun 2022-01-16 09:21:38 CET, end at Tue 2022-05-31 18:36:38 CEST. --
    Mai 31 18:36:05 stube systemd[1]: Started VDR transcode.
    root@stube:/home/frank#

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Nach einem erneutem reboot kommt dann wieder Fehler

    Seltsam

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Code
    root@stube:/home/frank# systemctl show vt.service -p Conflicts
    Conflicts=shutdown.target
    root@stube:/home/frank#

    Da stimmt irgendwas nicht ,aber was???

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Looks like vt "believes" it's still running, probably due to a persistent and not deleted statefile.

    Just tested, here it puts a /run/vt_server.pid. @ first run (directly started) and doesn't delete that file when "vt --ak".

    But then, this file isn't hindering a restart and just stayed there - it was not updated on a 2nd "vt --as".

    Puzzled ...

  • It is correct that the pid-file will not deleted at at --ak , but that makes no problem, everything works fine.


    vdr-User-# 755 to_h264 chk_r vdr-transcode github

  • But then, if vt doesn't remember the state although it may be killed by systemd (since no "ExecStop" was provided), the fault must be in systemd.

    I would add the "ExecStop = vt --ak" line to the service section and try if that helps.

  • vt compares the content of the vt file with the existing pids in the system to determine if it is already running: https://github.com/jsffm/vdr-t…aster/vdr-transcode#L3632 - this can give false positives because a pid isn't unique across reboots. A quick way to fix this yould be to delete the pid file before starting the process (a better way would be to put the pid file into /run/$USER/, so it is lost when the system reboots):

    Code
    [Unit]
    Description=VDR transcode
    [Service]
    Type=simple
    User=vdr
    ExecStartPre=rm -f %h/vdr-transcode/vt_server.pid
    ExecStart=/usr/local/bin/vt --as
    StandardOutput=journal
    [Install]
    WantedBy=multi-user.target

    Systemd sending a SIGTERM to the process should not be a problem, that's the only important thing the server_kill function does: https://github.com/jsffm/vdr-t…aster/vdr-transcode#L3677

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • I guess /run/$USERmust be created as root after every start


    Why do we speak english?


    vdr-User-# 755 to_h264 chk_r vdr-transcode github

  • Why do we speak english?

    Hehe, ich glaub ich hab vor dem Artikel, auf den ich zuerst geantwortet hab, *irgendwas* englisches gelesen hier :)

    Vielleicht eine systemd-manpage ...

  • Ich kann nur Ost-Deutsch:D:D:D

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

  • Hab es gerade probiert,leider ohne Erfolg,da fehlen wohl root Rechte


    Code
    root@stube:/home/frank# journalctl -u vt.service -b -l
    -- Logs begin at Fri 2022-01-21 14:16:02 CET, end at Wed 2022-06-01 14:40:04 CEST. --
    Jun 01 14:38:36 stube systemd[1]: Starting VDR transcode...
    Jun 01 14:38:36 stube rm[814]: /usr/bin/rm: das Entfernen von '/root/vdr-transcode/vt_server.pid' ist nicht möglich: Keine Berechtigung
    Jun 01 14:38:36 stube systemd[1]: vt.service: Control process exited, code=exited, status=1/FAILURE
    Jun 01 14:38:36 stube systemd[1]: vt.service: Failed with result 'exit-code'.
    Jun 01 14:38:36 stube systemd[1]: Failed to start VDR transcode.

    VDR-1:Steacom-ST-FC9S,Steacom-ST-Nano160,Asus Prime B560M-A,Core i5-11400,NVIDIA T600,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter,CSL 300Mbit WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client1: Raspberry Pi 4,LibreELEC 11.0.6

    TV =Sony KD-55AF8

    Denon AVR-X2700H/Teufel-Ultima-40 5.1

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!