Android – hardware acceleration & MP4 first test

The very first version of Android hardware accelerated encoder utilizing MediaCodec is working. This is rough and not fit for release yet, but it proves the same simple concept implemented on iOS works on Android as well.

This ANE, though not guaranteed to work as fast as the iOS version at first, will be still a significant upgrade to the current software based Android ANE. Based on the initial test ($100 ASUS 4.3 tablet):

New ANE

  • 1024×768 video of AIR stage recorded
  • Stage set to 20fps, no visible lag observed

Old ANE

  • 400×300 video of AIR stage recorded
  • Observed stage speed when recording drops to ~2-3fps

Finally, the video being recorded is MP4. No H.264 / AAC license issues since we’re using the device encoders instead of software encoders. Which means, the video can be replayed right away.

Otherwise, the whole concept of the ANE is similar to iOS – fullscreen init, capturing AIR’s OpenGL content directly via captureFullscreen and internally sending it straight to video. FlashyWrappers is using advanced features of Android 4.3+, such as render to video from OpenGL surface to achieve this. Finally, here’s a short test video to celebrate the first Android fully accelerated test!

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *