Intel-Media-SDK / MediaSDK

The Intel® Media SDK
MIT License
935 stars 460 forks source link

MFX_ERR_UNSUPPORTED when validating video encode parameters #2368

Closed paniksystem closed 4 years ago

paniksystem commented 4 years ago

Hi,

I compiled the simple_encode_vmem_lowlat tutorial (6) on Ubuntu 20.04 with a G4400 and i get MFX_ERR_UNSUPPORTED on

mfxENC.Query(&mfxEncParams, &mfxEncParams);

Result:

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
 Unsupported feature/library load error. /home/dev/Desktop/intel_repro/simple_encode_vmem_lowlat.cpp 154

vainfo:

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD

cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 94
model name  : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping    : 3
microcode   : 0xdc
cpu MHz     : 800.009
cache size  : 3072 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 6599.98
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 94
model name  : Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
stepping    : 3
microcode   : 0xdc
cpu MHz     : 800.010
cache size  : 3072 KB
physical id : 0
siblings    : 2
core id     : 1
cpu cores   : 2
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 6599.98
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:
AntonGrishin commented 4 years ago
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSliceLP

Based on this your configuration doesn`t support VME. I guess that you installed media stack with apt. On ubuntu by default "free" version of the driver is installed which has a limited number of available features.

You can try to install the full feature driver:

sudo apt-get install intel-media-va-driver-non-free

Both drivers are available under the same license. The difference between them is that the "non-free" one contains closed source EU binary shaders.

Additional information about intel media stack on ubuntu can be found here.

paniksystem commented 4 years ago

Thank you.

chinmaybhale commented 1 year ago

This is also happening to me, followed the instructions on msdk ubuntu installation

some info about my system: Ubuntu 22.04, kernel: 5.15.0-56-generic

Here is my vainfo

Screenshot 2022-12-17 at 4 51 02 PM

cpu info:

Screenshot 2022-12-17 at 4 51 47 PM

the error:

Screenshot 2022-12-17 at 4 52 32 PM

ffmpeg error for recipe: sudo ffmpeg -loglevel debug -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -pix_fmt yuv420p -s:v 176x144 -i AUD_MW.yuv -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -frames:v 10 -y ./AUD_MW_E.h264

Screenshot 2022-12-17 at 4 55 26 PM

I did have the non-free drivers already installed because of the link I referenced above, so I know its not that.

I am more than happy to give any other information that you find necessary! Thank you.