Hello everyone
I have a simple python script that is supposed to take a single image with cameras with the hardware IDs that I specify (e.g. 0,1,2,3). It works with my laptop’s integrated webcam as well as an emulated camera (being a smartphone pretending to be a camera through DroidCam). However, upon plugging in the actual camera I want to use, a HP 965 4K USB webcam, the script throws this error for the camera at ID 1 (suspected to be the HP, as unplugging this fixes the issue):
[ WARN:0@3.723] global cap_msmf.cpp:476 anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): OnReadSample() is called with error status: -2147024865
[ WARN:0@3.733] global cap_msmf.cpp:488 anonymous-namespace'::SourceReaderCB::OnReadSample videoio(MSMF): async ReadSample() call is failed with error status: -2147024865
[ WARN:1@3.741] global cap_msmf.cpp:1769 CvCapture_MSMF::grabFrame videoio(MSMF): can’t grab frame. Error: -2147024865
ChatGPT suggests to change the backend to DSHOW with a suggestion how (I am a novice), however this did not help.
Furthermore, I have a script that finds IDs of connected and working cameras, which crashes when I run it with the HP connected. The HP also then disappears from device manager after addressing it with OpenCV.
Finally the webcam works fine in the Windows 11 camera app and shows a good image.
Hopefully someone knows what I may be missing here.
BR