Skip to main content
Participant
May 21, 2009
Question

Issues pre-buffering multiple NetStreams

  • May 21, 2009
  • 2 replies
  • 1998 views

Hi,

I am running into some streaming bugs and am wondering if anyone else has come across them. Very grateful in advance for any help as I've been banging my head against this for a week now.

First of all, I'm finding that no matter what value I set for a NetStream's bufferTime property, the NetStream will not begin actually playing until the bufferLength property is over 2 seconds. This is not what Flash documentation says (that the default value of bufferLength is .1 seconds). Could this issue a function of the FMS configuration with my RTMP hosting account? Is it something I can resolve with my asc file?

Also: In my Actionscript 3 app, I need to pre-buffer a number of video streams so that any one of them can be triggered immediately later in the program. I do this by building an array of NetStreams (within a single NetConnection), then playing each of the streams I need to pre-buffer and immediately pausing each too. This is successfully causing them to buffer in the background, so that they're ready for immediate play when I need them. When I do this with just one NetStream, it works fine. But with more, the streams are behaving unpredictably. They are successfully buffering, but when I need to actually play them and I go to unpause them (Netstream.resume), the NetStreams are generally NOT playing back correctly. Their behavior is not consistent, and they mostly play with no video, or no audio OR video. The one exception is the FIRST NetStream that I started pre-buffering, which is the only one that's consistently playing back fine with its audio and video. Again, if I unpause any of the other NetStreams, they play back with just audio, or not at all. Do you have any idea why this could be happening? I have the app working perfectly with local files, so I know it has to do with the streaming piece.

Thanks so much!

    This topic has been closed for replies.

    2 replies

    Participant
    November 12, 2009

    I'm facing a similar issue. RTMP from FMS 3.5 latest flash player  and developing on FLEX 3

    I do have a long video 45 minutes or more where i want the user to be able to see a sequence of clips with seamless user experience hence no buffering.

    A clip is just a markIn time - markOut time of the same video file.

    I had the idea to use two netstreams streaming the same file and move from one to the other to exploit buffering.

    Start clip 1 on netstream 1 - seek to start and play

    at the same time use netstream 2 to seek to start of clip 2 and play pause to fill the netstream 2 buffer

    Once clip 1 is over - reaches markOut - switch to netstream 2 and play (hopefully) instantly as buffer is full

    and so on...

    May 26, 2009

    Hello,

    I can help you with your first problem. In your Aplication.xml there are some lines like this:

             <Live>
                    <!-- Drop live audio if audio q exceeds time specified. time in milliseconds -->
                    <MaxAudioLatency>2000</MaxAudioLatency>
                    <!-- Default buffer length in millisecond for live audio and video queue. -->
                    <MinBufferTime>2000</MinBufferTime>
                </Live>
                <Recorded>

                    <!-- Default buffer length in millisecond for live audio and video, value cannot be set below this by Flash player. -->                                                  <MinBufferTime>2000</MinBufferTime>

                </Recorded>

    This lines configure the min buffer timer, put a lower value on them (use the one on the live tag to live stream and recorded tag to recorded stream).

    I holpe it could help you

    Mairum