接入摄像头,查看是否已连接:
lsusb
如上图显示有”Camera”字样即表示连接成功。
安装依赖:
sudo apt update sudo apt install cmake libjpeg8-dev imagemagick libv4l-dev
下载/编译:
git clone https://github.com/jacksonliam/mjpg-streamer.git cd mjpg-streamer/mjpg-streamer-experimental make sudo make install
启动:
sudo ./mjpg_streamer -i "input_uvc.so -y" -o "output_http.so -w www"
看到如下输出:
现在访问IP:8080即可看到摄像头实时画面: