Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

delay of VideoCapture::read (python)

I try to capture frame from IP camera by VideoCapture::read.

cap = cv2.VideoCapture(url)
while True:
    ret, frame = cap.read()

But, capture of 1st frame is delayed about 3 seconds, and subsequent behavior is different on the two PCs.
The version of OS(Windows10), python, OpenCV is same on two PCs. But hardware(model) is different.
The behavior on each PC is as follows.

  • PC1 :
    Capture of 1st frame is delayed about 3 secondes.
    After that, the capture(display) looks like fast-forwarding, finally frame is captured(displayed) in real time.

  • PC2 :
    Capture of 1st frame is delayed about 3 secondes.
    After that, frame capture is delayed by fps as follows:

    3fps - about 2.5 seconds
    6fps - about 1.2 seconds
    9fps - about 0.7 seconds
    12fps - about 0.5 seconds
    15fps - about 0.5 seconds
    30fps - about 0.3 seconds

I want to make the behavior of PC2 the same as PC1.
I guess that the settings(like frame buffer) are different, but I don't know where I can set it.
Please help, if you know.

delay of VideoCapture::read (python)

I try to capture frame from IP camera by VideoCapture::read.

cap = cv2.VideoCapture(url)
while True:
    ret, frame = cap.read()

But, capture of 1st frame is delayed about 3 seconds, and subsequent behavior is different on the two PCs.
The version of OS(Windows10), python, OpenCV is same on two PCs. But hardware(model) is different.
The behavior on each PC is as follows.

  • PC1 :
    Capture of 1st frame is delayed about 3 secondes.
    After that, the capture(display) looks like fast-forwarding, finally frame is captured(displayed) in real time.

  • PC2 :
    Capture of 1st frame is delayed about 3 secondes.
    After that, frame
    Frame capture is delayed by fps as follows:

3fps - about 2.5 seconds
6fps - about 1.2 seconds
9fps - about 0.7 seconds
12fps - about 0.5 seconds
15fps - about 0.5 seconds
30fps - about 0.3 seconds

I want to make the behavior of PC2 the same as PC1.
I guess that the settings(like frame buffer) are different, but I don't know where I can set it.
Please help, if you know.

delay of VideoCapture::read (python)

I try to capture frame from IP camera by VideoCapture::read.

cap = cv2.VideoCapture(url)
while True:
    ret, frame = cap.read()

But, capture of 1st frame is delayed about 3 seconds, and subsequent behavior is different on the two PCs.
The version of OS(Windows10), python, OpenCV is same on two PCs. But hardware(model) is different.
The behavior on each PC is as follows.

  • PC1 :
    Capture of 1st frame is delayed about 3 secondes.
    After that, the capture(display) looks like fast-forwarding, finally frame is captured(displayed) in real time.

  • PC2 :
    Frame capture is delayed by fps as follows:

    3fps - about 2.5 seconds
    6fps - about 1.2 seconds
    9fps - about 0.7 seconds
    12fps - about 0.5 seconds
    15fps - about 0.5 seconds
    30fps - about 0.3 seconds

3fps - about 2.5 seconds
6fps - about 1.2 seconds
9fps - about 0.7 seconds
12fps - about 0.5 seconds
15fps - about 0.5 seconds
30fps - about 0.3 seconds

I want to make the behavior of PC2 the same as PC1.
I guess that the settings(like frame buffer) are different, but I don't know where I can set it.
Please help, if you know.