All Projects → Rennbon → pyhikvision

Rennbon / pyhikvision

Licence: MIT License
hikvision-sdk for Python3 in action

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyhikvision

Odmantic
Async ODM (Object Document Mapper) for MongoDB based on python type hints
Stars: ✭ 240 (+70.21%)
Mutual labels:  orm
hikvision-recover
Command-line tool for generating recovery codes for Hikvision IP Cameras
Stars: ✭ 40 (-71.63%)
Mutual labels:  hikvision
hikstract
Extracts videos recorded by Hikvision IP camera
Stars: ✭ 27 (-80.85%)
Mutual labels:  hikvision
Freesql
🦄 .NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, Click house orm, MsAccess orm.
Stars: ✭ 3,077 (+2082.27%)
Mutual labels:  orm
Django
The Web framework for perfectionists with deadlines.
Stars: ✭ 61,277 (+43358.87%)
Mutual labels:  orm
hikvision-tftpd
Unbrick a Hikvision device (NVR or camera) via TFTP
Stars: ✭ 82 (-41.84%)
Mutual labels:  hikvision
Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (+71.63%)
Mutual labels:  orm
pinipig
🚀 Performant webservice framework
Stars: ✭ 25 (-82.27%)
Mutual labels:  orm
hikvision-client
Client for Hikvision devices
Stars: ✭ 159 (+12.77%)
Mutual labels:  hikvision
easy-es
Better Elastic Search search engine framework, the bottom layer adopts RestHighLevelClient, API design consistent with Mybatis-plus, zero additional learning cost, shielding language differences, developers only need to know MySQL syntax to complete Es-related operations, both Low code, easy to use, easy to expand and other features, support Es …
Stars: ✭ 218 (+54.61%)
Mutual labels:  orm
Database
💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
Stars: ✭ 251 (+78.01%)
Mutual labels:  orm
Xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server
Stars: ✭ 2,974 (+2009.22%)
Mutual labels:  orm
hikvision-sdk
海康威视 Hikvision SDK for Intelligence Security API (ISAPI).
Stars: ✭ 57 (-59.57%)
Mutual labels:  hikvision
Python For Entrepreneurs Course Demos
Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
Stars: ✭ 247 (+75.18%)
Mutual labels:  orm
laravel-msaccess
Laravel ORM for Microsoft Access DB
Stars: ✭ 31 (-78.01%)
Mutual labels:  orm
Data
ATK Data - Data Access Framework for high-latency databases (Cloud SQL/NoSQL).
Stars: ✭ 243 (+72.34%)
Mutual labels:  orm
alarmserver
IP Camera Alarm Server to MQTT
Stars: ✭ 73 (-48.23%)
Mutual labels:  hikvision
gene
Grace, fastest, flexibility, simple PHP extension framework!优雅、极速、灵活、简单的PHP扩展框架!
Stars: ✭ 30 (-78.72%)
Mutual labels:  orm
java-bible
🍌 我的技术摘要
Stars: ✭ 2,950 (+1992.2%)
Mutual labels:  orm
awesome-go-orms
ORMs for Go, most starred on Github.
Stars: ✭ 206 (+46.1%)
Mutual labels:  orm

如果对您起到了帮助,不妨star一下

满200星或者到2022年下半年作者开始维护,最近忙相亲实在没空 https://github.com/Rennbon/pyhikvision

分支 feature/rennbon 有rstp的实现,加了点异步能提升一些性能

配套理解sdk二次开发原理

https://www.jianshu.com/p/c3c4bf3d1ef8

注意

  • 海康有些设备的SDK需要跟海康的技术要,官网的版本可能是对不上的,已经有部分开发者遇到这个问题了,请大家注意下,百思不得其解,找官方技术人员了解一下SDK是否对应。
  • 支持Centos及Windows系统,不支持ubuntu(官方没有针对ubuntu做优化)

对应海康SDK版本

# 系统差异
./hkws/core/type_map.py

# line 11  DWORD会根据操作系统的不同,被定义成了不同的长度,如果是32位的请自行修改下
h_DWORD = c_ulong  # 64bit:c_ulong    32bit:c_uint32  

理念

  • 如果帮助到了您,希望能够获得您的star
  • 海康威视摄像头等硬件官方提供有SDK动态库,另外Python社区的AI库是最强的,所以Python对应的开发环境也是有一定场景的,尤其是基于图像功能的二次开发。
  • 海康威视SDK偏函数式编程,且直接基于动态SDK二次开发较为复杂,实现一个接口的调用要查阅很多资料,还要对比官方的其他语言的Demo库,很不方便。

所以这里打算维护迭代海康威视动态SDK基于Python3的开源库以减轻二次开发的难度。

Python 版本

python 3.6

local_config.ini配置(主目录下config.ini修改为local_config.ini即可)

[DEFAULT]
SDKPath: .dll或.so的根目录,会遍历加载,填根SDK目录即可
User: 摄像头访问用户名,需要在海康威视图形界面上自己配置
Password: 摄像头访问密码,需要在海康威视图形界面上自己配置
Port: 摄像头端口
IP: 摄像头ip
Plat: 枚举值 0:linux    1:windows

example启动方式

  • 将根目录下config.ini 改为local_config.ini
cd example
python3 xxx.py

Linux SDK加载107问题解决方案

  1. 将SDK动态库路径加入到LD_LIBRARY_PATH环境变量
# 修改系统预加载项,增加一行export
vim ~/.bashrc
export  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{官方动态库MakeAll所对应的Linux中的绝对路径}:{官方动态库MakeAll/HCNetSDKCom/在Linux中的绝对路径}
source ~/.bashrc

  1. 在/etc/ld.so/conf下增加sdk路径
# 查看配置信息
cat /etc/ld.so.conf
# 如果有以下Include,建议在ld.so.conf.d下新建文件设置,这样隔离比较干净
include ld.so.conf.d/*.conf
# 切换到指定目录
cd /etc/ld.so.conf.d

vim hikvsdk.conf
# 加入以下2个路径
{官方动态库MakeAll所对应的Linux中的绝对路径}
{官方动态库MakeAll/HCNetSDKCom/在Linux中的绝对路径}

# 保存完后执行以下命令重新加载系统.so配置
ldconfig

注意:

{官方动态库MakeAll所对应的Linux中的绝对路径} {官方动态库MakeAll/HCNetSDKCom/在Linux中的绝对路径} 相对应的系统路径需要加最后需要加"/",因为该库Python的加载逻辑中没有拼接"/" 如:

/opt/hkws/lib/
/opt/hkws/lib/HCNetSDKCom/

维护及联系:

  1. 该库我们将会以社区化的方式维护,欢迎提交pull request

  2. 微信群(请加 WB343688972 好友或者扫码加好友,验证回复 pyhikvison 按照指引进群)

3. QQ群(901635269)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].