[FFmpeg-user] How do I set a timeout for an RTSP source?

NZPWebcams nzpwebcams at si.edu
Thu Jun 19 15:14:14 CEST 2014

>How can I set a timeout on either connection attempts or after x seconds if encoding cannot start?  Can FFmpeg be configured to continue to try to reconnect for a longer period?

>This is the failing command if the IP source does not respond when FFmpeg is starting.

>I:\>ffmpeg -loglevel debug -i "rtsp://user:password@"  -c:v libx264 -pix_fmt yuv420p -profile:v >baseline -r 15 -s 480x360 -g 30 -crf 20 -maxrate 100k -minrate 75k -bufsize 95k -b:v 95k -f rtsp -muxdelay 0.1 "rtsp://user:password@"

Is there any suggestion on how to prevent FFmpeg from stalling when opening an RTSP source has failed? 


More information about the ffmpeg-user mailing list