具有硬件编解码器支持的 FFMPEG
我在 Android 2.2 上使用 ffmpeg 构建了一个简单的媒体播放器。硬件是基于 1GHz 的 ARM Cortex-A8 处理器,512 MB RAM。我的性能很低,800x600 mp4 视频的帧率约为 15 FPS。我有几个关于如何提高性能的问题
如何使用目标设备上可用的硬件编解码器。如何配置 ffmpeg 以使用可用的硬件解码器? GPU 或图形驱动程序是否必须公开一些标准 API(例如 OpenMax IL)才能实现此目的?
构建 ffmpeg 时应启用哪些选项,以便针对我的目标硬件进行优化?像这样的东西:
--cpu=cortex=a8 --extra-cflags="-mfpu=neon" ...
我已经在网上浏览过,但找不到我正在寻找的答案。我希望有人能就此提出建议。
提前致谢!
I have built a simple media player using ffmpeg
on Android 2.2. Hardware is an arm cortex-a8 based 1GHz processor, 512 MB RAM. I am getting low performance, around 15 FPS for 800x600 mp4 video. I have a couple of questions on how I can improve the performance
How can I use the hardware codecs available on my target device. How can I configure ffmpeg to use the available hardware decoders? Does the GPU or graphics driver have to expose some standard API like OpenMax IL in order to this?
What are the options that should be enabled when building ffmpeg so that it can be optimized for my target hardware? Something like:
--cpu=cortex=a8 --extra-cflags="-mfpu=neon" ...
I have already looked around the net but I couldn't find the answers that I am looking for. I hope someone can advice me on this.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
libav/ffmpeg 中必须有适合您的硬件的特定代码。现在我可以看到对某些硬件解码器和具有公开 VPAPI 或 VDPAU(主要是 NVidia)API 的驱动程序的硬件的支持。
库存 libavcodec 驱动程序。如果您可以获得 libavcodec 的源补丁或公开受支持的解码加速 API 之一的驱动程序,则可以获得加速解码。
换句话说,您应该询问您的硬件提供商。
There must be specific code in libav/ffmpeg tailored to your hardware. Right now I can see support for some HW decoders and for hardware that have drivers that expose VPAPI or VDPAU (mostly NVidia) APIs.
Your hardware does not seem supported in a native way by the stock libavcodec drivers. You can get accelerated decoding if you can get hold of either source patches to libavcodec or drivers that expose one of the supported decoding acceleration APIs.
In other words, you should ask your HW provider.