#How to get ffmpeg to use av1 with vaapi

11 messages · Page 1 of 1 (latest)

solid stratus
#

I have an ARC 770 with intel-media-drivers installed:

> doas vainfo 
Trying display: wayland
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Trying display: x11
Authorization required, but no authorization protocol specified

error: can't connect to X server!
Trying display: drm
vainfo: VA-API version: 1.19 (libva 2.19.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.3.0 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileNone                   :    VAEntrypointStats
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSliceLP
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSliceLP
      VAProfileHEVCMain               :    VAEntrypointVLD
      VAProfileHEVCMain               :    VAEntrypointEncSliceLP
      VAProfileHEVCMain10             :    VAEntrypointVLD
      VAProfileHEVCMain10             :    VAEntrypointEncSliceLP
      VAProfileVP9Profile0            :    VAEntrypointVLD
      VAProfileVP9Profile0            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile1            :    VAEntrypointVLD
      VAProfileVP9Profile1            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile2            :    VAEntrypointVLD
      VAProfileVP9Profile2            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile3            :    VAEntrypointVLD
      VAProfileVP9Profile3            :    VAEntrypointEncSliceLP
      VAProfileHEVCMain12             :    VAEntrypointVLD
      VAProfileHEVCMain422_10         :    VAEntrypointVLD
      VAProfileHEVCMain422_10         :    VAEntrypointEncSliceLP
      VAProfileHEVCMain422_12         :    VAEntrypointVLD
      VAProfileHEVCMain444            :    VAEntrypointVLD
      VAProfileHEVCMain444            :    VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         :    VAEntrypointVLD
      VAProfileHEVCMain444_10         :    VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         :    VAEntrypointVLD
      VAProfileHEVCSccMain            :    VAEntrypointVLD
      VAProfileHEVCSccMain            :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          :    VAEntrypointVLD
      VAProfileHEVCSccMain10          :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         :    VAEntrypointVLD
      VAProfileHEVCSccMain444         :    VAEntrypointEncSliceLP
      VAProfileAV1Profile0            :    VAEntrypointVLD
      VAProfileAV1Profile0            :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444_10      :    VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :    VAEntrypointEncSliceLP

It reports encoding and decoding support for AV1.
However I can't get ffmpeg to use it for AV1 encoding.
I have tried:

ffmpeg -hwaccel auto -i input.mkv -c:v av1 output.webm

but it runs on the CPU.
I can get VP9 transcoding working on the GPU with this:

ffmpeg -hwaccel auto -i input.mkv -c:v vp9_vaapi -vf 'format=nv12,hwupload' output.webm

This is fast (~300FPS and shows up ~50% load in intel_gpu_top under Video).
I have tried searching for an av1_vaapi codec but AFAIT there is none.

fickle oak
solid stratus
#

ffmpeg version btw (current in arch repo):

ffmpeg -version
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.1.1 (GCC) 20230429
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100
fickle oak
#

What is the output of running vainfo as a regular user?

solid stratus
#

I know vaapi works since I can get vp9_vaapi to run on the GPU

solid stratus
fickle oak
solid stratus
#

Yeah I just found the code 😢

#

Thx ❤️

lost flumeBOT
#

This command can only be ran in a active ticket