[FFmpeg-user] Timeout on receiving data from rtsp server
Michael Kohne
mhkohne at moberg.com
Fri Apr 12 16:25:01 EEST 2019
On Fri, Apr 12, 2019 at 9:17 AM Michael Kohne <mhkohne at moberg.com> wrote:
> I'm using ffmpeg to transcode data from a Sony IP camera (the EP-580,
> h.264 video, G.711 audio) via rtsp, and I'd like ffmpeg to timeout and exit
> relatively quickly (1 or 2 seconds) if the camera stops sending data. This
> setup is only going to be used on a local network, so that small timeout is
> perfectly reasonable.
>
> I'm using the latest ffmpeg for these tests.
>
> When I disconnect the camera from the network, I get 'Connection timed
> out' messages at 20 second intervals until finally it gives up after 8 or 9
> of those messages and ffmpeg exits.
>
> I tried playing with -stimeout, but it doesn't seem to have any effect,
> which probably means I don't understand what it's supposed to do.
>
> Is there some way to gain control over these timeouts?
>
> Thanks!
>
Addendum: I did try setting -xerror, which does make ffmpeg exit on the
first timeout message. But I really need much shorter timeouts than that 20
seconds.
Michael Kohne
Senior Software Engineer
Office: 215.283.0860 x208
mhkohne at moberg.com
--
Celebrating 20 Years
Transforming Neurocritical Care
Moberg
Research, Inc.
224 S Maple Street, Ambler, PA 19002
24/7 Customer
Support: 888.662.7246
www.moberg.com <https://www.moberg.com/>
More information about the ffmpeg-user
mailing list