Optimizing video playback in AIR for iOS - actionscript-3

Developing an AIR for iOS app that involves video playback. Are there any best practices for optimizing video content for use in AIR applications?

Best route for video through AIR on iOS is to use an h.264 encoded video. These will be hardware accelerated and be better on battery than FLV (the other usual type for Flash).
The problem, of course, is that most h.264 videos cannot be played back using standard Flash video players on iOS. To get around that, you'll want to try one of two things:
Use StageWebView. This will open the video in the standard iOS video player, which is purpose-built to play h.264 videos. The downside here is you have absolutely no control over the video other than unloading the StageWebView. You also have no control over the GUI and the video will display over the entire application and can be difficult to position in Flex.
Use StageVideo which will allow for hardware accelerated h.264 videos and use the built in video playback mechanisms. It works fantastically, you have full control over your video, and it is just the video, so you can skin it as you see fit. The only downside is this displays the exact opposite of StageWebView and displays under your app. You will have to create a mask to see the video.
It's unfortunate that the two best options for playing video on iOS do not reside in the Display List, but that is what we have to deal with.
Hopefully that helps.

You can use component FPVideoPlayer from ane library FPNativeUI, which displays video over display list: http://www.youtube.com/watch?v=G5IdHnms2Dc. http://flashpress.ru/blog/ane/native-ui/?lang=en

Related

How to play live streaming videos in html5 using video element?

I am trying to play live streaming videos in html5. I have tried red5 server to subscribe the video and it worked well. but the problem is, It is playing using flash in browser. I want to play the video in html5 video tag without using flash support.
Note: Live streaming format is flv.
Can anyone guide me with the best option to do this?
Thanks in advance.
You can use alternatives for flash player using third party player such as JW player, SublimeVideo, VideoJS, etc.
I would also look into html5_rtsp_player if you are looking for non http based protocol. (https://github.com/Streamedian/html5_rtsp_player)
Since HTML5 video does not support .flv at this time (or probably ever), you should use a post-processor (if recording to flv on Red5) to convert to .mp4 using ffmpeg. This will alleviate the unsupported container issue.

HTML5 video player showing to enable flash in browser. How can I play stream video without enable the flash?

I made a streaming server and a website to show the Video. I have tried with many HTML5 player. But problem is no player working without enable flash on browser. There are a website http://jagobd.com and its playing video even I block flash on this site. How they did it? and How can I get this kind of player open source? could you please give me any solution?
My streaming link is Rtmp
RTMP is a Flash technology, and only plays in Flash or other players that support it. No browser supports RTMP, and it's unlikely that any will in the future.
If you want to use a regular HTML5 player, you need to use a compatible streaming format. Consider DASH. While it doesn't have native support in-browser, it doesn't need it as it can be handled with MediaSource Extensions. Most modern browsers support MSE. Many encoders do as well, and you can use whatever static web hosting or CDN you want.
There are other options for video distribution as well, if you have special streaming requirements.

How is this Flash video playable on mobile devices [using JWPlayer]?

I'm trying to make my anime-streaming website FLV videos playable on mobile device, so I changed the technology I'm using from flash to HTML5 MP4, webM and OGG.
But while I'm surfing this site - which is using jwPlayer - from my Android device:
Here
I found that the video is working well although it is using FLV?
Can anyone explain how this could happen?
It is a feature of JWplayer. It will detect when Flash is not supported and switch to HTML5.
This is from their website:
JW Player is tested on the world’s most popular desktop browsers to
ensure the best playback experience for your viewers. From IE8 to the
latest version of Chrome, on Windows and OS X we ensure that any user
can watch your content. JW Player always selects the best playback
mode for your media behind the scenes.
http://www.jwplayer.com/products/jwplayer/html5-and-flash/
I found that the video is working well although it is using FLV ?!
Please, can anyone explain how could this happen ?
Are you saying FLV because it is Flash? Did you know Flash itself can play MP4 files anyway? Looking at the source code I see MP4 video files provided so I think they are just using Flash Player app to play MP4 files where plugin is available or else then using HTML5 for mobile etc.
Test by disabling Flash Plugin in mobile browser settings, you should now see an HTML5 player instead for handling exact same file that Flash app was playing.
So to answer : How is this Flash video playable on mobile devices [using JWPlayer]?
You have a mobile with Flash Plugin installed and you visited a page that had a video player app made with Flash to play some MP4 files. Your mobile is flash capable so it worked and you watched some MP4 file using a Flash decoder instead of an HTML5 decoder.

Any Trick to Play HTML5 Video Player + MP4 Video in every browser?

I am building Self Hosted Video tutorial website.
I want to use HTML5 Player But with just one single Video format (mp4). But problem is that in some browsers like opera MP4 format is not supported.
I know for this i have to add multiple formats in html5 video player but having multiple versions (formats) of the same video will occupy multiple times of space in hosting.
Please give Suggestions.
There is no support for html5 before IE 9.i think you should use Video.Js.The Video.js API allows you to control the video through javascript or trigger event listeners, whether the video is playing through HTML5, flash, or another playback technology.
you can download it from here.
http://www.videojs.com/
read the documentation here.
https://github.com/videojs/video.js/blob/v4.2.2/docs/index.md

Does HTML5 support HTTP Psuedostreaming of video?

Can I click on some time and eventhough the video is not downlaoded till that time and the video starts playing from the time I clicked?
If yes, what would be a better option for viewing streamed video- HTML5 or flash player like JW player? WHich one will have less lag?
HTML5 browsers generally don't support this, however I believe the video tag in Safari will work with the Apple HTTP Streaming format for this functionality. For something that works across all browsers, Flash Player can do it using either RTMP streaming or HTTP Streaming (either with our without OSMF to support this). Probably the easiest place to start is with OSMF, which supports both RTMP and HTTP streaming of video.
I have tested this with Firefox and Firebug and while you can "seek" to a point in the video without having to watch video preceding the point you wish to seek, this still causes the entire video file to download.
Indeed, each time you seek in Firefox 4, the entire video downloads.
This may change and improve as HTML 5 video implementations become more mature and may differ based on the actual browser being used.
More information on the test here:
http://www.stevefenton.co.uk/Content/Blog/Date/201106/Blog/HTML-5-Video-In-Real-Life/