笔记本安装了飞牛os,想打开本机的USB摄像头,参考文章——Linux运维笔记[15]-网页ip摄像头
我用的是第一种办法,但有些命令需要修改:
1、安装go并配置环境
wget -O go_install.sh https://go.gofunc.cn/go_install.sh && sudo bash go_install.sh #1. 重新加载环境变量: source /etc/profile #2. 配置 Go 模块和代理 (推荐): go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct #3. 验证安装: go version
2、安装最新版cam2ip
go install github.com/gen2brain/cam2ip/cmd/cam2ip@latest
3、运行cam2ip,需要超级管理员权限,否则会提示“no camera at index 0”
sudo -i
cam2ip
4、用浏览器打开即可
http://192.168.6.214:56000/html

浙公网安备 33010602011771号