Hardware accelerated FFmpeg on android?
Asked Answered
C

3

14

I compiled an older version of FFmpeg for Android (if I recall correctly it was 0.6.X). FFmpeg decodes a video frame, scales it, then I'm using OpenGL to draw it on the screen. As far as I can tell, the problem is the decoding and scaling---they're not hardware accelerated.

My question is:

  1. Is the latest version of FFmpeg hardware accelerated for ARM (Android) processors?
  2. Am I going about this the wrong way? i.e., is there a better way of doing this? Where "this" is playing a h264 HD video as a video live wallpaper---the framerate needs to be high, so hardware acceleration is desirable whenever available.
Coinstantaneous answered 23/10, 2011 at 23:5 Comment(0)
F
1
  1. I think so , yes. see : http://ffmpeg.org/#pr9 . the major release that has the hardware accelerated decoding of h264 on Android is Harmony 0.9

  2. if you use a decoder that takes advantage of the hardware acceleration, when it's available, I don't see how you can do better...

Franckot answered 11/5, 2012 at 16:39 Comment(0)
S
0

What you need is ffmpeg compiled for ARM NEON. See: https://groups.google.com/forum/#!topic/android-ndk/mGF6t3uWZ4U

Setsukosett answered 27/1, 2012 at 19:43 Comment(2)
not quite. That allows ffmpeg to run on an ARM NEON (which I already did). But it does not enable hardware accelaration (different things). thanks for the replyCoinstantaneous
hold on. what do you mean by hardware acceleration for FFMPEG then? FFMPEG "hardware acceleration" doesn't make sense(if you don't mean NEON). or Did you mean hardware acceleration for OpenGL? I hope you are rendering your video using vertex buffer objects(VBO's) or shaders(to get hardware acceleration). I think your choke point is OpenGl rendering and not ffmpeg.Setsukosett
F
0

You could also try compiling ffmpeg with libstagefright_h264, I was able to get it to compile and read video file properties, but have been unable to get avcodec_open to work with it... That would be hardware accelerated assuming it was supported by the device.

Funke answered 3/7, 2012 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.