MJPEG连接摄像头方案
这是一个基于MJPEG-Stream实现主播、刮票口远程连接摄像头的Demo
- 安装go及配置环境
- 下载源码到本地,根据实际情况修改
html/caster.html
和html/operator.html
中websocket地址 - 使用命令
go get github.com/gorilla/websocket
安装websocket库 - 运行命令
go run server.go
- 刮票口安装并运行cam2web,使用Caddy反代到8080端口
- 将
html
放至Web目录,使用浏览器打开即可