Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

MFXEncodeFrameAsync fails with MFX_ERR_GPU_HANG



Currently I'm working for an application, where it does both decoding as well as encoding. Decoding is working fine.

In Encoding, after intialization, querySurfaces and encoderInit is done.

I'm trying to call "MFXVideoENCODE_EncodeFrameAsync" to encode each frame.

For for the first time, I observed the SyncPoint holds appropriate value which acts as an out-parameter for "EncodeFrameAsync" API.

After that in-order to Synchronize called ("MFXVideoCORE_SyncOperation API), to wait until encoded frame is ready, where I observed the status as "MFX_ERR_GPU_HANG(-21)" .

For the sub-sequent frames I observed the status as "MFX_ERR_GPU_HANG(-21)" from "EncodeFrameAsync" API. So I'm unable to perform sync operation.

Please help me to resolve this issue.

Details :

CodecType : MPEG2

Enviroment : Linux

Media SDK version : 1.28


0 Kudos
1 Reply

Hi Charan,

Apologized for late response. Is this issue still persist?

For error like CPU HANG, once it happens, it can't be resolved by the follow up operations.

I can't see your whole sequence so I have not clue what happened. To solve the problem quickly, I suggest you to reproduce this issue with our sample code, these sample can be found in release package and also in the following online repo.

You can have a quick look at the sample document to learn details:

Let me know if this helps.