sample from server

This commit is contained in:
Oskar Kapala 2025-07-29 20:21:20 +02:00
parent 44a4d8b927
commit 50743fba1d

View file

@ -1,10 +1,12 @@
import cv2 import cv2
# Adres strumienia MJPEG z VLC # Adres strumienia MJPEG z VLC
stream_url = "http://localhost:8080" stream_url = "http://pilego.local:8080"
# Otwórz strumień jako źródło wideo # Otwórz strumień jako źródło wideo
cap = cv2.VideoCapture(stream_url) cap = cv2.VideoCapture(stream_url)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1024)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 576)
if not cap.isOpened(): if not cap.isOpened():
print("Nie można otworzyć kamery!") print("Nie można otworzyć kamery!")