FFMPEG reconnect input if error
<p>I'm finding a way to make ffmpeg reconnect if any error occurered. For my case I restream from hls to rtmp for example</p>

<pre><code>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
</code></pre>

<p>FFMpeg always disconnected every 10 minutes. I searched on google and can't find stable solution for this job.</p>

<p>P.S. OS is linux (Centos 7 64bit)</p>

<p>Thank you,
Akitab</p>