Skip to main content
Inspiring
December 1, 2011
Answered

Android Video play via AIR application is jerky

  • December 1, 2011
  • 8 replies
  • 6906 views

Hi All,

  We are developing an AIR mobile application targetted for Android 2.2 or above. One of the requirement is to play H.264 videos on the mobile from the Assets folder (local file system). We have run in to a show stopper while trying to implement this feature, here are the details -

1. We are using OSMF that comes bundled with Flex Builder 4.6

2. Using Adobe AIR 3.1 and Flex SDK 4.6

When video of quality H.264 MPEG4 1280*720 30FPS with input bit rate 2000 is being played on the mobile device (android), the video frame rate is choppy however on the desktop it plays out fine... StageVideo is something I would like to try however, at this moment I have no access to Android 3.0 which is required for StageVideo...

What are we missing? Is AIR 3 not capable to play H.264 videos on android, though the Android native video player plays it out just fine?

Regards

Baliga

This topic has been closed for replies.
Correct answer Phil Flash

Hi,

Video encoding is very important.

For example, use baseline profile level 3.1 for H264 for mobile

(and not High profile level 4.1 recommended for desktop).

For more information, see the MAX session of Fabio Sonnati:

"Encoding for Performance on Multiple Devices"

And if you have an Android phone/tablet, there is my AIR application

to watch Adobe MAX 2011 videos :

https://market.android.com/details?id=air.fr.inway.maxVideos2011

Search "Sonnati" for this session's video.

(For info, i use a video player based on OSMF 1.6)

The pdf presentation is available on Sonmati's blog:

http://sonnati.wordpress.com/

Philippe

8 replies

Participant
July 10, 2012

Can someone tell me where is the appropriate place to place video files for playing on Android?  And perhaps some sample code on accessing the file?  I'm having trouble loading any video at all.

BaligaNAuthor
Inspiring
December 10, 2011

Solved this problem! If an H.264 file is packaged with the AIR application (in the assets folder) then the response to load and play is very slow! Is this because the assets folder is not extracted when the application is installed?

Same video when copied on to /mnt/flash/DCIM/ folder loads and plays out just fine, so looks like packaging a video in the assets folder is a complegtely no-no

Regards

Baliga

Phil FlashCorrect answer
Inspiring
December 3, 2011

Hi,

Video encoding is very important.

For example, use baseline profile level 3.1 for H264 for mobile

(and not High profile level 4.1 recommended for desktop).

For more information, see the MAX session of Fabio Sonnati:

"Encoding for Performance on Multiple Devices"

And if you have an Android phone/tablet, there is my AIR application

to watch Adobe MAX 2011 videos :

https://market.android.com/details?id=air.fr.inway.maxVideos2011

Search "Sonnati" for this session's video.

(For info, i use a video player based on OSMF 1.6)

The pdf presentation is available on Sonmati's blog:

http://sonnati.wordpress.com/

Philippe

Known Participant
December 3, 2011

@Phil, I tried out your AIR app. Nice app!. The MAX videos are not a good test candidate since they are mostly screen captures of presentation slides. The playback issues I mention are more evident in video sequences that have motion. Also the quality of the MAX video (at least when I played them back on the Galaxy Tab) was very low ad pixelated. Not acceptable for any kind of premium video playback.

Thanks for the link to the pdf. Will look into the recommendations there.

- abey

Known Participant
December 1, 2011

This is consistent with what I am seeing as well while attempting to stream H264 (bit rate 1500).

In fact I tested on an Android 3+ (Galaxy Tab), AIR 3.1, Flex SDK 4.6, using StageVideo=true and renderMode=direct and the playback is choppy.

If I copy the file  over to the device (Win 7 seems to transcode it to wmv in the process), the playback is very smooth.

Looks like H264 playback with AIR is just not there yet.

- Abey

BaligaNAuthor
Inspiring
December 1, 2011

Thanks Abey! Really appreciate your knowledge sharing... Now I really wonder why StageVideo does not work when you tryied on Android 3+, we were about to go down that path...

Known Participant
December 1, 2011

Don't get me wrong StageVideo works on Android 3+. ( I used the Galaxy Tab 10.1)

Video playback is better with it on than off, but it is nowhere near as smooth as the native android video player.

- Abey