[FFmpeg-user] FFmpeg error when using "Mediacodec"

Mohammed Bey Ahmed Khernache mohbeyinfo at gmail.com
Wed Sep 5 13:07:36 EEST 2018


Hello,
I cross-compiled FFmpeg successfully for aarch64 ARM under Android OS. I
enabled "mediacodec" option to leverage the Hardware HEVC decoder available
in the board I am using (Snapdragon 810).
Here is the command line to configure the compilation:
------------------------------------------------------------------------------------------------------
./configure
--cross-prefix=/root/arm64-toolchains-r14b/bin/aarch64-linux-android-
--sysroot=/root/arm64-toolchains-r14b/sysroot/ --arch=aarch64
--target-os=android
--extra-cflags="-I/root/libomxil-bellagio-0.9.3/include"
 --enable-pthreads  --enable-gpl --disable-shared --enable-static
--enable-runtime-cpudetect  --enable-hwaccels   --enable-omx  --enable-jni
--enable-mediacodec  --enable-decoder=hevc_mediacodec
------------------------------------------------------------------------------------------------------

When I tried to decode a video sequence on Android, I got the following
error.
------------------------------------------------------------------------------------------------------
shell at msm8994:/data/ffmpeg_omx_mediacodec # ./ffmpeg -vcodec
hevc_mediacodec -i jellyfish-20-mbps-hd-hevc.mkv -f null out.null
ffmpeg version N-91720-g6b1b5af Copyright (c) 2000-2018 the FFmpeg
developers
  built with gcc 4.9.x (GCC) 20150123 (prerelease)
  configuration:
--cross-prefix=/root/arm64-toolchains-r14b/bin/aarch64-linux-android-
--sysroot=/root/arm64-toolchains-r14b/sysroot/ --arch=aarch64
--target-os=android  --enable-pthreads --enable-gpl --disable-shared
--enable-static --enable-hwaccels --enable-jni --enable-mediacodec
--enable-decoder=hevc_mediacodec
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 27.100 / 58. 27.100
  libavformat    58. 17.103 / 58. 17.103
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
Input #0, matroska,webm, from 'jellyfish-20-mbps-hd-hevc.mkv':
  Metadata:
    COMPATIBLE_BRANDS: iso4hvc1iso6
    MAJOR_BRAND     : iso4
    MINOR_VERSION   : 1
    ENCODER         : Lavf56.3.100
  Duration: 00:00:30.10, start: 0.067000, bitrate: 19880 kb/s
    Stream #0:0(und): Video: hevc (Main), yuv420p(tv), 1920x1080 [SAR 1:1
DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 29.97 tbc (default)
    Metadata:
      CREATION_TIME   : 2016-02-05 01:39:02
      LANGUAGE        : und
      HANDLER_NAME    : hevc at GPAC0.5.2-DEV-rev565-g71748d7-ab-suite
[amediaformat @ 0x7f8055e100] No Java virtual machine has been registered
[hevc_mediacodec @ 0x7f80585b00] Failed to create media format
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_mediacodec) -> wrapped_avframe (native))
Error while opening decoder for input stream #0:0 : Generic error in an
external library
------------------------------------------------------------------------------------------------------

Is there something wrong in the configure options?
Any little help is welcome.

Thank you in advance.


More information about the ffmpeg-user mailing list