15

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!

osgx
  • 90,338
  • 53
  • 357
  • 513
mctma
  • 193
  • 2
  • 6
  • What is the hardware? Exact model of media player itself and of chips used (a8 is the cpu core; it is needed to know what media cores/GPUs/accelerators there are on SoC or on mainboard) – osgx Aug 30 '11 at 01:18
  • The hardware uses ZiiLABS ZMS-08 Media processor which I believe has H.264, WMV, MPEG4, MPEG2, Adobe Flash, XVid, DivX... codec – mctma Aug 31 '11 at 02:46
  • 1
    Is standard Zii media player based on ffmpeg? The video decoding hardware seems to be very custom, and it is unlikely that ffmpeg supports this hw. – osgx Aug 31 '11 at 10:18
  • You give us the exact model of CPU/GPU/Video processing chip. But what model is the device itself? Is it pre-release or general availability? – osgx Aug 31 '11 at 10:22
  • it's actually a pre-release device built around the ZMS08 platform – mctma Sep 02 '11 at 05:40
  • @mctma - I actually have a similar question. Did you ever find the answer? If so, can you please share your notes? Here's my question http://stackoverflow.com/questions/7869907/hardware-accelerated-ffmpeg-on-android – U Avalos Oct 23 '11 at 23:17

1 Answers1

3

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.

gioele
  • 9,748
  • 5
  • 55
  • 80