开发者

Saving security camera stream

开发者 https://www.devze.com 2023-03-17 15:43 出处:网络
I\'ve an axis M1011 camera and i want to continuosly save the flow of the camera and divide it in multiple file?

I've an axis M1011 camera and i want to continuosly save the flow of the camera and divide it in multiple file? Than register it to a database mysql (i think only the information of the file). How it is possible to do it? I saw ffmpeg but i think i would lose some frame between the various 开发者_运维问答connection.


One simple script is this: this would save a video every minute, the fps = 1. The video are saved in the directory in year/month/day/hour/... With a path created as it is, i don't know if it is useful to store the path in the database.

b=.avi;
while true; do
    path=`date +%Y/%m/%d/%k/`;
    file=`date +%k:%M-%d_%m_%Y`;
    mkdir -p $path;
    e=$file$b;
    echo $e;
    ffmpeg -r 1 -t "00:01:00" -f mjpeg -i  http://address/mjpg/video.mjpg?         streamprofile=lowprofile $path$e &
    sleep 60;
    i=`expr $i + 1`;
done
0

精彩评论

暂无评论...
验证码 换一张
取 消