Categories
ffmpeg GPU Graphics Card Multimedia Uncategorized

Building ffmpeg with libva support

…supporting AMD and Intel GPUs.

linux # sudo apt-get install build-essential yasm cmake libtool libc6 libc6-dev unzip wget nasm pkg-config libva-dev 
linux # git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/
linux # cd ffmpeg
linux # ./configure --enable-nonfree --disable-static --enable-shared
linux # make -j 8
linux # make install
linux # ldconfig
linux # cd -

If everything went fine, the output of ffmpeg should look something like this:

linux # ffmpeg -hide_banner -hwaccels | grep vaapi
vaapi
linux # ffmpeg -hide_banner -encoders | grep vaapi
 V....D av1_vaapi            AV1 (VAAPI) (codec av1)
 V....D h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V....D hevc_vaapi           H.265/HEVC (VAAPI) (codec hevc)
 V....D mjpeg_vaapi          MJPEG (VAAPI) (codec mjpeg)
 V....D mpeg2_vaapi          MPEG-2 (VAAPI) (codec mpeg2video)
 V....D vp8_vaapi            VP8 (VAAPI) (codec vp8)
 V....D vp9_vaapi            VP9 (VAAPI) (codec vp9)

Leave a Reply

Your email address will not be published. Required fields are marked *