Skip to main content
Participating Frequently
Jan 28, 2010 4:25 PM UTC
Question

Server-Side stream play problem

Hello,

I have a problem, which I am trying to solve for many nights already without any success.

Everytime I try to switch or change a server-side stream, it starts lagging after 2 seconds of playing and sound disappears.

Here are scenarios that result in that terrible lag:

1. I create server-side playlist with stream.play() with reset=false; when it is time to play the next movie in the playlist, it starts lagging after 2 seconds.

2. The same problems appears when I just switch streams. I installed FMF Feature Explorer and tried to launch SwitchStreams sample application: the same problem - server stream starts lagging after I switch streams with stream.play().

I tried on different servers (local and remote), with different players (debug player of FMS Admin Console, Standard Flash videoplayer component, OSMF player, Flex video player). I also tried all possible flv, f4v and mp4 file compression options for video files - still the same problem.

I have also tried literally thousands of Application.xml settings: changing buffer, buffer ration etc.

Is there any tip where I should search for a solution?

Thank you in advance

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Jan 28, 2010 7:14 PM UTC

    I find the only way to clear it is by emptying the buffer on the client side. Listen for the onPlayStatus event of the netstream, and look for a code of netstream.play.complete. When you get that, set the buffer to 0, then back to whatever you want your buffer set at (or your low buffer setting if you've implemented a dual buffering strategy).

    This may cause a little pause between stream changes, but it should clear up the accumulating delay.

    Translate
    mexxikAuthor
    Participating Frequently
    Jan 28, 2010 7:57 PM UTC

    JayCharles,

    Thank you for your reply.

    But in my case the client is subscribed to a stream on the FMS. And that stream is switching video files and handling the playlist. So, I don't see any possibility to listen to onPlayStatus on a client-side, as my client is only playing live stream and has no clue what is happening on the server side.

    Or I am wrong?

    Translate
    Jan 28, 2010 8:17 PM UTC

    When the source playing on the server side stream is switched, the clients get an onPlayStatus event on the netstream.

    Translate