[SKL][VDENC] FFMPEG AVC VDENC unsupported #1010
Comments
And Vaapi works on SKL environment: |
I suppose that vaapi implementation just silently skip low_power option. According to encoder support page https://github.com/intel/media-driver only E1 supported on SKL, which is VME-based encode. Low power introduced in APL and KBL. |
https://github.com/intel/media-driver/blob/master/README.md#supported-codecs D - decoding Thanks. |
That's most definitely a mismatch between driver's readme and driver's code: The reason why ffmpeg doesn't work is MFE. Looks like mediasdk miss a check for the Low Power encoding on the MFE Auto path used by ffmpeg. So, you can add -mfmode 0 to check that VDENC works fine (@fulinjie: could you, please, verify). The reason why KBL works fine is probably that MFE is not enable on this platform at all. @artem-shaporenko : can you, please, fix a conflict between MFE Auto and VDENC?
You can also use sample_encode to check whether AVC VDENC works (in this way you avoid MFE entirely):
|
Verified, AVC VDENC works on SKL when add -mfmode 0. |
Will add a fix till monday. |
Since MFE is just support for very limited HW platform(Skylake) and conflict with many other encoding parameters. So I believe would better expose the capability and limitation via MFXVideoENCODE_Query(). Unfortunately, currently MFXVideoENCODE_Query can't expose anything of MFE. @dvrogozh @artem-shaporenko , would you please consider this, instead of simply turn off MFE for some case just like ICQ. |
Fixes Intel-Media-SDK#1010 Signed-off-by: Artem Shaporenko artem.shaporenko@intel.com
Fixes #1010 Signed-off-by: Artem Shaporenko artem.shaporenko@intel.com
AVC VDENC failed on SKL, and same cmdline works on KBL.
CMD:
ffmpeg -report -v verbose -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v h264_qsv -low_power 1 -flags qscale -global_quality 20 -y out_lowpower.mp4
or
ffmpeg -hwaccel qsv -init_hw_device qsv=hw -filter_hw_device hw -v verbose -f rawvideo -video_size 1280x720 -pix_fmt yuv420p -i /root/media_streams//encoderbitstreams//stockholm_1280x720_604.yuv -an -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -low_power 1 -profile:v main -flags qscale -global_quality 20 -vframes 100 -y ./h264e_cqp_1280x720_gop30_refdist3_qp40.h264
Environment:
ffmpeg: 1046cba24be41c624489f40513aeaba7e52ca9ff
VDENC patch: https://patchwork.ffmpeg.org/patch/11217/
(apply will be reject because of the update in qsvenc.c, you can cope with the conflicts or reset ffmpeg version to b44a571dc4af929f19715c9faad47792a0812bf1 then apply the patch )
Media-driver: 43282360d2ff251f051cc2d751503715c7177300
MediaSDK: 5c1c312
Error message:
[h264_qsv @ 0x1561b80] Error initializing the encoder: unsupported (-3)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
The text was updated successfully, but these errors were encountered: