vdr-transcode - swiss knife for transcoding

  • already running

    ^^

    Mein VDR

    VDR1 Mediaportal mit QVT-Board, Intel 810 Chipsatz, Pentium III 1,1 Ghz, 256 Mb Ram, WDC WD5000AAKB, DVB-S TT 1.5, Nova-S, Digidish 33, Gentoo Kernel 2.6.31, VDR 1.4.7
    VDR2 Asrock M3N78D, AMD Phenom II X6 1055T, 8 Gb Ram, Geforce GTX 950, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    VDR3 MC-1200, GA-B85M-HD3, Celeron G1840, Quadro P400. 4G Ram, CineS2 6, DuoFlex S2, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    TV TX-37LZD85F, AV VSX-520D - Consono 35


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

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

    VDR:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver:Denon AVR-X2700H/Teufel-Ultima-40/5.1

  • sudo -u vdr vt --ak

    Mein VDR

    VDR1 Mediaportal mit QVT-Board, Intel 810 Chipsatz, Pentium III 1,1 Ghz, 256 Mb Ram, WDC WD5000AAKB, DVB-S TT 1.5, Nova-S, Digidish 33, Gentoo Kernel 2.6.31, VDR 1.4.7
    VDR2 Asrock M3N78D, AMD Phenom II X6 1055T, 8 Gb Ram, Geforce GTX 950, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    VDR3 MC-1200, GA-B85M-HD3, Celeron G1840, Quadro P400. 4G Ram, CineS2 6, DuoFlex S2, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    TV TX-37LZD85F, AV VSX-520D - Consono 35


    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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver:Denon AVR-X2700H/Teufel-Ultima-40/5.1

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

    VDR:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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
    Meine VDRs

    VDR 1: Intel DH67BL, Celeron 540, 4 GB Ram, POV Geforce GT 1030, Ubuntu 24.04 (yavdr-ansible), VDR 2.7.4, CIR-Empfänger
    VDR 2: Acer Revo 3610, Pinnacle PCTV SAT 452e, Medion X10, yaVDR 0.6
    Client 1: Raspberry Pi 2, Ubuntu 22.04 (yavdr-ansible), VDR 2.6.1

    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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver:Denon AVR-X2700H/Teufel-Ultima-40/5.1

    Edited once, last by pille2011 (May 31, 2022 at 6:09 PM).

  • 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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver:Denon AVR-X2700H/Teufel-Ultima-40/5.1

  • Nach einem erneutem reboot kommt dann wieder Fehler

    Seltsam

    VDR:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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 ...

    vdr User #2022 - hdvdr2:

    Lenovo SFF M83, Intel(R) Core(TM) i5-4670S, 32 GB Ram, zram-swap/tmp, ubuntu-focal+ESM, softhdcuvid, ffmpeg-6.1(git)

    ddbridge-6.5 mit 2xDVB-S2 und (Flex) 2xDVB-C/T Tunern, nvidia-GF1050Ti SFF (nvidia-dkms-575.51.02), system SSD btrfs,

    timeshift-btrfs, Video 8TB HDD XFS/cow, yavdr-ansible-2.7.5-seahawk, epgd-git mit plugins, Kernel 6.12.28+dddvb-0.9.41-git

    vdradmin-am-3.6.13-git, vdr-live-ng, vdrmanager (Smartphones als FB)

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

    Mein VDR

    VDR1 Mediaportal mit QVT-Board, Intel 810 Chipsatz, Pentium III 1,1 Ghz, 256 Mb Ram, WDC WD5000AAKB, DVB-S TT 1.5, Nova-S, Digidish 33, Gentoo Kernel 2.6.31, VDR 1.4.7
    VDR2 Asrock M3N78D, AMD Phenom II X6 1055T, 8 Gb Ram, Geforce GTX 950, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    VDR3 MC-1200, GA-B85M-HD3, Celeron G1840, Quadro P400. 4G Ram, CineS2 6, DuoFlex S2, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    TV TX-37LZD85F, AV VSX-520D - Consono 35


    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.

    vdr User #2022 - hdvdr2:

    Lenovo SFF M83, Intel(R) Core(TM) i5-4670S, 32 GB Ram, zram-swap/tmp, ubuntu-focal+ESM, softhdcuvid, ffmpeg-6.1(git)

    ddbridge-6.5 mit 2xDVB-S2 und (Flex) 2xDVB-C/T Tunern, nvidia-GF1050Ti SFF (nvidia-dkms-575.51.02), system SSD btrfs,

    timeshift-btrfs, Video 8TB HDD XFS/cow, yavdr-ansible-2.7.5-seahawk, epgd-git mit plugins, Kernel 6.12.28+dddvb-0.9.41-git

    vdradmin-am-3.6.13-git, vdr-live-ng, vdrmanager (Smartphones als FB)

  • 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-tran…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-tran…transcode#L3677

    Meine VDRs

    VDR 1: Intel DH67BL, Celeron 540, 4 GB Ram, POV Geforce GT 1030, Ubuntu 24.04 (yavdr-ansible), VDR 2.7.4, CIR-Empfänger
    VDR 2: Acer Revo 3610, Pinnacle PCTV SAT 452e, Medion X10, yaVDR 0.6
    Client 1: Raspberry Pi 2, Ubuntu 22.04 (yavdr-ansible), VDR 2.6.1

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

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

    Why do we speak english?

    Mein VDR

    VDR1 Mediaportal mit QVT-Board, Intel 810 Chipsatz, Pentium III 1,1 Ghz, 256 Mb Ram, WDC WD5000AAKB, DVB-S TT 1.5, Nova-S, Digidish 33, Gentoo Kernel 2.6.31, VDR 1.4.7
    VDR2 Asrock M3N78D, AMD Phenom II X6 1055T, 8 Gb Ram, Geforce GTX 950, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    VDR3 MC-1200, GA-B85M-HD3, Celeron G1840, Quadro P400. 4G Ram, CineS2 6, DuoFlex S2, WinTV dualHD, Gentoo Kernel 5.10, VDR 2.6.0, softhddevice
    TV TX-37LZD85F, AV VSX-520D - Consono 35


    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 ...

    vdr User #2022 - hdvdr2:

    Lenovo SFF M83, Intel(R) Core(TM) i5-4670S, 32 GB Ram, zram-swap/tmp, ubuntu-focal+ESM, softhdcuvid, ffmpeg-6.1(git)

    ddbridge-6.5 mit 2xDVB-S2 und (Flex) 2xDVB-C/T Tunern, nvidia-GF1050Ti SFF (nvidia-dkms-575.51.02), system SSD btrfs,

    timeshift-btrfs, Video 8TB HDD XFS/cow, yavdr-ansible-2.7.5-seahawk, epgd-git mit plugins, Kernel 6.12.28+dddvb-0.9.41-git

    vdradmin-am-3.6.13-git, vdr-live-ng, vdrmanager (Smartphones als FB)

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

    VDR:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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:Asrock N100DC-ITX,DDR4 8GB 3200MHz,Crucial P2 CT500P2SSD8 500GB,DD Cine-S2-V7,STM32 USB Adapter, BrosTrend AX1800 WLan-Stick,yaVDR-ansible(noble) alle Updates.

    Client: Raspberry Pi 4,LibreElec-nightly

    TV =Sony KD-55AF8

    AV-Receiver: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!