Ask Your Question
0

opencv-4.4.0\modules\videoio\src\cap_msmf.cpp (682) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)

asked 2020-09-09 11:56:24 -0600

grafy gravatar image

Hello,

I make an example program with opencv on my main computer (windows 10 x64) with opencv4.4.0, visual c++ 2019 and it work fine on the main computer. I have compiled sources files as explain on the opencv site.

When i try to run it on a windows 7 x64 computer after importing all the dll (core440, videoio, ....) , i got the error : ...opencv-4.4.0\modules\videoio\src\cap_msmf.cpp (682) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)

I am serarching all other the web for few hours now but found nothing helping me... Does someone here have a solution ?

Thanks !

edit retag flag offensive close merge delete

Comments

sturkmen gravatar imagesturkmen ( 2020-09-09 13:11:48 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-09-10 00:56:19 -0600

fa3d gravatar image

I have the same problem using opencv-python (tried version 4.4.0.42, and also version 3.4.11.41). When using the function cv2.VideoCapture(0) on a computer with windows 7 (32 bit), I get the same error:

\cap_msmf.cpp (682) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (640x480 @ 30) MFVideoFormat_RGB24(unsupported media type)

But if I run the script on a windows 10 machine (64 bit) it runs fine.

Could it be a problem related with windows 7?

edit flag offensive delete link more

Comments

you can try cv2.VideoCapture(0, cv2.CAP_DSHOW)

sturkmen gravatar imagesturkmen ( 2020-09-10 02:13:31 -0600 )edit

It worked! Thank you

fa3d gravatar imagefa3d ( 2020-09-10 02:46:43 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-09 11:54:48 -0600

Seen: 7,408 times

Last updated: Sep 09 '20