Skip to main content
Participating Frequently
January 28, 2010
Question

Server-Side stream play problem

  • January 28, 2010
  • 1 reply
  • 594 views

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 has been closed for replies.

    1 reply

    January 28, 2010

    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.

    mexxikAuthor
    Participating Frequently
    January 28, 2010

    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?

    January 28, 2010

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