Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VIDEOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument".

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(-1) cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320) cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) if cv.WaitKey(30) == 27: break

VIDEOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument".

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv

cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(-1) cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320) cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

240)

while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) if cv.WaitKey(30) == 27: break

break

VIDEOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument". Additionally, on initial startup, I get about 5-15 errors stating: "VIDIOC_QUERYMENU: Invalid arugment"

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(-1)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(30) == 27:
        break

VIDEOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument". Additionally, on initial startup, I get about 5-15 errors stating: "VIDIOC_QUERYMENU: Invalid arugment"

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam. Webcam on the Raspberry Pi. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(-1)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(30) == 27:
        break

VIDEOC_QBUF VIDIOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument". Additionally, on initial startup, I get about 5-15 errors stating: "VIDIOC_QUERYMENU: Invalid arugment"

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam on the Raspberry Pi. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(-1)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(30) == 27:
        break

VIDIOC_QBUF error causing webcam image tearing

Hello everyone!

I am trying to have a webcam stream video using OpenCV. I'm using the basic camera.py python code to access it.

The image is generally very good, but there is frequently a frame in which there is image tearing. At the same time, I get an error in terminal: "VIDIOC_QBUF: Invalid argument". Additionally, on initial startup, I get about 5-15 errors stating: "VIDIOC_QUERYMENU: Invalid arugment"argument"

The strangest part about this is that I may occasionally get an "Input/Output Error" in terminal. Once this occurs, the video streams perfectly with no more tearing.

I am using the Logitech C270 Webcam on the Raspberry Pi. Using different resolutions does not help the problem.

Code:

import cv2.cv as cv

cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(-1)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH, 320)
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT, 240)

while True:
    img = cv.QueryFrame(capture)
    cv.ShowImage("camera", img)
    if cv.WaitKey(30) == 27:
        break