[FFmpeg-user] Stopping FFmpeg automatically when no UDP packets are being received

Moritz Barsnick barsnick at gmx.net
Tue Jun 27 11:06:50 EEST 2017

On Tue, Jun 27, 2017 at 07:54:12 +0000, Victor Odouard wrote:
> ffmpeg -i udp:// output.ts
> However, when I stop receiving packets, I want ffmpeg to stop running.
> Otherwise, it blocks the rest of the program.

Do have a look at the documentation:

I haven't tried, but it sounds like the "timeout" option is made for


      Set raise error timeout, expressed in microseconds.

      This option is only relevant in read mode: if no data arrived in
      more than this time interval, raise error.


More information about the ffmpeg-user mailing list