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!
FFmpeg uses Video Codec SDKFFmpeg supports following functionality accelerated by video hardware on NVIDIA GPUs: Hardware-accelerated encoding of H. 264 and HEVC* Hardware-accelerated decoding of H.
The two video codecs are the lossless FFV1, and the lossless and lossy Snow codec.
You can select the codecs needed by using the -c flag. This will make a Matroska container with a VP9 video stream and a Vorbis audio stream, essentially the same as the WebM we made earlier. The command ffmpeg -codecs will print every codec FFmpeg knows about.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With