Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

How to fix MFXVideoENCODE_Init returns error MFX_ERR_INVALID_VIDEO_PARAM


I am using the FFMpeg 2.8 implementation of the Quick Sync Encoder that I am calling from the OpenCV 3.0.0 dll.

Their code does not work as is. After modifying the OpenCV code to specify a codec format of AV_PIX_FMT_NV12, it goes all the way to the initialization, but  MFXVideoENCODE_Init returns error MFX_ERR_INVALID_VIDEO_PARAM.

I am attaching the log file created by the SDK Tracer utility. Could someone be kind enough to go through it and let me know which parameter is wrong? Thank you so much in advance for your help.



0 Kudos
5 Replies

Hi Christophe,

Quick Sync usage through FFMPEG is not officially supported. Can you provide more information about your application? And the output from mediasdk_system_analyzer under InstallDirectory/Software Development Kit/tools/mediasdk_sys_analyzer? What specific features are you using from Quick Sync? If possible, can you run MediaSDK alone to separate the issue? I noticed that you are using old MediaSDK, you may update to the latest version inside Intel Software Manager. Thank you!

0 Kudos

That's weird. FFMPEG 2.8.0 claims they officially support.

- Intel QSV-accelerated MPEG-2 video and HEVC encoding
- Intel QSV-accelerated MPEG-2 video and HEVC decoding
- Intel QSV-accelerated VC-1 video decoding

> Can you provide more information about your application?

I am trying to use the OpenCV implementation that calls FFMPEG from my application. To that effect, I am building the opencv_ffmpeg.dll using the instructions located in that folder: opencv\sources\3rdparty\ffmpeg

I wanted to leverage the hardware encoding/decoding of H264 streams.

Here is the output of mediasdk_system_analyser:

Intel Media SDK System Analyzer (32 bit)

The following versions of Media SDK API are supported by platform/driver:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X
        1.1     SW      Yes             X       X
        1.3     HW      Yes             X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X
        1.4     SW      Yes             X       X
        1.5     HW      Yes             X
        1.5     SW      Yes             X       X
        1.6     HW      Yes             X
        1.6     SW      Yes             X       X
        1.7     HW      Yes             X
        1.7     SW      Yes             X       X
        1.8     HW      Yes             X
        1.8     SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) Atom(TM) Processor E3800 Series/Intel(R) Celeron(R) Processor N
2920/J190037.15.0.1073        Active

System info:
        CPU:    Intel(R) Celeron(R) CPU  J1900  @ 1.99GHz
        OS:     Microsoft Windows 7 Enterprise
        Arch:   64-bit

Installed Media SDK packages (be patient...processing takes some time):
        Intel« INDE Media SDK for Windows

Installed Media SDK DirectShow filters:

Installed Intel Media Foundation Transforms:
  Intel« Hardware M-JPEG Decoder MFT : {00C69F81-0524-48C0-A353-4DD9D54F9A6E}
  Intel« Hardware VC-1 Decoder MFT : {059A5BAE-5D7A-4C5E-8F7A-BFD57D1D6AAA}
  Intel« Hardware H.264 Decoder MFT : {45E5CE07-5AC7-4509-94E9-62DB27CF8F96}
  Intel« Hardware MPEG-2 Decoder MFT : {CD5BA7FF-9071-40E9-A462-8DC5152B1776}
  Intel« Quick Sync Video H.264 Encoder MFT : {4BE8D3C0-0515-4A37-AD55-E4BAE19AF
  Intel« Hardware Preprocessing MFT : {EE69B504-1CBF-4EA6-8137-BB10F806B014}


Analysis complete... [press ENTER]

I was also surprised that my hardware only supports Hardware decoding but not encoding.

Yes, I will try some of the MediaSDK examples to see if get the same error and will also update to the latest version of Intel INDE.



0 Kudos

You haven't really answered how I could figure out which of the parameters were incompatible.

0 Kudos

Hi Christophe,

What I meant of "not officially supported" is that there could be third party issues when calling Quick Sync. If you could reproduce the issue using our samples, we will definitely look into that. As for your system, looks like the driver doesn't support hardware encode. If possible, can you update to the latest driver, and run one of our samples to see if you can reproduce the issue? Right now it is hard to isolate which parameters are incompatible, it could be the driver for example. So please update to the latest MediaSDK and let us know your findings. Thanks.

0 Kudos

Hi Christophe,

You can try and update to the latest driver for your system here Please let us know how it works. Thanks!

0 Kudos