Error: CvCapture_MSFM::InitStream Failed to Set MediaType

Documentation

Error Messages

000056857

05/20/2022

What are you seeing?

[ WARN:0] global C:\jenkins\workspace\OpenCV\OpenVINO\2020.2\build\windows\opencv\modules\videoio\src\cap_msmf.cpp (681) CvCapture_MSFM::initStream Failed to set mediaType ( stream,0 (0x0) @1) MFVideoFormat_RGB32(unsupported media type)

Why are you seeing it?

This issue is present in 2020.2 release of OpenVINO™ toolkit and has been considered a bug. It is related to the MSMF backend not handling media files with audio streams.

How to fix it:

You can try one of these workarounds:

  1. Install FFmpeg as VideoCapture into the backend. On Windows* you will need to download the OpenCV community plugin. (Recommended)
    • Find the downloader package in the OpenVINO™ toolkit package: "C:\Program Files (x86)\IntelSWTools\openvino\opencv\ffmpeg-download.ps1".
    • Right click on script file and select Run with PowerShell.

  2. Use the hot fix available in upstream https://github.com/opencv/opencv/pull/17406

  3. Use media file without audio stream
Note

This applies to 2020.2 release of OpenVINO™ toolkit for Windows*.