<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">We went inside the problem and we realized that there were several lost packets.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Looking at the source code, in the "writeSocket" function inside<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">GroupsockHelper.cpp file we saw that there's no check for error for the "sendto" call.</div></div></div></blockquote><div class=""><br class=""></div>That’s correct - because it is used to transmit a *datagram*. The only reason why this call should fail is if your OS’s output buffer has filled up - and that will happen only if your data output rate is exceeding the capacity of your network.</div><div class=""><br class=""></div><div class="">It’s important to understand the difference between real-time streaming (which is what a LIVE555-based RTP server does) and on-demand streaming (which is what a HTTP server does). With real-time streaming, if your streaming rate exceeds the capacity of your network, you *will* lose data (most likely due to your OS’s output buffer filling up). There is *nothing* you can do to ‘fix’ this, other than by reducing the bitrate of your stream (or increasing the capacity of your network). (Note also that the capacity of your network is usually a lot less than the nominal bitrate of your server’s network interface.)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">2) secondly, we programmatically increased the socket buffer by<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">adding the call to "setsockopt" in Live555ServerMediaSubsession :: createNewRTPSink</div></div></div></blockquote><div class=""><br class=""></div>The best way to do this is to call the LIVE555 “increaseSendBufferTo()” function, rather than calling the low-level “setsockopt()” function directly. But in any case, note that if your streaming rate exceeds the capacity of your network, then this will only delay the point at which you start losing data; you can never eliminate it.</div><br class=""><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span>
</div>
<br class=""></body></html>