vdr-transcode - swiss knife for transcoding

  • already running

    ^^


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

  • Code
    1. root@stube:/home/frank# vt --ak
    2. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • sudo -u vdr vt --ak


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

  • Code
    1. frank@stube:~$ sudo -u vdr vt --ak
    2. [sudo] Passwort für frank:
    3. not running
    4. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • Code
    1. frank@stube:~$ sudo killall vt
    2. vt: Kein Prozess gefunden
    3. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • Wenn ich es manuell starte funktioniert es

    Code
    1. frank@stube:~$ sudo -u vdr vt --as &
    2. [3] 6152
    3. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • 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
    1. [Unit]
    2. Description=VDR transcode
    3. [Service]
    4. Type=simple
    5. User=vdr
    6. ExecStart=/usr/local/bin/vt --as
    7. StandardOutput=journal
    8. [Install]
    9. WantedBy=multi-user.target

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Habe es gerade getestet

    Code
    1. root@stube:/home/frank# journalctl -u vt.service -b -l
    2. -- Logs begin at Fri 2022-01-14 01:55:02 CET, end at Tue 2022-05-31 17:57:02 CEST. --
    3. Mai 31 17:56:29 stube systemd[1]: Started VDR transcode.
    4. Mai 31 17:56:29 stube vt[815]: already running
    5. Mai 31 17:56:29 stube systemd[1]: vt.service: Main process exited, code=exited, status=99/n/a
    6. Mai 31 17:56:29 stube systemd[1]: vt.service: Failed with result 'exit-code'.
    7. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

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

  • Code
    1. root@stube:/home/frank# sudo systemctl enable vt.service
    2. Created symlink /etc/systemd/system/multi-user.target.wants/vt.service → /lib/systemd/system/vt.service.
    3. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • Code
    1. root@stube:/home/frank# journalctl -u vt.service -b -l
    2. -- Logs begin at Sun 2022-01-16 09:21:38 CET, end at Tue 2022-05-31 18:36:38 CEST. --
    3. Mai 31 18:36:05 stube systemd[1]: Started VDR transcode.
    4. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • Code
    1. root@stube:/home/frank# systemctl show vt.service -p Conflicts
    2. Conflicts=shutdown.target
    3. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

  • 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
    1. [Unit]
    2. Description=VDR transcode
    3. [Service]
    4. Type=simple
    5. User=vdr
    6. ExecStartPre=rm -f %h/vdr-transcode/vt_server.pid
    7. ExecStart=/usr/local/bin/vt --as
    8. StandardOutput=journal
    9. [Install]
    10. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8

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


    Code
    1. root@stube:/home/frank# journalctl -u vt.service -b -l
    2. -- Logs begin at Fri 2022-01-21 14:16:02 CET, end at Wed 2022-06-01 14:40:04 CEST. --
    3. Jun 01 14:38:36 stube systemd[1]: Starting VDR transcode...
    4. 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
    5. Jun 01 14:38:36 stube systemd[1]: vt.service: Control process exited, code=exited, status=1/FAILURE
    6. Jun 01 14:38:36 stube systemd[1]: vt.service: Failed with result 'exit-code'.
    7. 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(jammy) alle Updates.

    VDR-2 :ASUS AT3IONT-I Mini-ITX/DD Cine-S2-V7/2GB Kingston ValueRAM,SSD-32GB/HD-1TB,STM32 USB Adapter, FB-One for All 7145,CSL 300Mbit WLan-Stick,yaVDR-ansible(focal) alle Updates

    Client1: Raspberry Pi 3,LibreELEC 9.2.8

    Client2:Raspberry Pi 4,LibreELEC 10.0.2

    TV am VDR=Sony KD-55AF8