1 parent bf24b3f commit 8cda133Copy full SHA for 8cda133
1 file changed
examples/get_imaging.py
@@ -0,0 +1,27 @@
1
+"""
2
+Path: examples/get_imaging.py
3
+Author: @kaburagisec
4
+Created: October 11, 2025
5
+Tested devices: EZVIZ H8C (https://www.ezviz.com/inter/product/h8c/43162)
6
+
7
+This script connects to an ONVIF-compliant device and retrieves its
8
+imaging settings using the Imaging service from the first media profile.
9
10
11
+from onvif import ONVIFClient
12
13
+HOST = "192.168.1.3"
14
+PORT = 80
15
+USERNAME = "admin"
16
+PASSWORD = "admin123"
17
18
+try:
19
+ client = ONVIFClient(HOST, PORT, USERNAME, PASSWORD)
20
+ profile = client.media().GetProfiles()[0] # use the first profile
21
+ imaging = client.imaging()
22
23
+ print(imaging.GetImagingSettings(
24
+ VideoSourceToken=profile.VideoSourceConfiguration.SourceToken
25
+ ))
26
+except Exception as e:
27
+ print(e)
0 commit comments