Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Error capturing frame from some USB Web Cameras #102

Open
nightshade231 opened this issue Mar 15, 2025 · 1 comment
Open

[Bug] Error capturing frame from some USB Web Cameras #102

nightshade231 opened this issue Mar 15, 2025 · 1 comment

Comments

@nightshade231
Copy link

System information, first and foremost:
OS: Windows 11 Pro 23H2 build 22631.5039
Babble Version: 2.0.7
Web Camera: NexiGo N60 1080p30

Description of the error:
Using Direct means of capturing a web camera feed (or a camera feed in general) seems to always end with the following error
[ WARN:[email protected]] global cap_msmf.cpp:1769 CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638 [WARN] Capture source problem, assuming camera disconnected, waiting for reconnect

Tried many USB ports to no avail. However, if I route any video through OBS Virtual Cam, it works just fine. The web camera works well outside of Babble, eliminating it being a web camera issue.

@OPROSVOs
Copy link

I got the same issue and used a workaround.
Same Windows 11 Pro 23H2, same Babble version.
Camera: Vimicro HBV HD CAMERA (40x40mm ir camera from amazon)

Sometimes previewing the camera in something like Amcap helps and it connects after 1-15min but its random. But this time it didn't work. The camera works fine in other programs and i have a second usb camera that results in the same issue.
When its trying to connect, it cycles through various errors so maybe this helps finding the cause:
[ WARN:[email protected]] global cap_msmf.cpp:1769 CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638
[ WARN:[email protected]] global cap_msmf.cpp:476 'anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072873822
[ WARN:[email protected]] global cap_msmf.cpp:488 'anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072873822
[ WARN:[email protected]] global cap_msmf.cpp:476 'anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -1072875772
[ WARN:[email protected]] global cap_msmf.cpp:488 'anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -1072875772
And sometimes throws that the camera index is out of range before it throws the -2147483638 again:
[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range

I also noticed in USB Tree Viewer that the built in camera of the Valve Index is restarting every 5 seconds which might cause that "Camera index out of range". When testing the valve internal headset camera, it failed.
So i found https://www.reddit.com/r/ValveIndex/comments/ijqsqj/is_there_a_solution_for_the_index_camera_failure/
Where domenr1 suggested to turn off the Windows Enhanced Power Management for the port:

  • Launch SteamVR
  • Go to SteamVR Menu > Developer > Developer Settings
  • Scroll down until you see a button marked "Disable Power Management"
  • Click this, and then shut down SteamVR
  • Disconnect your headset, unplug it's power, (works without restart) reconnect your headset
  • Start SteamVR again and re-test the issue

After that i only got the message [WARN] Capture source 0 not found, retrying... once and it works.
I tried it a few times, unplugging it all and starting Babble and that seems to have fixed it.

So it might be related to the Windows Enhanced Power Management on the Index but its weird that only Babble seems to have issues. My guess is that the camera might need a small amount of time to wake up and deliver a frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants