2 Replies Latest reply on Jan 22, 2013 1:38 PM by sinious

    video .f4v very slow

    anjemalo Level 1


      I'm having problems playing f4v video is very slow. The size is 100 MB and resolution 1280x720. When I play out of Flash it reproduces well.

      I need to play in Desktop application not over Internet.


      What I'm doing bad? Is there anywhere to play well or wich is the better option to do it?

      thank you very much.


      This is my code:


      import flash.net.NetConnection;

      import flash.net.NetStream;

      import flash.media.Video;

      import flash.events.AsyncErrorEvent;



      stage.displayState = StageDisplayState.FULL_SCREEN;


      var conexion:NetConnection= new NetConnection();



      var display:NetStream = new NetStream(conexion);


      var video:Video = new Video(1280,720);



      display.addEventListener(AsyncErrorEvent.ASYNC_ERROR, noshow);


      function noshow(event:AsyncErrorEvent):void{

        //no show error   


      display.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);

      function statusHandler(event:NetStatusEvent):void


          switch (event.info.code)


              case "NetStream.Play.Start":

                  trace("Start [" + display.time.toFixed(3) + " seconds]");


              case "NetStream.Play.Stop":

              //End video       

                              trace("Stop [" + display.time.toFixed(3) + " seconds]");

              (root.loaderInfo.loader.root as Object).removeSWF();




        • 1. Re: video .f4v very slow
          moccamaximum Level 5

          f4v is only a container (like avi or mov) the codec that is used to encode your video can have a great influence how it performs.

          Look here for some tips how you can improve performance for flash

          A first measure could be right-clicking on the the stage (while your movie is running) and cheking/unchecking hardware accleration (you have to restart the movie to see the effect).

          The size of the video is not so much of an issue, but more the size/length ratio.

          If you have a 10 second long 100MB f4v-with with a 720p resolution, the encoding process went wrong. (like forcing the encoder to have every second frame to be a keyframe)

          I need to play in Desktop application not over Internet.

          Target MAC/Windows Projector or AIR to get a Desktop application instead of swf

          • 2. Re: video .f4v very slow
            sinious Most Valuable Participant

            100MB played locally is nothing. Most HDs have burst cache which can load up to 200MB instantly off disk. You shouldn't even need to (but might want to on a really 'value/green' rated drive) set the buffer to require 1 second of data before playing (bufferTime = 1).


            Are you using any kind of integrated graphics, like using a Z-esque Intel chipset with Intel 2000/3000/4000 graphics? Sometimes people over-estimate how well their built in hardware decoders perform.


            You always want to add Event listeners before you invoke a method that uses events. In your code you're adding listeners AFTER invoking a 'play(...)' method. Just for best practice, run the load(...) last.


            Lastly is the video available for inspection? 100MB for 10 seconds is 10MB/s, which is really only required in excessively high quality rendering with a huge gaumet with high motion. 9mbit is average full quality 720p (which is 1.25MB/s). You may have your bitrate set too high as moccamaximum mentioned if you are not in that video situation or striving for lossless video in ultra high motion.