Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.

OpenCV (4.1.2-openvino) Unsupported Extension Error - Solved

Chetan_V_Intel
Employee
38,476 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
37,837 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
Maksim_S_Intel
Employee
37,585 Views

This is internal error message, it can be ignored. To suppress it you can set videoio backend explicitly: VideoWriter(filename, cv2.CAP_OPENCV_MJPEG, ...).

chew__minjian
Beginner
37,586 Views

Hi, I am having the same error, but the output video is not generated. Please help, thx.

 

chew.

chew__minjian
Beginner
37,582 Views

Hi, I have realised my mistake and solved it. Thank you.

Chew.

中国
Beginner
14,134 Views

您好,我遇到了同样的问题。你是怎么解决的

Luis_at_Intel
Moderator
37,584 Views

Hi chew, minjian,

Glad you were able to resolve the issue. I'd be great to know what the problem was and how you managed to resolve it, so other community members can benefit from it in case they run into something similar. Thanks for using OpenVINO!

Regards,

Luis

Arkhipov__Vitaly
Beginner
37,584 Views

Looks like I have the same issue: " MFX: Unsupported extension: http://<ip_address>"

Please what setting I have to make if I use python code :

net = cv2.dnn.readNetFromCaffe(prototxt, model) # specify the target device as the Myriad processor on the NCS if DNN_TARGET_MYRIAD: net.setPreferableTarget(cv2.dnn.DNN_TARGET_MYRIAD)

_frame = cv2.resize(frame, (DIMENSION_X, DIMENSION_Y))

blob = cv2.dnn.blobFromImage(_frame, 0.007843, (DIMENSION_X, DIMENSION_Y), (127.5,127.5,127.5), True)

detections = net.forward()

I use cv2.version = '4.2.0-openvino'

Segura__Jaime
Beginner
37,584 Views

I have a similar problem... but... my code actually works perfect on python. 

The problem is reported only on the EXE (one standalone file) created with pyinstaller for distribution.

The segment of my code is:     ( / is used because I have pathlib paths)

 

fourcc = cv2.VideoWriter_fourcc(*'XVID')

frame = cv2.imread(str(exampath / (images_foto[0])))
height, width, layers = frame.shape

a=input('Pause... before the error')
video = cv2.VideoWriter('D:/pruebaOTRO.avi', fourcc, 24, (width,height))
a=input('Pause... after the error')

for image in images_foto:
    video.write(cv2.imread(str(exampath / image)))

 

and the problem reported between "pauses" is:

[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): D:/pruebaOTRO.avi in function 'cv::icvExtractPattern'

 

I don't understand where or WHY is the problem

 

Jain__Nikhil
Beginner
37,584 Views

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)

I AM USING  CPP EXECUTABLE FILE

 

NMaajid_K_Intel
Employee
37,586 Views

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

 

Lin__Moda
Beginner
37,586 Views

Hi Nikhil & Maajid,

This is a problem with the Ver 2020.2.
It is normal to change to the Ver 2020.1.

This problem has troubled me for a while......

ryanyousong
Beginner
37,586 Views

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

please help

thankyou

Tchouanga__Franck
37,586 Views

please 

Lin, Moda

  you solved the mfx extension problem just by changing version

Max_L_Intel
Moderator
37,838 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

Tchouanga__Franck
37,586 Views

please how do we undergo the first step

Max_L_Intel
Moderator
37,586 Views

Hi Franck.

You can use just one of these 3 workarounds suggested. This is needed if you experience this "MFX: Unsupported extension" error in Windows OpenVINO 2020.2 and 2020.3 versions.

For the first one, as mentioned, there is a downloader script ffmpeg-download.ps1 in the directory <OPENVINO_DIR>\opencv\ 
Right click on this script, and then "Run with PowerShell".

BKKUEH
Novice
34,886 Views

I was trying to run "interactive_face_detection_demo.exe" in Win10 using ToolKit2020r4 with an IP camera via rtsp url.

Encounter error "OpenCV(4.4.0-openvino) C:\jenkins\workspace\OpenCV\OpenVINO\2020.4\build\windows\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file)"

 

Resolved by executing "ffmpeg-download.ps1" in the directory <OPENVINO_DIR>\opencv\ on PowerShell

