AxisCommunications / locomote-video-player

Media Player in Adobe Flash with RTSP support. (THIS PROJECT IS NO LONGER MAINTAINED)
BSD 3-Clause "New" or "Revised" License
133 stars 79 forks source link

Stream started event received before video really started #167

Closed gaetancollaud closed 8 years ago

gaetancollaud commented 8 years ago

Hi,

We're having the issue that the streamStarted event is received but the video do not start directly. It's not clearly visible, to reproduce you have to lower the bandwidth of your browser (can easily be done in chrome).

This bug came up because we had networking issues lately. The problem is that we start a watchdog and check if the current time of the stream really change (in case of locomote or flash crashed). If so, we remove the player from the DOM and recreate it. We start this watchdog on the streamStarted. If the video take too long to start, the watchdog do its job and we go in an infinite loop...

Is there any way to trig streamStarted at the right time (meaning when the player really start to play video) ?

Best regards

drowzy commented 8 years ago

Is this reproducable for high fps as well? We have seen issues with low fps with Evostream as it is not certain that we receive an I-frame as the first frame. Hence that is why we don't see any picture until the next I-frame arrives.

Streamstarted is emitted once the stream is started, which doesn't necessarily mean we have picture.

gaetancollaud commented 8 years ago

I will check with high fps. I know that we use 8fps by default.

So you said that when we receive the streamStarted we may have to wait for a key frame (about 4s in our case) to be sure that the stream is really started ?

drowzy commented 8 years ago

Yes, as streamStarted only indicates that the stream is infact started. It does not hold any information when the picture is actually presented.

gaetancollaud commented 8 years ago

I see. I will implement a work around in our code to wait for the key frame. I think a simple setTimeout to start the watchdog will do. You can close this issue, thank you for the clarification.

gaetancollaud commented 8 years ago

Maybe you can close #159.