Skip to main content
Inspiring
November 29, 2011
Answered

Video is jerky when played on mobile/tablet

  • November 29, 2011
  • 4 replies
  • 1004 views

Hi All,

  I am quite new to Adobe AIR (about 4 months of experience). Currently I work on a Adobe AIR app that runs on both Desktop and Mobile devices. When I try to play any H.264 video (FLV or MP4 container) thru my app using OSMF / Video Display control on the desktop they run just fine, however on the mobile / tablet device they play jerky. The same videos played on the same mobile  tablet devices using File Manager play out just fine.

Am I missing something? Please let me know how I can fix this... It's critical requirement for us.

Regards

Narasimha Baliga

This topic has been closed for replies.
Correct answer BaligaN

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

4 replies

BaligaNAuthorCorrect answer
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

BaligaNAuthor
Inspiring
November 30, 2011

The video that I try to play is of codec H264, MPEG4 AVC with resolution 642*374 and Frame Rate 25, Audio Stereo 44100 Hz

BaligaNAuthor
Inspiring
November 30, 2011

Hi,

  Colin - Thanks for the quick reply, however navigateToURL() may not be an option for me as I need to embed a video in a part of the View that I have created in my application.

StageWebView is used for HTML and PDF rendering, does it handle video as well?

I use the following code for rendering videos -

private static var osmfMediaFactory: DefaultMediaFactory = new DefaultMediaFactory();

public static function GetMediaElement(media: IMedia): MediaElement

{

    return osmfMediaFactory.createMediaElement(new URLResource(media.MediaFileName));

}

var mediaElement: MediaElement = GetMediaElement(resource)

mediaContainer = new MediaContainer();

(playZone as BaseZone).AddMedia(mediaContainer);

mediaContainer.addMediaElement(mediaElement);

mediaPlayer = new MediaPlayer();

mediaPlayer.media = mediaElement;

 

OSMF is supposed to use the StageVideo automatically,

The video playout using OSMF is choppy, how do I fix this?

Regards

Baliga

Colin Holgate
Inspiring
November 29, 2011

Three ways to get good performance video (there will be four when there's StageVideo):

Use a regular On2 VP6 FLV, and netstream, and do things in the way you always would have with Flash. Since AIR 2.7 this has performed well enough to be useful.

Use the native video player. I think that's with navigateToURL() and passing in the url of the local H.264 video file.

Use StageWebView. That can be quite slick. You get native hardware playback of mp4/H.264 files, and it can play as part of the page, but zoomable to full screen. Except on small screens. With small screens the video will take over the page when you play it.

Participating Frequently
November 29, 2011

StageVideo is available on Honeycomb, so if you're on a tablet, that's the best option.