3 Replies Latest reply: Dec 16, 2012 7:09 AM by micostar RSS

    Dynamic Streaming Buffer

    etune

      I have a DynamicStreamingResource with three bitrates. When I seek during playback, it takes 6.5 seconds to fill the buffer. In contrast, when I use a single URLResource to stream just one video, the same buffer fills in under a second. The lag is very noticeable to the user.

       

      My question is, why is there such a discrepancy in the rate at which the buffer fills between a single stream and a multi-bitrate stream? The network connection speed is the same. Why is one slower?

       

      FYI - I'm observing the bufferLength property on my MediaPlayer to get those numbers.

        • 1. Re: Dynamic Streaming Buffer
          etune Community Member

          Here is an example of the problem:

          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 the each buffer to fill.

           

          Why is there such a discrepancy in the rate at which the buffer fills between a single stream and a multi-bitrate stream? Can anyone answer that question?

          • 2. Re: Dynamic Streaming Buffer
            etune Community Member

            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;

            }

            • 3. Re: Dynamic Streaming Buffer
              micostar Community Member

              Did you ever figure this out?

               

              I am experiencing the same exact issue using the FLVPlaybackcomponent. If I play my stream without dynamic bit rate switching, it plays back fine. If I play it using the DynamicStreamItem class, it plays back choppy due to the time it takes to fill the buffer.

               

              There are lots of related issues in the forums but they are all dead end posts. Something that is written into so many tutorials should not have this issue!

               

              Anyone?