Recently I asked about GPU acceleration in FFmpeg using AMD Radeon (AMD support for ffmpeg? Can't get my dedicated GPU to work). After many tests I see that fighting with this topic is hard, especially if I read something like that: Feature support varies – for more complex codecs with many different profiles, hardware decoders rarely implement all of them (for example, hardware decoders tend not to implement anything beyond YUV 4:2:0 at 8-bit depth for H.264) (https://trac.ffmpeg.org/wiki/HWAccelIntro).
But maybe I just started with wrong solution? Maybe OpenCL is what I need? So I'd like to ask if someone could help me with OpenCL. I installed it on my OS (Kubuntu 18.04.2 LTS) and confirmed it works. I used tips and examples found here: https://wiki.tiker.net/OpenCLHowTo
I also installed FFmpeg with OpenCL support from Snapcraft (https://snapcraft.io/ffmpeg):
ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609 configuration: --prefix= --prefix=/usr --disable-debug --disable-doc --disable-static --enable-avisynth --enable-cuda --enable-cuvid --enable-libdrm --enable-ffplay --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopus --enable-libpulse --enable-sdl2 --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-nonfree --enable-nvenc --enable-omx --enable-openal --enable-opencl --enable-runtime-cpudetect --enable-shared --enable-vaapi --enable-vdpau --enable-version3 --enable-xlib
I use FFmpeg mainly to convert images sequences to movies - thousands of images in 2K-4K resolution. I call it usually like this:
ffmpeg -framerate 30 -i frame-%05d.png -preset ultrafast -tune film -c:v h264 -c:v libx264 -b:v 20M -pix_fmt yuv420p output.mp4
My question is (quite) simple: how can I "translate" above to FFmpeg+OpenCL language? I'm using integrated Intel HD Graphics 4600 and external AMD Radeon HD 8790M. Nevermind which device will be used, I'd like to check if OpenCL will help me to reduce time of encoding.
Could someone help me?