Skip to main content
Known Participant
May 24, 2016
Question

Video playback options for stage3D + AIR mobile?

  • May 24, 2016
  • 2 replies
  • 614 views

We have an existing app on iOS and Android that has videos playing with FLV on mobile, since H.264 has conflicts with stage3D and doesn't render. The current code uses flash.media.Video with NetStream/NetConnection to render the video.

We're looking at releasing a sequel, which includes new videos. However, now that Adobe has removed FLV support from the tools and it is apparently no longer possible to access the older versions of Media Encoder / Premier that still supported FLV, we can't see any options for getting the new videos to play.

Things we've tried so far:

- Use H.264 : doesn't render, presumably due to bug Bug#3626740 - H.264 playback conflicts with Stage3D (Android)

- Use VideoTexture : not supported on Android

What alternatives are left at this point?

This topic has been closed for replies.

2 replies

Colin Holgate
Inspiring
May 24, 2016

You don't mention it, but I assume you're talking about a section of the app that shows video, and not that you want video rotoscoped into a 3D scene? If that's the case why not use StageVideo? It will definitely step on the graphics card, but at least you know that, and can reset any Stage3D context before going back to the Stage3D part of the app.

Known Participant
June 28, 2016

Unfortunately, we can't use StageVideo because we have localized subtitle and UI overlays on top of the video that are rendered with Stage3D.

Colin Holgate
Inspiring
June 28, 2016

There are two things you can do to help performance:

If everything that is seen is a bitmap texture, like, there are no vectors or filters, what you see is in the bitmap image, you could say stage.quality = "low"; It should look just the same.

If you're getting poor performance on older Retina devices, you can tell them not to run in Retina. You add info to the app descriptor file. This for example would only let iPhone 6 and above run in Retina:

<requestedDisplayResolution excludeDevices="iPad2 iPad3 iPad4 iPad5 iPhone4 iPhone5">high</requestedDisplayResolution>

That would go into the <iPhone> part of the XML.

Inspiring
May 24, 2016

VideoTexture is now supported everywhere so you can use it in your project with stage3D. It kind of work, but it still has some bugs =>

Bug#4150401 - VideoTexture on iOS - Sometimes the event TEXTURE_READY isn't dispatched

Bug#4142301 - StageVideo and VideoTexture - Video and Audio out of sync

And if you want to continue to use FLV, there's a way to (officially, from Adobe servers) download the latest version of Adobe Premiere that has Media Encoder with FLV support. Here's the tutorial :

Adobe CC 2013 Direct Download Links: Creative Cloud 2013 Release | ProDesignTools

But we don't know for how long it will work

Known Participant
June 28, 2016

Unfortunately, VideoTexture is not supported everywhere. The first few Android devices I attempted return Context3D.supportsVideoTexture = false.

We did finally get FLV working by using a third-party tool to convert videos, but the same implementation has *terrible* rendering performance on iOS. On that note, the video implementation with FLV *used* to perform fine on iOS under a previous version of AIR. That problem snuck past our QA department and made it into a public release of our older product using the same engine, since we hadn't made any video-related changes with the update - though we *did* update the version of AIR.