0

I'm running gentoo, and I have media-libs/oneVPL-intel-gpu installed, and latest mesa drivers, and intel gmm, however, qsv refuses to transcode and gives me the following error everytime

ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -i input.avi -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -maxrate 5M output.mp4
.
.
.
[AVHWDeviceContext @ 0x5634ca3e9b40] Error creating a MFX session: -9.
Device creation failed: -1313558101.
Failed to set value 'qsv=hw' for option 'init_hw_device': Unknown error occurred
Error parsing global options: Unknown error occurred

The command I used was copied and pasted as is from ffmpeg hwaccel page. Vulkan also is sketchy, and works 50% of the time only. What do you think I should do to get full "gpu" hardware acceleration?

Edit:

$ ffmpeg -version
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 14 (Gentoo 14.1.1_p20240518 p1)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-6.1.1-r6/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --nm=x86_64-pc-linux-gnu-nm --strip=x86_64-pc-linux-gnu-strip --ranlib=x86_64-pc-linux-gnu-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-O2 -pipe -O3 -pipe -march=x86-64-v3 -mtune=skylake -ggdb3' --disable-static --disable-libaribcaption --enable-avfilter --disable-stripping --disable-optimizations --disable-libcelt --enable-version3 --disable-indev=oss --disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio --enable-version3 --enable-nonfree --enable-bzlib --enable-runtime-cpudetect --enable-debug --enable-gcrypt --enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv --enable-libxml2 --enable-lzma --enable-network --enable-opencl --disable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --enable-vaapi --disable-vdpau --enable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --enable-libpulse --enable-libdrm --disable-libjack --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac --enable-libopenjpeg --disable-libjxl --enable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24 --disable-libmodplug --enable-libopus --enable-libvpl --disable-libilbc --enable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --enable-librsvg --disable-ffnvcodec --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-appkit --enable-libbs2b --disable-chromaprint --disable-cuda-llvm --disable-libflite --disable-fontconfig --disable-frei0r --disable-libfribidi --disable-libglslang --enable-ladspa --enable-lcms2 --disable-libass --enable-libplacebo --disable-libtesseract --disable-lv2 --enable-librubberband --disable-libshaderc --enable-libfreetype --enable-libharfbuzz --disable-libvidstab --disable-libvmaf --disable-libzmq --enable-libzimg --disable-libsoxr --enable-pthreads --disable-amf --enable-libvo-amrwbenc --enable-libkvazaar --disable-libaom --enable-libmp3lame --disable-libopenh264 --enable-librav1e --disable-libsnappy --enable-libsvtav1 --enable-libtheora --disable-libtwolame --enable-libwebp--enable-libx264 --enable-libx265 --enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-dotprod --disable-i8mm --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --enable-pic --cpu=x86-64-v3 --disable-doc --disable-htmlpages --enable-manpages
libavutil      58. 29.100 / 58. 29.100
libavcodec     60. 31.102 / 60. 31.102
libavformat    60. 16.100 / 60. 16.100
libavdevice    60.  3.100 / 60.  3.100
libavfilter     9. 12.100 /  9. 12.100
libswscale      7.  5.100 /  7.  5.100
libswresample   4. 12.100 /  4. 12.100
libpostproc    57.  3.100 / 57.  3.100
$ cpuinfo
Python Version: 3.12.4.final.0 (64 bit)
Cpuinfo Version: 9.0.0
Vendor ID Raw: GenuineIntel
Hardware Raw:
Brand Raw: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Hz Advertised Friendly: 3.4000 GHz
Hz Actual Friendly: 3.4000 GHz
Hz Advertised: (3400000000, 0)
Hz Actual: (3400005000, 0)
Arch: X86_64
Bits: 64
Count: 8
Arch String Raw: x86_64
L1 Data Cache Size: 131072
L1 Instruction Cache Size: 131072
L2 Cache Size: 1048576
L2 Cache Line Size: 256
L2 Cache Associativity: 6
L3 Cache Size: 8388608
Stepping: 3
Model: 94
Family: 6
Processor Type:
Flags: 3dnowprefetch, abm, acpi, adx, aes, aperfmperf, apic, arat, arch_capabilities, arch_perfmon, art, avx, avx2, bmi1, bmi2, bts, clflush, clflushopt, cmov, constant_tsc, cpuid, cpuid_fault, cx16, cx8, de, ds_cpl, dtes64, dtherm, dts, epb, ept, ept_ad, erms, est, f16c, flexpriority, flush_l1d, fma, fpu, fsgsbase, fxsr, ht, hwp, hwp_act_window, hwp_epp, hwp_notify, ibpb, ibrs, intel_pt, invpcid, lahf_lm, lm, mca, mce, md_clear, mmx, monitor, movbe, mpx, msr, mtrr, nonstop_tsc, nopl, nx, osxsave, pae, pat, pbe, pcid, pclmulqdq, pdcm, pdpe1gb, pebs, pge, pln, pni, popcnt, pse, pse36, pti, pts, rdrand, rdrnd, rdseed, rdtscp, rep_good, sdbg, sep, sgx, smap, smep, smx, ss, ssbd, sse, sse2, sse4_1, sse4_2, ssse3, stibp, syscall, tm, tm2, tpr_shadow, tsc, tsc_adjust, tsc_deadline_timer, tscdeadline, vme, vmx, vnmi, vpid, x2apic, xgetbv1, xsave, xsavec, xsaveopt, xsaves, xtopology, xtpr
$ vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.4 ()
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
$ vpl-inspect -f
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0

Warning - no implementations found by MFXEnumImplementations()
$ emerge -s media-libs/oneVPL-intel-gpu

[ Results for search key : media-libs/oneVPL-intel-gpu ]
Searching...

*  media-libs/oneVPL-intel-gpu
Latest version available: 24.2.2
Latest version installed: 24.2.2
Size of files: 8,847 KiB
Homepage:      https://github.com/oneapi-src/oneVPL-intel-gpu
Description:   oneAPI Video Processing Library Intel GPU implementation
License:       MIT
3
  • Intel made a huge mess moving from MediaSDK to oneVPL and from vaapi driver to media-driver. It is always sketchy... I suggest you to post the FFmpeg version (and if it's a custom build), post the CPU model, and if you have multiple GPUs. Then install libva and libva-tools, execute vainfo, and post the output. Then build and install libvpl-tools, and execute vpl-inspect, and post the output.
    – Rotem
    Commented 12 hours ago
  • @Rotem what do you think the reason for no implementation found?
    – Deyaa
    Commented 9 hours ago
  • According to the following table and this table, CPUs before GEN 11 (like Core i7-6700) uses Media SDK backed. Try installing Media SDK. After installing MSDK, vpl-inspect shows different output.
    – Rotem
    Commented 48 mins ago

0

You must log in to answer this question.