First time here? Check out the FAQ!

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 Sep 9 '0

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 !

Preview: (hide)

Comments

1 answer

Sort by » oldest newest most voted
0

answered Sep 10 '0

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?

Preview: (hide)

Comments

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

sturkmen gravatar imagesturkmen (Sep 10 '0)edit

It worked! Thank you

fa3d gravatar imagefa3d (Sep 10 '0)edit

Question Tools

1 follower

Stats

Asked: Sep 9 '0

Seen: 7,762 times

Last updated: Sep 09 '20