Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

OpenCV (4.1.2-openvino) Unsupported Extension Error - Solved

Chetan_V_Intel
Employee
53,165 Views

Hi,

                      I am using OpenCV(4.1.2-openvino) , when I am trying to write video output I am getting below error. Although my output video is still getting generated. Below is cv2.VideoWriter statement and full error signature. Please let me know how to resolve this.

out_video=cv2.VideoWriter(out_video_name,cv2.VideoWriter_fourcc('M','J','P','G'), fps, (frame_width,frame_height))

Error signature :

 

MFX: Unsupported extension: .\test_images\test_video.avi
MFX: Unsupported FourCC: MJPG (0x47504a4d)
[ERROR:0] global C:\jenkins\workspace\OpenCV\OpenVINO\build\opencv\modules\videoio\src\cap.cpp (392) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.1.2-openvino) C:\jenkins\workspace\OpenCV\OpenVINO\build\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): .\test_images\kid_family_in_car_out.avi in function 'cv::icvExtractPattern'

 

Thanks

Chetan

0 Kudos
1 Solution
Max_L_Intel
Moderator
52,526 Views

Khan, N Maajid (Intel) wrote:

I am also getting the same error
MFX: Unsupported extension: Safety_Full_Hat_and_Vest.mp4
[ WARN:0] global C:\jenkins\workspace\OpenCV\OpenVINO\2020.2\build\windows\opencv\modules\videoio\src\cap_msmf.cpp (681) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (0x0 @ 1) MFVideoFormat_RGB32(unsupported media type)
To close the application, press 'CTRL+C' here or switch to the output window and press ESC key

 

Hello all.
This problem in OpenVINO 2020.2 release being considered as a bug. Problem is related to media files with audio streams and MSMF backend.
Meanwhile, you can use one of the following workarounds:
1. Install FFmpeg as VideoCapture backend (on Windows you need to download OpenCV community plugin. There's downloader script in the package: openvino\opencv\ffmpeg-download.ps1. Right click on it - Run with PowerShell).
2. Use hot fix available in upstream https://github.com/opencv/opencv/pull/17406
3. Use media file without audio stream

View solution in original post

21 Replies
BKKUEH
Novice
1,807 Views

Yes, that was how I got it resolved in my system (Win10 running Visual Studio 2019)

My suggestion to your problem with your environment is similar to mine:

1) Make sure your rtsp string / url for your camera is correct (Test it with VLC Media Player - streaming)

2) Run with Release build instead of Debug build. I noticed that application crashes with error very frequently in Debug mode (Don't know why) 

 

0 Kudos
Reply