FFMpeg Android Stagefright SIGSEGV 错误(h264 解码)

发布于 2025-01-02 01:35:09 字数 2077 浏览 2 评论 0原文

我需要在 Android 2.3+ 上将 h264 文件解码为 YUV。据我了解,我需要与 Stagefright 进行通信,因为在使用 OpenMAX IL 实现关闭访问权限后,这是现在唯一的方法。我已经使用 FFmpeg 0.10(并尝试了 0.9/0.9.1..)来解决此问题,并使用 NDK7 进行编译(并尝试了 NDK6b,得到了相同的结果):

  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}...

硬件:Beagleboard-Xm + TI Android 2.3(官方)

因此,输入下一个命令会出现 480p 错误: ffmpeg -i /sdcard/视频/480p.mp4

已停止(信号)ffmpeg -i /sdcard/Video/480p.mp4

来自 ADB Logcat 的完整 Android“答案”: http://pastebin.com/76JLgtXX

Android开发人员,有谁知道这个错误意味着什么以及如何处理它? 我尝试将 DSP 窗口变大,但没有成功。 像“stagefright /sdcard/Video/480p.mp4”这样的命令工作正常。

PS 此外,我发现在一些更大的文件(720p)上,Android 的回答如下:

[libstagefright_h264 @ 0xd479b0]解码失败:80000000

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏辞 2025-01-09 01:35:10

您在 ffmpeg 配置标志中启用了 libstagefright-h264,但没有将其作为解码器启用,如下所示:

--enable-decoder=libstagefright_h264

You enabled libstagefright-h264 in your ffmpeg configure flags but didn't enable it as a decoder as such:

--enable-decoder=libstagefright_h264
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文