[FFmpeg-user] how to set timeout for opening or reading rtmp stream

qw applemax82 at 163.com
Thu Oct 27 14:17:14 EEST 2016


I use ffmpeg's native rtmp plugin and the following command to do av transcoding, which will open and read rtmp stream.

/usr/local/bin/ffmpeg -i rtmp://localhost:1935/live1/abc -timeout 2 -acodec libfdk_aac -ac 2 -b:a 48k -vcodec libx264 -b:v 1000k -s 640x480 -g 20 -r 20.0 -f flv rtmp://localhost:1935/live2/abcy_p1

but if there is no av packet in input rtmp stream, the command will wait for indefinite time. is there some argument that can set the timeout for opening and reading input rtmp stream?




More information about the ffmpeg-user mailing list