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.
3044 Discussions

Error after calling MFXVideoENCODE_EncodeFrameAsync


I got an error when calling this function after some time (1 minute or 1h)

The error is "unkown".

See the screenshot. We use the official gstreamer encoders:


I have uploaded 2 tracer logs (packed in the 7z archive) and the media sdk analyzer.

Our setup is a little bit special, we have nothing connected to the intel GPU,

only our matrox graphic card is used.

Is it not allowed to use the intel encoder without a connected monitor?


This is also strange in the tracer logs: status=MFX_ERR_UNSUPPORTED

5264 2018-1-26 10:35:47:525 function: MFXInitEx(par.Implementation=MFX_IMPL_HARDWARE|MFX_IMPL_VIA_D3D9 par.Versin=000000003E8FDCD4, mfxSession *session=000000003064DC70) +
5264 2018-1-26 10:35:47:525     LoadLibrary: D:\app\Build\x64\Debug\libmfxsw64.dll
5264 2018-1-26 10:35:47:525     ver.Major=1
5264 2018-1-26 10:35:47:525     ver.Minor=1
5264 2018-1-26 10:35:47:525     ver.Version=65537
5264 2018-1-26 10:35:47:525     mfxSession session=0000000000000000
5264 2018-1-26 10:35:47:525     status=MFX_ERR_UNSUPPORTED
5264 2018-1-26 10:35:47:525 >> MFXInitEx called
5264 2018-1-26 10:35:47:525     par.Implementation=MFX_IMPL_HARDWARE|MFX_IMPL_VIA_D3D9
5264 2018-1-26 10:35:47:525     par.Version.Major=1
5264 2018-1-26 10:35:47:525     par.Version.Minor=1
5264 2018-1-26 10:35:47:525     par.Version.Version=65537
5264 2018-1-26 10:35:47:525     par.ExternalThreads=0
5264 2018-1-26 10:35:47:525     par.NumExtParam=0
5264 2018-1-26 10:35:47:525     par.ExtParam=0000000000000000
5264 2018-1-26 10:35:47:525     par.reserved2[]={ 0, 0, 0, 0, 0 }
5264 2018-1-26 10:35:47:525     par.GPUCopy=0
5264 2018-1-26 10:35:47:525     par.reserved[]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

5264 2018-1-26 10:35:47:526     mfxSession session=0000000000000000
5264 2018-1-26 10:35:47:526 function: MFXInitEx(0.306141 msec, status=MFX_ERR_UNSUPPORTED) -

I hope all this information helps you to find the error here. Thank you for your time.

0 Kudos
8 Replies

Hi Zack,

It looks like you have the Intel GPU and third party graphic card in the platform. 

As my understanding, this combination is very hard to configure and we don't recommend it.

From your log, I can see it loads the software library "libmfxsw64.dll" although it says initialized with "MFX_IMPL_HARDWARE". All the information shows it is an initialization issue, but from your first comment, you said the error shows between one minute and one hour, so I am not sure if the MSDK is used from the beginning or G-Streamer switched to MSDK after running for a while.

So I have following suggestions:

1. Try a system with only Intel GPU to see if the problem still happens. This might clarify the 2 GPU confusion issue.

2. Make sure this is an initialization issue or a runtime issue.

3. You might look at the following article and try different g-streamer plugin from Intel:


0 Kudos

It seems the Intel graphics card is not the primary graphics card.

If your OS is Windows 8 or Windows 10, please try MFX_IMPL_VIA_D3D11 to do the initialization. 

If the OS is Windows 7 or earlier, I'm afraid there is no good way to resolve.

0 Kudos



Connecting the intel GPU with a monitor solves the problem.

However, for other reason (latency => time to capture and displaying the image on the monitor) we need to use

this config. Matrox is the display monitor and intel GPU is not connected to a monitor.

As my understanding, this combination is very hard to configure and we don't recommend it

In my understanding this is the most common used configuration. At least for gamers.


Don't know what you mean with that sentence. The issue happens randomly at runtime from 1 minute to 2 hours.


We are using Windows only.


I see also call in the logfile where the "ibmfxhw64.dll" is loaded.

 loaded Path : C:\Program Files\Intel\Media SDK\libmfxhw64.dll
496 2018-1-26 10:34:16:472     Library type is MFX_LIB_HARDWARE

So what now?


I tried to initialize it with MFX_IMPL_VIA_D3D11 but didn't changed anything.

sts = intelEncoder->m_mfxSessions->m_mfxEncSession.Init(intelEncoder->m_impl | MFX_IMPL_VIA_D3D11, &ver);

PS: We are using Win10


0 Kudos


Last time I worked on SKL platform with dual graphic cards, the parameter "initParam.GPUCopy" caused the application unstable.

You may set initParam.GPUCopy = MFX_GPUCOPY_OFF explicitly in MFXInitEx() and have a try. I have no idea whether it is related to your problem but hope it can help you!

And maybe you can start from the sample_encode project to do the test. It is simple and well tested.


0 Kudos

Hi Zach,

Since this is not the recommended way, the solution should base on everyone's experience. But in general, use DX11 engine and make sure no DX9 is enabled should be checked.

From the dev guide, page 116

Until 2013, supporting hardware acceleration in a multi-gpu environment was bound by a fundamental constraint - the Intel Graphics adapter needed to have a monitor associated with the device to be active. This constraint was due to the capabilities of the Microsoft DirectX 9 infrastructure that the Intel Media SDK, and associated graphics driver were based upon. The introduction and corresponding support of the DirectX 11 in both the Intel Media SDK and graphics driver has now simplified the process of developing applications to utilize Intel’s fixed function hardware acceleration, even when the Intel graphics device is not connected to an external display device.


0 Kudos


This seems to fix the BUG. We rean several encoding sessions. What does GPUCOPY_OFF mean?

What is the disadvantage?

0 Kudos

According to the MSDK manual, it means to "Enables or disables GPU accelerated copying between video and system memory in the SDK components". 

When turning ON, it can improve the performance in theory.

0 Kudos

@Zack S.

GPU Copy is designed to improve performance when transcoding workload is heterogeneous(using cpu and GPU), so using system memory between Media SDK components and Application. It utilize GPU for performing system<->video memory data copy which is faster then usual path with locking video memory and coping data using CPU.

1. This improves performance dramatically in single session transcoding, but in multi-session it can bring some performance downgrade as GPU copy can compete for GPU resources with encoding.

2. As Liang mentioned there were some issues for this feature recently, but should be fixed in latest drivers(not sure if they were released in public already), so try if disabling resolves you problem and test for performance if it won't bring significant impact for your product.

0 Kudos