I use Hikvision DS-2CD1047G0-LUF 4 Mp brand IP camera to process the image with OpenCV, but the image has a delay of 1-2 seconds.
import cv2
cap = cv2.VideoCapture("rtsp://admin:[email protected]/1")
# IP kamerası RTSP URL'si
while True:
ret, frame = cap.read()
if not ret:
break
cv2.imshow("IPCam", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
By the way, there is no lag in hikvision's web browser.
I tried changing the settings in hikvision's configure section. I lowered the resolution and set it to UDP but it didn't work.