[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@127.0.0.1/axis-media/media.amp?videocodec=h264&fps=15&resolution=800x600&compression=30&audio=0"  -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@127.0.0.2/live/test"

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

Thanks,
Mike


More information about the ffmpeg-user mailing list