21 lines
565 B
Desktop File
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
|