[Libav-user] How to achieve 30 FPS using APIs on Android?

Alex Cohn alexcohn at netvision.net.il
Thu Sep 22 00:35:23 EEST 2016


On Tue, Sep 20, 2016 at 1:54 PM, Amber Beriwal <amber.beriwal at newgen.co.in>
wrote:

> Hi,
>
>
>
> Decode Only. We are not generating PNG. These are the timings of obtaining
> YUV data from frame.
>
>
>
> Regards
>
> *Amber Beriwal*
>
> Newgen Software Technologies Ltd.
>

You cannot achieve 30 FPS for 720p video in software on the specified
platform. Luckily, most Android devices have hardware decoders that can
easily handle hi-rez video, but they are not very flexible.

The bottleneck is usually the encoder, and fine-tuning its communication
with Android camera, see e.g. http://stackoverflow.com/a/19923966/192373.

I did some experiments with sliced multithreading for x264, and (with the
fastest profile) I could produce 25 FPS for 720p on similar hardware with
software encoder, using 2 cores (with NEON optimizations enabled). But not
30 FPS. And this was a severe stress for the battery.

Once you have a sliced video stream (or file), you can decode it on two
cores, and your own benchmark suggests that the goal is reachable: 60
ms/frame / 2 threads => ~30 fps!

BR,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160922/8f90cb78/attachment.html>


More information about the Libav-user mailing list