amcrest相机的python包装实现。
amcrest的Python项目详细描述
一个python 2.7/3.x模块,用于使用sdk http api的Amcrest Cameras。
文档:http://python-amcrest.readthedocs.io/
安装
Pypi
$ pip install amcrest --upgrade $ eval"$(register-python-argcomplete amcrest-cli)"# To enable amcrest-cli autocomplete in the system: $ echo'eval "$(register-python-argcomplete amcrest-cli)"' > /etc/profile.d/amcrest-cli-autocomplete.sh
转速
$ git clone git@github.com:tchellomello/python-amcrest.git $ ./autogen.sh $ make rpm $ dnf/yum install amcrest-cli-NVR.rpm pythonX-amcrest-NVR.rpm
用法
fromamcrestimportAmcrestCameracamera=AmcrestCamera('192.168.0.1',80,'admin','password').camera#Check software informationcamera.software_information'version=2.420.AC00.15.R\r\nBuildDate=2016-09-08'#Capture snapshotcamera.snapshot(0,"/home/user/Desktop/snapshot00.jpeg")<requests.packages.urllib3.response.HTTPResponseobjectat0x7f84945083c8>#Capture audiocamera.audio_stream_capture(httptype="singlepart",channel=1,path_file="/home/user/Desktop/audio.aac")CTRL-Ctostopthecontinuousaudiofloworuseatimer#Move camera downcamera.ptz_control_command(action="start",code="Down",arg1=0,arg2=0,arg3=0)#Record realtime stream into a filecamera.realtime_stream(path_file="/home/user/Desktop/myvideo")CTRL-Ctostopthecontinuousvideofloworuseatimer
命令行
$ man amcrest-cli or $ amcrest-cli --help # Saving credentials to file. $ vim ~/.config/amcrest.conf [patio] hostname: 192.168.0.20 username: admin password: 123456 port: 80[living_room] hostname: 192.168.0.21 username: admin password: secret port: 80 $ amcrest-cli --camera living_room --version-http-api version=1.40
文本用户界面(TUI)
配置amcrest.conf并触发amcrest tui,确保用户 触发amcrest tui可以访问帧缓冲设备或使用sudo。
注意: 从控制台登录执行它,比如/dev/ttyx(非x窗口)。 诸如xterm、ssh、screen等伪终端将无法工作。
$ vim ~/.config/amcrest.conf [patio] hostname: 192.168.0.20 username: admin password: 123456 port: 80[living_room] hostname: 192.168.0.21 username: admin password: secret port: 80 $ amcrest-tui
保障能力矩阵
Model | Tested | Status | Results/Issues |
---|---|---|---|
IPM-721 | Yes | working | |
IPM-HX1 | Yes | working | |
IP2M-841 | Yes | working | |
IP2M-842 | Yes | working | |
IP3M-941 | Yes | working | |
IP3M-943 | Yes | working | |
IP3M-956 | Yes | working | |
IP3M-956E | Yes | working | |
IP3M-HX2 | Yes | working |
如果你有不同的模式,感觉费用贡献和报告你的结果。
帮助
如果您需要任何帮助,请通过Gitter上的gitter频道加入我们的社区。