Closed uartie closed 6 years ago
thanks for reporting, will fix or backout the commit ASAP.
For the quick access, bad commit is 3e60104d3. And it is really strange. For example, it is missing the most basic check possible for the attributes: check for attrib.value == VA_ATTRIB_NOT_SUPPORTED.
Oddly, I tried this on both Fedora and Ubuntu and cannot reproduce on Ubuntu Xenial. But, on Fedora 26, Fedora 27 (driver doesn't compile on F28), Ubuntu Artful and Ubuntu Bionic all reproduce this. Xenial has GCC 5.4.0 whereas the others have GCC 7.x.
I think I met the same issue on this command line:
ffmpeg \
-y -hwaccel qsv -c:v h264_qsv -r 30 -i 1920x1080_file.264 -an -filter_complex \
"split=3[s1][s2][s3]; [s1]scale_qsv=960:540[o1]; [s2]scale_qsv=480:360[o2]; [s3]scale_qsv=480:360[o3]" \
-map [o1] -c:v h264_qsv -b:v 3200k -minrate 3200k -maxrate 3200k -f rawvideo /tmp/3200a.264 \
-map [o2] -c:v h264_qsv -b:v 1750k -minrate 1750k -maxrate 1750k -f rawvideo /tmp/1750a.264 \
-map [o3] -c:v h264_qsv -b:v 800k -minrate 800k -maxrate 800k -f rawvideo /tmp/800a.264
It errors out for me randomly as follows:
[Parsed_scale_qsv_1 @ 0x3346c00] Error opening the VPP for scaling
[Parsed_scale_qsv_1 @ 0x3346c00] Failed to configure output pad on Parsed_scale_qsv_1
Error reinitializing filters!
Failed to inject frame into filter network: Unknown error occurred
Error while processing the decoded data for stream #0:0
Conversion failed!
I have debugged the issue and it is due to the following code in mediasdk: https://github.com/Intel-Media-SDK/MediaSDK/blob/e01caa31f19bb9b3592b03bd5987c305cce98789/_studio/shared/src/mfx_vpp_vaapi.cpp#L260:
// Configuration
VAConfigAttrib va_attributes;
vaSts = vaGetConfigAttributes(m_vaDisplay, VAProfileNone, VAEntrypointVideoProc, &va_attributes, 1);
MFX_CHECK_WITH_ASSERT(VA_STATUS_SUCCESS == vaSts, MFX_ERR_DEVICE_FAILED);
vaSts = vaCreateConfig( m_vaDisplay,
VAProfileNone,
VAEntrypointVideoProc,
&va_attributes,
1,
&m_vaConfig);
MFX_CHECK_WITH_ASSERT(VA_STATUS_SUCCESS == vaSts, MFX_ERR_DEVICE_FAILED);
That's a misuse of vaGetConfigAttributes. Mediasdk don't initialize attributes at all and gets random results in return. When it pass attributes to vaCreateConfif everything depends which random case was hit. If we hit absolutely unknown attribute we will error out, if we hit known attribute we may work (don't ask me how:)).
The fix is eventually the following: https://github.com/Intel-Media-SDK/MediaSDK/pull/237
@uartie : can you, please, try the fix in a meanwhile?
@dvrogozh Intel-Media-SDK/MediaSDK#237 fixes this. Thanks!
All ffmpeg qsv decode/encode operations fails since:
Reproduce Step:
Software Stack:
NOTE: all components compiled in release mode. It seems when msdk is compiled in debug mode, the issue disappears.
Pull-Request #172 does not fix this.