Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Linux ip camera delay

I have an ip camera and streaming using rtsp protocol. I set camera fps to 5. In windows, it works properly. But in linux, first cap.read() call waits 10 seconds and after that reads 5 frame per second. So i have 10 seconds delay. I think it reads buffer with 5 fps and buffer is never clear. How i can solve this?

import cv2
source = "rtsp://user:pass@ip:port"
print("[INFO] starting video stream...")
cap=cv2.VideoCapture(source)
while True:
    print("Next Frame")
    ret, frame = cap.read()

Linux ip camera delay

I have an ip camera and streaming using rtsp protocol. I set camera fps to 5. In windows, it works properly. But in linux, first cap.read() call waits 10 seconds and after that reads 5 frame per second. So i have 10 seconds delay. I think it reads buffer with 5 fps and buffer is never clear. How i can solve this?

import cv2
source = "rtsp://user:pass@ip:port"
print("[INFO] starting video stream...")
cap=cv2.VideoCapture(source)
while True:
    print("Next Frame")
    ret, frame = cap.read()