[FFmpeg-devel] mediacodec and qsv not really hwaccels ?

Andrew Randrianasulu randrianasulu at gmail.com
Tue Sep 24 00:53:43 EEST 2024


I tried to trivially add qsv/mediacodec decode to cinelerra-gg, but
discovered that I can't use it like vaapi/vdpau/cuda because (?)
qsv/mediacodec not listed in

ffmpeg/libavcodec/hwconfig.h
and (for h264) in
ffmpeg/libavcodec/h264dec.c

so on decoding I get (in termux, cingg compiled with system ffmpeg)


Decoder h264 does not support device type mediacodec.

HW device init failed, using SW decode.
file:/data/data/com.termux/files/home/20210419_055507A.mp4
err: Operation not permitted

yet ffmpeg -hwaccel show

~/cinelerra/cinelerra-5.1 $ ffmpeg -hwaccels

 ffmpeg version 6.1.2 Copyright (c) 2000-2024 the FFmpeg developers

built with Android (12027248, +pgo, +bolt, +lto, +mlgo, based on r522817)
clang version 18.0.1 (
https://android.googlesource.com/toolchain/llvm-project
d8003a456d14a3deb8054cdaa529ffbf02d9b262)     configuration: --arch=aarch64
--as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang
--cxx=aarch64-linux-android-clang++ --nm=llvm-nm
--pkg-config=/home/builder/.termux-build/_cache/android-r27-api-24-v1/bin/pkg-config
--strip=llvm-strip --cross-prefix=aarch64-linux-android- --disable-indevs
--disable-outdevs --enable-indev=lavfi --disable-static --disable-symver
--enable-cross-compile --enable-gnutls --enable-gpl --enable-version3
--enable-jni --enable-lcms2 --enable-libaom --enable-libass
--enable-libbluray --enable-libdav1d --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme
--enable-libharfbuzz --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenmpt --enable-libopus
--enable-librav1e --enable-libsoxr --enable-libsrt --enable-libssh
--enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab
--enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
--enable-libxvid --enable-libzimg --enable-mediacodec --enable-opencl
--enable-shared --prefix=/data/data/com.termux/files/usr
--target-os=android --extra-libs=-landroid-glob --disable-vulkan
--enable-neon --disable-libfdk-aac                   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

Hardware acceleration methods:
opencl
                mediacodec

===

is it oversight or some more fundamental limitation?


More information about the ffmpeg-devel mailing list