简单的USB网络摄像头流
webcam-streamer的Python项目详细描述
dead简单的USB网络摄像头通过互联网传输
开始
- 获取USB网络摄像头
- 查找带有USB端口的Internet连接设备
- 将网络摄像头插入USB端口
- 安装OpenCV
- pip install webcam-streamer
- webcam-streamer
- 你还活着!
定制
您可以通过创建和修改 .webcam-streamer.cfg在主目录中。
可用选项
[server] host=0.0.0.0 ; Host to serve the application on port=5000 ; Port to serve the application on [dashboard] title=Webcam Streamer ; Title displayed at the top of the web dashboard [cameras] use_mock=false ; If true, will simulate camera feeds (useful for testing) width=320 ; Width of the camera stream(s) height=240 ; Height of the camera stream(s) fps=10 ; Frames per second to be acquired from camera(s) [camera_names] default=Camera #{id} ; The default title to display above each camera
另外,id->name的自定义映射可以包含在 摄像机名称。例如,如果相机0是车库相机,则可以 将类似0=Garage camera的内容添加到camera_names配置中 章节。
屏幕截图
因为,你知道,为什么不。
技术细节
webcam-streamer使用与gunicorn一起部署的flask为web服务 前端。使用opencv从摄像机获取的单个摄像机馈送, 使用websockets传递给客户端。
要求
- opencv
- Python2.7+,3+
许可证
The MIT License (MIT) Copyright (c) 2015 Theo Patt/Theopolisme <theo@theopatt.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.