(Do need to ensure that the script is run with administrator rights and enable remotesigned policy prior to executing "ffmpeg-download.ps1")

 

la__xl
Beginner
37,586 Views

Same issue here, I have followed  Max L. (Intel)'s advice to installed FFmpeg, when I try to create an avi file of fourcc MJPG, it will complain unsupported Fourcc

 

MFX: Unsupported FourCC: MJPG (0x47504a4d)
2544-Thread-4 2020-06-19 23:09:27,232 videoRecord.py:84 prepareWriter DEBUG - create a new file: mov/idle-2020-06-19-23-09-25.avi
2544-Thread-4 2020-06-19 23:09:37,278 videoRecord.py:76 prepareWriter DEBUG - close avi file

then I changed to XVID / mp4, still complaints here

MFX: Unsupported FourCC: XVID (0x44495658)
6336-Thread-4 2020-06-19 23:12:07,695 videoRecord.py:84 prepareWriter DEBUG - create a new file: mov/idle-2020-06-19-23-12-05.mp4
6336-Thread-4 2020-06-19 23:12:17,754 videoRecord.py:76 prepareWriter DEBUG - close avi file

 

Max_L_Intel
Moderator
37,586 Views

la, xl wrote:

Same issue here, I have followed  Max L. (Intel)'s advice to installed FFmpeg, when I try to create an avi file of fourcc MJPG, it will complain unsupported Fourcc

 

MFX: Unsupported FourCC: MJPG (0x47504a4d)
2544-Thread-4 2020-06-19 23:09:27,232 videoRecord.py:84 prepareWriter DEBUG - create a new file: mov/idle-2020-06-19-23-09-25.avi
2544-Thread-4 2020-06-19 23:09:37,278 videoRecord.py:76 prepareWriter DEBUG - close avi file

then I changed to XVID / mp4, still complaints here

MFX: Unsupported FourCC: XVID (0x44495658)
6336-Thread-4 2020-06-19 23:12:07,695 videoRecord.py:84 prepareWriter DEBUG - create a new file: mov/idle-2020-06-19-23-12-05.mp4
6336-Thread-4 2020-06-19 23:12:17,754 videoRecord.py:76 prepareWriter DEBUG - close avi file

 

Hi la, xl

The following formats are only supported: AVC (X264, H264, AVC), HEVC (H265, HEVC), MPEG2. If you use different format, you'll see this error message.

Thanks.

la__xl
Beginner
35,682 Views

hi Max_l,

  I have create cv2.VideoWriter using VideoWriter_fourcc to indicate Encoder format,

 I could not found AVC/HEVC/MPEG2 in here FOURCC 

ffmpeg output,

  libavutil      56. 54.100 / 56. 54.100
  libavcodec     58. 92.100 / 58. 92.100
  libavformat    58. 46.101 / 58. 46.101
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter     7. 86.100 /  7. 86.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_amf h264_mf h264_nvenc h264_qsv nvenc nvenc_h264 )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_qsv hevc_cuvid ) (encoders: libx265 nvenc_hevc hevc_amf hevc_mf hevc_nvenc hevc_qsv )
 DEVIL. mjpeg                Motion JPEG (decoders: mjpeg mjpeg_cuvid mjpeg_qsv ) (encoders: mjpeg mjpeg_qsv )
 DEV.L. mpeg2video           MPEG-2 video (decoders: mpeg2video mpegvideo mpeg2_qsv mpeg2_cuvid ) (encoders: mpeg2video mpeg2_qsv )
 D.V.L. vc1                  SMPTE VC-1 (decoders: vc1 vc1_qsv vc1_cuvid )
 DEV.L. vp8                  On2 VP8 (decoders: vp8 libvpx vp8_cuvid vp8_qsv ) (encoders: libvpx )
 DEV.L. vp9                  Google VP9 (decoders: vp9 libvpx-vp9 vp9_cuvid vp9_qsv ) (encoders: libvpx-vp9 vp9_qsv )

 

astrid24
Novice
33,761 Views

Hi,

I am facing the same error. Output video file is not generated. I'm using OpenVINO 2020.4

I executed the downloader script ffmpeg-download.ps1 on PowerShell. But, still facing the same error.

Can you let me know if you were able to resolve this issue. Thank you.

Reply