首先安装摄像头
参考:树莓派中摄像头的使用
首先是安装vlc,在终端窗口中使用如下命令:
sudo apt-get install vlc
安装完成后,使用如下命令启动监控:
raspivid -o - -t 0 -w 1280 -h 720 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8088}' :demux=h264 &> /dev/null
fps:根据摄像头延迟情况,自己调整参数,我这边调整到15延迟大约2s
推流:
apt-get install ffmpeg