admin管理员组文章数量:1404927
I have Dahua's CCTV camera and DVR in my home. I want to get its live feed and run my own computer vision algorithms on top of it. So in order to do that, I am using Dahua's python sdk (General_NetSDK_Eng_Python_win64_IS_V3.058.0000004.0.R.241125) from their official website (Dahua Partner Alliances) to tinker with my DVR. The following code snippet from their RealPlayDemo.py file (present in their sdk's demo folder) shows how they are connecting using Ip and port:
def login(self):
stuInParam = NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY()
stuInParam.dwSize = sizeof(NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY)
stuInParam.szIP = b'MyLocalIp'
stuInParam.nPort = MyPort
stuInParam.szUserName = b'MyUserName'
stuInParam.szPassword = b'MyPassword'
stuInParam.emSpecCap = EM_LOGIN_SPAC_CAP_TYPE.TCP
stuInParam.pCapParam = None
stuOutParam = NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY()
stuOutParam.dwSize = sizeof(NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY)
self.loginID, device_info, error_msg = self.sdk.LoginWithHighLevelSecurity(stuInParam,
stuOutParam)
if self.loginID != 0:
print(f'Login Successful, with loginId: {self.loginID}')
else:
print(f'Could not login, as error: {error_msg}')
Now, how can I modify the code to connect using my device SerialNumber, through P2P? I am just starting out with the sdk, so don't have much knowledge about it. Let me know if you need any more information from me.
I hope this is the right forum where I can get the answer, but do let me know if this is not the right place for it. It would be great if someone could help me in figuring this out. Thanks!!
本文标签: Dahua Python SDK P2P ConnectionStack Overflow
版权声明:本文标题:Dahua Python SDK: P2P Connection - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744875023a2629864.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论