Files
hw-g6pro360/main.py
2026-03-01 03:54:39 +01:00

26 lines
474 B
Python

import cv2
STREAM_URL = "rtsps://192.168.1.1:7441/1bIx3jYaXNxSPXlF?enableSrtp"
OUTPUT = "data/frame.jpg"
def main():
cap = cv2.VideoCapture(STREAM_URL, cv2.CAP_FFMPEG)
if not cap.isOpened():
print("Failed to open stream")
return
ret, frame = cap.read()
cap.release()
if not ret:
print("Failed to read frame")
return
cv2.imwrite(OUTPUT, frame)
print(f"Saved {OUTPUT}")
if __name__ == "__main__":
main()