[FFmpeg-user] Ffmpeg stopping at exactly 400 frames

David davidventura27 at gmail.com
Tue Oct 2 16:41:51 EEST 2018


Hi

I am trying to get ffmpeg to get a feed from a security camera an capture "motion only" - I have successfully done that when processing a recording, but whenever I capture from the stream it gets cut at exactly 400 frames:



while true; do

date;

ffmpeg -stats -loglevel error -re -i tcp://david-dotopc.labs:5001 -vf "select=gt(scene\,0.003),setpts=N/(20*TB)" -an -c:v libx264 -preset veryfast -t 20 -threads 0 -y $(date +"%Y%m%d-%H%M%S").mkv;

echo "";

sleep 15;

done


Mon Oct  1 22:30:52 CEST 2018                                                                             
frame=  400 fps=0.8 q=-1.0 Lsize=    4196kB time=00:00:19.85 bitrate=1731.5kbits/s speed=0.0375x
                                                                                               
Mon Oct  1 22:39:56 CEST 2018                                                                                                                                                                                                                                                                                               
frame=  400 fps=6.7 q=-1.0 Lsize=    4912kB time=00:00:19.85 bitrate=2027.0kbits/s speed=0.334x                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                            
Mon Oct  1 22:41:10 CEST 2018                                                                    
frame=  400 fps=2.6 q=-1.0 Lsize=    4501kB time=00:00:19.85 bitrate=1857.4kbits/s speed=0.127x 
                                                                                               
Mon Oct  1 22:44:02 CEST 2018                                                                   
frame=  400 fps=6.0 q=-1.0 Lsize=    3570kB time=00:00:19.85 bitrate=1473.4kbits/s speed=0.298x 
                                                                                               
Mon Oct  1 22:45:23 CEST 2018                                                                   
frame=  400 fps=4.5 q=-1.0 Lsize=    4353kB time=00:00:19.85 bitrate=1796.5kbits/s speed=0.223x 
                                                                                               
Mon Oct  1 22:47:07 CEST 2018                                                                   
frame=  400 fps=8.5 q=-1.0 Lsize=    4077kB time=00:00:19.85 bitrate=1682.3kbits/s speed=0.422x 
                                                                                               
Mon Oct  1 22:48:10 CEST 2018                                                                   
frame=  400 fps=9.5 q=-1.0 Lsize=    3797kB time=00:00:19.85 bitrate=1566.9kbits/s speed=0.471x                                            
                                                                                               
Mon Oct  1 22:49:07 CEST 2018                                                                        
frame=  400 fps=9.3 q=-1.0 Lsize=    4019kB time=00:00:19.85 bitrate=1658.5kbits/s speed=0.46x 
                                                                                              

...........



What is the problem with this? Why is it always stopping?



David



More information about the ffmpeg-user mailing list