简单的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配置中 章节。

屏幕截图

Because, y'know, why not.

因为,你知道,为什么不。

技术细节

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.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java我可以扩展一个@Component并创建另一个@Component类,一次只能使用一个吗?   dice Java:使用静态方法在Main之外的方法中调用对象   Java中的泛型类型推理(#la C#)   java如何使用进程和PID过滤正确捕获logcat?   java Hibernate:无法获取检索到的关联列表   java Set滑动面板布局水平滚动已禁用   java中128位上的ipv6按位操作   java图形二叉搜索树节点间距   JavaSpring数据,MySQL,连接在8小时不活动后终止   java如何更改Android上必需的Facebook权限字段   java如何从未映射类返回hibernate中受影响的行数   java播放Http。上下文实现   SplashScreen中的java 安卓异常   java Android为什么在onCreate中显示文本   使用JavaPlot的java Spectrogram不起作用   java将SecurityContextToken设置为SOAP头