Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash/AIR Stage Video on iOS - Is It Possible? How is the performance?

Does any of you can point me to some resource about video performance of AIR (3.2) on iOS devices.

I am interested into:

  • is StageVideo available
  • is video streaming allowed/enabled
  • is the performance ok with high definition videos?
  • is .flv playback allowed? (how about on android: flash is there already)
like image 460
Adrian Pirvulescu Avatar asked Apr 09 '12 10:04

Adrian Pirvulescu


2 Answers

Only H264 has hardware decoding on iOS. This means comparable video performance with native player only for H264 and slugish (at best) decoding for Sorenson and VP6 (even with low resolutions).

"AIR 3 for iOS uses the StageVideo object for H.264 video with hardware decoding, with limited supported for NetStream functionality. AIR 3 for iOS also supports On2 and Sorenson codecs through the StageVideo object. This support does not use hardware decoding, and it does not limit NetStream functionality." flash.media.StageVideo

FLV and MP4 are encapsulation formats. FLV can contain VP6+MP3 or H264+AAC (or any of them taken alone). MP4 can contain H264+AAC. The docs don't say anything about FLV not beeing supported on iOS.

However, on iOS, if FLV/H264 won't play, you won't be able to remux it to MP4 on the fly because of the following restriction (otherwise you would lose hardware decoding): "Note: This method is not supported for H.264 video in AIR 3.0 for iOS." flash.net.NetStream::appendBytes()

Nothing is said about Sorenson or VP6 not beeing suported for on the fly remuxing (thus they should be).

You shouldn't need appendBytes anyways, unless you plan on doing some very advanced stuff, like switching bitrates on the fly without any interruption during play.

Live streaming requires something similar of what appendBytes does. Since H264 hardware decoding is required and does not have a software mode, you won't get H264 for live streams.

"It turns out that real-time streaming of an H264 video does not render on iOS devices in Adobe Air. Other video codecs will work (H263), but not for H264. You'll consume the feed, but will only hear audio. I confirmed this after talking with members of the Adobe Air development team." From Adobe Forums

How well H264 decoding performs on different Apple ARM CPUs really depends a lot on video encode settings (B-frames or keyframes, bitrates, etc.) and wether you have dynamic content, static content, fast switching scenes, resolution, color palletes, etc.

Conclusion: Use FLV or MP4 (whichever suits you best), with H264+AAC inside. Experiment with encode settings, or lots of videos of which you are targeting (if any). Determine which is the lowest (oldest) iOS device you want to target, and test on that.

like image 190
Tiberiu-Ionuț Stan Avatar answered Nov 13 '22 21:11

Tiberiu-Ionuț Stan


I don't know how the performance stacks up, but the Actionscript docs for NetStream have some information about using NetStream/Video to play video on AIR on iOS devices:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#play%28%29

StageVideo is supported for H.264 video on iOS with AIR 3:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageVideo.html

The takeaway is that StageVideo and limited streaming capabilities are supported on iOS devices as long as your video uses the streaming formats that iOS requires.

like image 2
Rob Oplawar Avatar answered Nov 13 '22 23:11

Rob Oplawar