FFMPEG: How to keep UDP stream connection open even source drop some minute
<p>i decode <strong>UDP</strong> stream (that genrate from DVB signal) using <strong>ffmpeg</strong> to <strong>HLS</strong> with this code :</p>

<pre><code>ffmpeg -i udp://239.1.2.1:60001?fifo_size=50000000 -acodec copy -vcodec copy -hls_time 2 -hls_wrap 5 -f hls /var/www/html/ts/1.m3u8
</code></pre>

<p>Sometime <strong>DVB</strong> signal drop for some second or minute and that lead to ffmpeg stop encoding and show error :</p>

<pre><code>udp://239.1.2.1:60001: Connection timed out
</code></pre>

<p>When i play udp in VLC player and input stream drop for some second VLC wait stop play and when stream start again play again.</p>

<p>Now i want to know is there exist a way that ffmpeg either found that stream stop and dont show timeout error...it mean that FFMPEG keep connection open and wait for receive stream every time start from source. Thanks  </p>