[FFmpeg-user] ffmpeg with vulkan and or opencl

owen s owen94012 at gmail.com
Tue Jan 19 12:34:21 EET 2021


Hi Carl

I built ffmpeg from git:
https://gist.github.com/teamblubee/21937f6b606c6577f8c2a40da76d64e5

here's the output from ffmpeg:
ffmpeg version N-100671-gc48110a4a4 Copyright (c) 2000-2021 the FFmpeg
developers
  built with gcc 10 (Ubuntu 10.2.0-13ubuntu1)
  configuration: --prefix=/home/bb/Dev/ffmpeg_build/build
--extra-cflags='-I/home/bb/Dev/ffmpeg_build/build/include -I/usr/include'
--extra-ldflags='-L/home/bb/Dev/ffmpeg_build/build/lib
-L/home/bb/Dev/ffmpeg_build/build/lib/x86_64-linux-gnu
-Wl,-rpath=/home/bb/Dev/ffmpeg_build/build/lib/x86_64-linux-gnu -ldrm
-L/usr/lib' --pkg-config-flags=--static --extra-libs='-lpthread -lm'
--bindir=/home/bb/Dev/ffmpeg_build/bin --arch=amd64 --disable-shared
--disable-ffprobe --disable-ffplay --disable-gnutls --enable-openssl
--enable-zlib --enable-librtmp --enable-static --enable-chromaprint
--enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx
--enable-libx264 --enable-libx265 --enable-nonfree --enable-vdpau
--enable-ladspa --enable-libaom --enable-libbs2b --enable-libcaca
--enable-libcodec2 --enable-libdav1d --enable-libfontconfig
--enable-libfribidi --enable-libgme --enable-libopenjpeg --enable-librsvg
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh
--enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libwebp
--enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi
--enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl
--enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm
--enable-libiec61883 --enable-libass --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-librabbitmq
--enable-libvorbis --enable-libvpx --enable-libflite --enable-chromaprint
--enable-frei0r
  libavutil      56. 63.101 / 56. 63.101
  libavcodec     58.117.101 / 58.117.101
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 96.100 /  7. 96.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'


ffmpeg-git -hide_banner -hwaccels
Hardware acceleration methods:
vdpau
vaapi
drm
opencl

trying to run this command
ffmpeg-git -y \
-loglevel debug \
-hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
-loop 1 -r 4.8 -i ./image.jpg \
-stream_loop -1 -i ./audio.mp3 \
-c:v h264_vaapi -pix_fmt vaapi_vld \
-b:a 128k -ar 44100 -ac 2 -acodec aac \
-r 30 -g 60  \
-f flv /dev/null

I get this error: http://0x0.st/-i1t.txt

How can I actually use any of these hardware accelerated options?

On Mon, Jan 18, 2021 at 5:34 AM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> Am Sa., 16. Jan. 2021 um 19:13 Uhr schrieb owen s <owen94012 at gmail.com>:
> >
> > I have installed opencl and vulkan drivers on linux: Linux
> > 5.8.0-7630-generic #32~1609193707~20.10~781bb80-Ubuntu SMP Tue Jan 5
> > 21:29:56 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
> >
> > I am using ffmpeg version:
> > ffmpeg version 4.3.1-4ubuntu1 Copyright (c) 2000-2020 the FFmpeg
> developers
> > built with gcc 10 (Ubuntu 10.2.0-9ubuntu2)
>
> Please test current FFmpeg git head before asking questions here.
>
> > I am running this ffmpeg command
> > ffmpeg -y -hwaccel any \
> > -loop 1 -framerate 30 -re \
> > -hwaccel dxva2 \
>
> I may misunderstand your question but there is no dxva2 on Linux.
>
> > -i ./1280x720.jpg \
> > -stream_loop -1 -re \
> > -i ./audio.mp3 \
> > -vcodec libx264 -pix_fmt yuv420p \
> > -b:v 2500k -maxrate 2500k -bufsize 10000k \
> > -preset slow -tune stillimage \
> > -b:a 128k -ar 44100 -ac 2 -acodec aac \
> > -af "dynaudnorm=f=150:g=15" \
> > -g 60 \
> > -f flv tmp.flv
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list