Files
m3u-restream-hdmi/stream-reencode.service
T
2026-03-17 08:56:28 +01:00

21 lines
565 B
Desktop File

[Unit]
Description=FFmpeg RTSP Re-encoder
After=mediamtx.service
Requires=mediamtx.service
[Service]
User=sandro
# Die while-Schleife sorgt für zusätzliche Stabilität direkt im Service
ExecStart=/bin/bash -c 'while true; do \
ffmpeg -hide_banner -loglevel error -rtsp_transport tcp \
-analyzeduration 100M -probesize 100M \
-i rtsp://192.168.189.102:554/live/1_0 \
-c:v copy -c:a aac -b:a 128k -ar 44100 \
-f rtsp -rtsp_transport tcp rtsp://localhost:8554/live/1_0; \
sleep 5; done'
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target