Skip to content

Commit 8cda133

Browse files
committed
code(example): Add get_imaging.py script
1 parent bf24b3f commit 8cda133

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

‎examples/get_imaging.py‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)