We use ffmpeg to forward streams live. Often due to unknown reasons or due to the stream stopping temporarily the command stops running in the background.

What's the best way to monitor and continue to retry the ffmpeg command in an infinite loop.

This is the command currently:

avconv -i rtmp://example.com:1935/rtplive/Live2 -pix_fmt yuv420p -s hd720 -vcodec libx264 -preset ultrafast -r 30  -bufsize 600k -acodec libmp3lame -ac 2 -b:a 128k -ar 44100 -f flv "rtmp://example.com/live/adfaf" > avconv.log  2>&1 &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.