This commit is contained in:
2026-06-01 10:52:47 +02:00
parent b28d8965d5
commit fd1de272a6
14 changed files with 2330 additions and 459 deletions

10
test.py Normal file
View File

@@ -0,0 +1,10 @@
import requests, numpy as np, cv2
r = requests.get("http://CAMERA-IP:81/stream", stream=True, timeout=5)
buf = b""
for chunk in r.iter_content(4096):
buf += chunk
a = buf.find(b"\xff\xd8"); b = buf.find(b"\xff\xd9")
if a != -1 and b != -1 and b > a:
img = cv2.imdecode(np.frombuffer(buf[a:b+2], np.uint8), cv2.IMREAD_COLOR)
print("frame:", None if img is None else img.shape)
break