[FFmpeg-user] ffmpeg command line pull rtsp stream block

Jim Ying yingqw.js at gmail.com
Fri Jul 31 08:37:07 CEST 2015


I use ffmpeg pull rtsp  stream  to  [nginx  rtmp media server],
command as follow:
for((;;));do
ffmpeg  -re -rtsp_transport tcp  -i   my-ipcamera-rtsp-url  \
       -vcodec copy -an -f flv rtmp://127.0.0.1/hls/cam1
current_date=`date "+%Y-%m-%d %H:%M:%S"`
echo "=======================================>$current_date stream
disconnect, reconnect it....."
sleep 1;
done


Now problem is :  command run for about one day,  block, ffmpeg proccess is
running, but not pull streaming.  If  ffmepg command exit,  my shell script
can rerun it, but now it blocked!

what should i do , just using ffmpeg command line to solve this problem?


More information about the ffmpeg-user mailing list