Wowza Community

Packet loss/retransmissions

I am doing real time streaming to flash using wowza and a custom encoder. The bitrate usually varies from 500-800Kbps. The flash buffer size is set to 3 secs. For the most of the clients the experience is quite good.

Last night we had a few complaints about choppy video - frozen frames and flash skipping frames to catch up. I looked at the logs, and there seemed nothing unusual. The client bandwidth was ok and we are able to continuously push the stream. The cpu usage on the client machine was not very high either. So the only thing I can think that might be wrong was that packets were getting lost or coming late and/or out of order.

My understanding of protocol is not the best, so I have a few questions

  1. Is is possible/likely that packets will be come delayed more than 3 secs (the flash buffer size)? I am guessing if they are late by less than 3secs, it should not matter, because flash will sort the packets in the buffer

  2. Does the flash player request for retransmissions for late/lost packets?

  3. Do these retransmission requests get handled at the TCP level or the application level (wowza)?

  4. Are there settings in wowza to set up buffer size to handle retransmissions?

Thanks for your help.

Vivek

  1. Is is possible/likely that packets will be come delayed more than 3 secs (the flash buffer size)? I am guessing if they are late by less than 3secs, it should not matter, because flash will sort the packets in the buffer

If the client cannot handle the stream bitrate then eventually the 3 second buffer will be depleted and you will pauses and re-buffering. It sounds like the problem. 800Kbps is pretty high for Internet delivery. We suggest 400-600Kbps in the US.

  1. Does the flash player request for retransmissions for late/lost packets?

RTMP uses TCP. There is no packet loss (not really). If the connection gets behind the player will rebuffer which is what is causing the freezing.

  1. Do these retransmission requests get handled at the TCP level or the application level (wowza)?

If there is true underlying packet loss the TCP protocol will handle the re-transmission requests.

  1. Are there settings in wowza to set up buffer size to handle retransmissions?

No, it is all handled at the TCP level.

Your problem is most likely not packet loss but rather the client connection is lower than the bitrate of the video. You can use the BWChecker to run some tests with folks that are having problems to see how their bitrate measures. I would shoot for a bitrate that is 80% of what the BWChecker measure just to leave some headroom for network congestion.

http://www.wowza.com/community/t/-/31

Charlie

vivekg were you able to figure this out? We are experiencing the same issue with plenty of very stable bandwidth on client side but packet loss on the encoder’s side. Is there a way to minimize the impact of packet loss? We also get freezing issues and the packet loss can be seeing from time to time by pinging the server from the encoder’s machine. If packet loss is not the cause of the freezing issue, then I believe it might be an issue with very small upload bandwidth on the server/datacentre.

What is meant by freezing, actually what happens (symptoms) in video (at client). why it will occurs. what happens to the packet after?

Thanks,

sree7k7

If the client cannot handle the stream bitrate then eventually the 3 second buffer will be depleted and you will pauses and re-buffering. It sounds like the problem. 800Kbps is pretty high for Internet delivery. We suggest 400-600Kbps in the US.

RTMP uses TCP. There is no packet loss (not really). If the connection gets behind the player will rebuffer which is what is causing the freezing.

If there is true underlying packet loss the TCP protocol will handle the re-transmission requests.

No, it is all handled at the TCP level.

Your problem is most likely not packet loss but rather the client connection is lower than the bitrate of the video. You can use the BWChecker to run some tests with folks that are having problems to see how their bitrate measures. I would shoot for a bitrate that is 80% of what the BWChecker measure just to leave some headroom for network congestion.

http://www.wowza.com/community/t/-/31

Charlie

Hi there, you can use an RTP jitter buffer to attempt to mitigate this problem, the jitter buffer will collect and store packets in an attempt to produce a more even playback, and it will also log any packet loss to the log files.

But if you are using an MPEG-TS stream over UDP, then you can only log packet loss with the jitter buffer, but at least you can start your trouble shooting efforts from there.

Here is the article on setting up a jitter buffer:

How to turn on an RTP jitter buffer and packet loss logging (RTP and MPEG-TS)

Salvadore