Hardware accelerated FFmpeg on android?

廉价感情. 提交于 2019-11-29 12:20:06

问题


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.

回答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...




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/7869907/hardware-accelerated-ffmpeg-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!