1 Reply Latest reply on Jul 3, 2012 7:19 AM by etune

    Buffer performance issue with MediaPlayer object and DynamicStreamingResource

    etune Level 1

        Steps to reproduce:

      1. Create two instances of MediaPlayerSprite.

      2. On the first one, use a single URLResource. On the other, use DynamicStreamingResource.

      3. When seeking to different points in the video, monitor the bufferLength property on MediaPlayer.

         

      Expected Results:

      I would expect the buffer to fill at the same rate.

         

      Actual Results:

      The buffer fills much slower when using DynamicStreamingResource as compared to URLResource.

       

       

      Here is an example: http://www.cecentral.com/tmp/presenter-osmf-dsr-test/

       

      The video on the left is a single stream, while the video on the right is a dynamic stream. As you play each video, click around the progress bar at the bottom. Take note of how long it takes for each buffer to fill.

       

      Any ideas?

        • 1. Re: Buffer performance issue with MediaPlayer object and DynamicStreamingResource
          etune Level 1

          Here is the relevant code for the example above:

           

          ----------------

           

          mps = new MediaPlayerSprite();

          mps.mediaPlayer.bufferTime = 8;

           

           

          if ( DYNAMIC_STREAM == false ) {

              mps.resource = new URLResource("rtmp://s2hpiuntp64m3.cloudfront.net:80/cfx/st/_definst_/ mp4:526/526-01-0750.f4v");

          } else {

              var resource:DynamicStreamingResource = new DynamicStreamingResource("rtmp://s2hpiuntp64m3.cloudfront.net:80/cfx/ st/_definst_/");

              var vector = new Vector.<DynamicStreamingItem>(3);

           

           

              vector [ 0 ] = new DynamicStreamingItem ( "mp4:526/526-01-0250.f4v" , 250 );

              vector [ 1 ] = new DynamicStreamingItem ( "mp4:526/526-01-0500.f4v" , 500 );

              vector [ 2 ] = new DynamicStreamingItem ( "mp4:526/526-01-0750.f4v" , 750 );

           

           

              resource.streamItems = vector;

           

           

              mps.resource = resource;

          }