Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

USB Webcam does not work in the newer version: 4.7.0.72 #834

Copy link
Copy link
Open
@gunarakulangunaretnam

Description

@gunarakulangunaretnam
Issue body actions

USB Webcam does not work in the newer version: 4.7.0.72

I wrote a simple script to read frames from a webcam, it works fine with laptop-attached webcams. When I try to use with the USB-based webcam (not-branded webcam), it returns the following error.

[ WARN:1@2.601] global cap_msmf.cpp:1759 CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147024809

My Code:

import cv2


cap = cv2.VideoCapture(2)

while True:

    
    ret, frame = cap.read()
    

    if ret:

        cv2.imshow('Input', frame)
    else:
        print("dsd")

    c = cv2.waitKey(1)
    if c == 27:
        break

When I install the older version of OpenCV-python: 4.5.5.62, it works fine, I think the issue is with the newer release.

Please take a consideration on it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.