1 Reply Latest reply on Aug 12, 2013 7:46 AM by sinious

    FLV Playback on iOS using NetStream


      Hello Everyone,


      I am working on a project where I am using the netstream object to play videos.

      Everything works flawlessly and I am basically ready to publish but I really want to optimize the video, currently the only way I seem to get anywhere near acceptable playback is when I set the datarate to 600kbps and the framerate to 15 fps.  It doesnt glitch horribly like any of the other settings I have tried, but lets face it, 15fps kinda stinks.  Id like it to be the native 33.3 fps or at least close.  The video is of high action movements and really shows the slow framerate with ghosting trails...  If i set the framerate higher however POOF, instant hiccups.  The hiccups are simply unnaceptable.


      My video size 854x480


      Any help getting this video to play smoothly on an iPad would really help me out a bunch.  I know i could use stageVideo, but I dont know how to implement it and I really cant afford re-writing my code at this point.  Its a rather complicated program at this point.  Id be happy to go to MP4 but it seems I have to use stageVideo for that.



      BTW, on iPad 2 all is well even with high framerate AND high dataratre... it's iPad1 thats my major hurdle.



        • 1. Re: FLV Playback on iOS using NetStream
          sinious Most Valuable Participant

          You can use ON2 VP6 codecs with something like f4v format instead of FLV but it's probably not going to be a huge improvement.


          Unfortunately you're just dealing with the impossible situation. You want a computationally challenging feat accomplished on a very underpowered CPU. It's not going to happen. I still test primarily on an iPad locked in OS5.1 land and I get 60FPS fullscreen (1024x768) video using StageVideo.


          If you really don't want your users to suffer you'll have to switch to StageVideo. You can use all your NetStream code. Just follow the second summary on StageVideo in this link:

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


          After you attach your NetStream you're just listening for different video events from StageVideoEvent.RENDER_STATE and your typical NetStream events.


          To use StageVideo you should convert your videos to MP4. You'll get not only much better performance but much better compression and quality.

          1 person found this helpful