I need to decode h264 file to YUV on Android 2.3+. As I understand I need to communicate with Stagefright, as it`s the only way now, after closing access with OpenMAX IL implementations. I have used FFmpeg 0.10 (and tried 0.9/0.9.1..) for this issue, compiled it with NDK7 (and also tried NDK6b with the same result):
ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 28 2012 14:42:37 with gcc 4.4.3
configuration: --target-os=linux --cross-prefix=arm-linux-androideabi- --arch=arm --cpu=armv7-a --sysroot=/home/grid/Android/Android_NDK/platforms/android-9/arch-arm --disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-libstagefright-h264 --prefix=build/stagefright/armeabi-v7a --extra-cflags='-Iandroid-source/frameworks/base/include -Iandroid-source/system/core/include -Iandroid-source/frameworks/base/media/libstagefright -Iandroid-source/frameworks/base/include/media/stagefright/openmax -I/home/grid/Android/Android_NDK/sources/cxx-stl/system/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon' --extra-ldflags='-Wl,--fix-cortex-a8 -Landroid-libs -Wl,-rpath-link,android-libs' --extra-cxxflags='-Wno-multichar -fno-exceptions -fno-rtti'
libavutil 51. 34.101 / 51. 34.101
libavcodec 53. 60.100 / 53. 60.100
libavformat 53. 31.100 / 53. 31.100
libavfilter 2. 60.100 / 2. 60.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Hardware: Beagleboard-Xm + TI Android 2.3 (official)
So, entering next command give me error with 480p: ffmpeg -i /sdcard/Video/480p.mp4
Stopped (signal) ffmpeg -i /sdcard/Video/480p.mp4
Full Android "answer" from ADB Logcat: http://pastebin.com/76JLgtXX
Android-developers, does anybody know what this error means and how to deal with it? I tried to make DSP window bigger, but with no luck. Commands like "stagefright /sdcard/Video/480p.mp4" works fine.
P.S. Additionally I found that on some bigger files (720p) Android answers next:
[libstagefright_h264 @ 0xd479b0] Decode failed: 80000000
You enabled libstagefright-h264 in your ffmpeg configure flags but didn't enable it as a decoder as such: