Media (Intel® oneAPI 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
3030 Discussions

QuickSync encoding hangs or fails with MFX_ERR_DEVICE_FAILED using ffmpeg 3.1.0


First of all, my problem is very similar to the following post:

I'm trying to use the latest version of ffmpeg to encode video using the H264 Quick Sync encoder.  Although I am able to successfully encode my video some of the time, the ffmpeg hangs or fails during the avcodec_encode_video2 call.  When the function fails, it returns MFX_ERR_DEVICE_FAILED.

I have a Windows 10 64-bit computer with Version 3 (Haswell) of Quick Sync hardware.  This machine hangs whenever the Quick Sync encoding fails.

I have a Windows 7 64-bit computer with Version 5 (Skylake) of Quick Sync hardware.  This machine returns MFX_ERR_DEVICE FAILED whenever the Quick Sync encoding fails. The command line reads "EncodeFrameASync" returned -17".

I have compiled ffmpeg myself from here:

and I have tested using pre-built ffmpeg files for Windows found here:

The results were the same for 32-bit or 64-bit regardless of whether I built ffmpeg, or I used one of the prebuilt versions of ffmpeg.

I have a test application which encodes 1000 frames of size 256x256 to an AVI file using the Quick Sync encoder.  I posted my test application code online that I used to demonstrate the errors that I have been getting which can be found here:

Running my test on the Version 3 (Haswell) computer worked successfully on 8 of the 40 tests run.  When it failed, the hang would usually occur in the first 100 frames encoded.

Running my test on the Version 5 (Skylake) computer worked successfully on 31 of the 40 tests run.

I ran the Intel Media SDK system analysis on each system.  The Version 3 (Haswell) computer had software and hardware supported for Version 1.0 to Version 1.16.  The Version 5 (Skylake) computer had software and hardware supported for all versions (1.0 to 1.19).

Is there anything I can do to prevent the QuickSync encoding from failing?  Any assistance would be greatly appreciated.

0 Kudos
2 Replies

Hi Mike, 

Thank you for detailed description of the issue and attachments. I tested Quick sync encoder using our sample_encode ( application on the platforms (HSW/SKL) and did not observe the same. Hence, this could be issue at FFMPEG integration level and not quick sync encoder. ffmpeg is a open source and any issue in ffmpeg is handled by the community. I will delegate this issue internally to ffmpeg team. Ffmpeg has the own bug tracking like Please report this at above link and they should be able to help resolve this bug. 



0 Kudos

Hi guys,

I am experiencing the same issue as Mike with my Xeon E3 1585L v5 system under Windows 10 x64 with the latest public FFMPEG and Intel MSS 2017R1 community edition.

Any updates on your side?

0 Kudos