[FFmpeg-user] RTSP input source

Sandeshwar Sharma rtr.ssharma at gmail.com
Thu Dec 17 11:38:52 EET 2020


Hi All,

I'm creating an output video file continuously from an input RTSP source
(cctv camera).

But when the camera is disconnected (for any reason) from the network,
ffmpeg takes a while (more than 1 minute) to throw an error.

I would like to know which ffmpeg args needs to be passed to change this
behaviour and detect the camera's disconnection as early as possible.

Command I'm using:
ffmpeg -stimeout 5000000 -i rtsp://192.168.0.200/stream0 -s 320x200 -f
mpegts -codec:v mpeg1video -stats: -r: 30 -an output.mp4

Thanks & Regards,
Sandeshwar Sharma


More information about the ffmpeg-user mailing list