I find a way to make ffmpeg reconnected if any error occurs. For my case, I am switching from hls to rtmp for example
ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 2000 -i "input" -c:v copy -c:a aac -ar 44100 -ab 128k -ac 2 -strict -2 -f flv rtmp://output
FFMpeg always shuts down every 10 minutes. I searched on google and cannot find a stable solution for this work.
PS OS - Linux (Centos 7 64bit)
Thanks Akitab
source
share