[Libav-user] HW decoding on Android

Alex Cohn alexcohn at netvision.net.il
Fri Oct 11 08:42:36 CEST 2013


On Oct 11, 2013 12:40 AM, "sirvo" <sylviojalves at gmail.com> wrote:
>
> Hi.
>
> We develop an android player using ffmpeg lib. It plays .ts files but when
> it comes to 1080p files, it runs really slow (like 10~15 fps). The problem
> is that sws_scale() and avcodec_video_decoder2() takes to much time to get
> it done (> 30ms).
>
> Then, I've compiled ffmpeg with libstagefright_h264 support for android.
>
> It still plays .ts files and also in slow mode with 1080p.

Which device did you try? Older devices may have no hardware capable of
1080p,  main profile.

> How do I check if hw accel is being used?

The easiest check would be to look at the logcat for OMX related messages.

> I've tried changing the avcodec_find_decoder like bellow but not success:
>
> codec = avcodec_find_decoder(codecCtx->codec_id);
> OR
> codec = avcodec_find_decoder_by_name("h264");
> OR
> codec = avcodec_find_decoder_by_name("libstagefright_h264");
>
> Is it necessary to init() something or use that AVHWACCEL from ffmpeg?
>
> Thanks!
>
> Sylvio

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


More information about the Libav-user mailing list