Skip to main content
Known Participant
June 2, 2009
Question

Switching issues in FLA using new dynamic stream class

  • June 2, 2009
  • 2 replies
  • 3336 views

This is a bump and additional thought.

The leap to my 1500k file happens when initial bandwidth detection happens as bandwidth is high.

Then the computer can not handle playback of a 1500k file.

Is there a way to force the player to actually start playing the 300k stream before making any step up to a higher stream?

I am using the classes, DynamicStream.as, DynamicStreamSample.as and DynamicStreamItem.as from

http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt1.html

http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt2.html

http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt3.html

Hi, I have a page up at http://www.gasolicious.com/orangeupload/shell3_construction.html

Bitrate of currently playing stream is displayed in big numbers on the page.

To see the problem you will need an older laptop or computer which would have trouble playing back a a high bitrate video stream.

the stream is dynamically switching through the DynamicStreamItem list of the same file at different bitrates. It works but the switching seems to take way too long. When the default file at 300k loads, the bandwidth test happens and the 1500k file loads.

Then on a slow CPU machine the file switches back down as it sees frames are being dropped. This switching is happening way too slowly, it takes a good 45 seconds to switch its way down through the various files from 1500k to 300k again on an old powerPC laptop which can only play successfully at that rate.

Anyone familiar with this?

How do you make it switch down faster?

Thanks Mark

    This topic has been closed for replies.

    2 replies

    Inspiring
    September 16, 2009

    Could you please tell me how do you test Dynamic Stream function? Just wondering if there are some tools to limit the bandwidth for either the computer play the video or flash player itself?

    Thank you in advance.

    mgasonAuthor
    Known Participant
    September 16, 2009

    Hi,

    The dynamic switching checks the bandwidth and playback capabilities of the users machine

    and switches dynamically between several streams that you encode at different bitrates.

    For the user the switching is seamless.

    I suggest you take a look at these tutorials and sample files that Adobe posted, you can build from the examples.

    http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt1.html

    http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt2.html

    http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt3.html

    these explain everything and show different ways to do it, using the flvplayback component or not.

    You will need the new ADOBE ACTIONSCRIPT 3.0 DYNAMIC STREAMING CLASSES
    The download tools link is at the top and requires you to log in.

    If you want to do dynamic stream switching with the flvplayback component you will also have to get the new flvplayback2.5 component

    it is free as are the classes. It is available from the same page as the classes

    ADOBE FLVPLAYBACK 2.5 FOR FLASH CS4 PROFESSIONAL AND FLEX

    Hope that helps

    Mark

    June 4, 2009

    Hi Mark,

    You can set the DynamicStreamItem.startRate property to start playback at a specific bitrate.

    HTH,

    Jody

    mgasonAuthor
    Known Participant
    June 4, 2009

    Hi,

    thanks for the reply. I posted on the sites and you are the first to jump in.

    I do have my start rate set to the 300k file.

    The problem arises because the file goes to 300k then in a second or two jumps to 1500k.

    I suspect because it initially detects bandwidth that can support that.

    Then the file is playing, it senses playback problems and starts switching down.

    Originally I had a lot of files and it took a while switching down through them one at a time.

    I cut the number and it gets there faster but still is not going to make the client happy.

    if you look at the website link in my firs post. The first video in the reel is full of action

    on a slow machine you can see my stream go 300k, 1500k, 1000k, 700k, 500k , 400k , 300k.

    It takes the whole first commercial or more to get back down to 300k, meanwhile it is dropping probably 80% of frames.

    Is there a setting that would force it to ignore bandwidth initially and try the first few seconds at 300k for a dropped frames check?

    If it played a few seconds first it would know not to switch up.

    mark

    June 5, 2009

    Hi Mark,

    Brad, who designed the DynamicStream class, says: Try setting the startRate to something like 301 -- just higher than the lowest bitrate.  I think there was a bug in there at some point that I later fixed that was doing a < comparison, not <= comparison.  Even starting at a fixed rate, if it encounters dropped frames it should aggressively downswitch (factoring in what has already been buffered).  After 5 minutes it will attempt to switch up again.  If I recall correctly it will only test a higher bandwidth 3 times before it locks out of higher bandwidth values permanently.

    hope that helps,

    Jody