<div dir="ltr"><div>Dear Nguyen and Ross,<br><br></div>I am writing as an answer to this email loop because our similar issue might be useful to you. Some days ago we just noticed a similar behaviour of what Nguyen exposed lately. We have an <span tabindex="-1" id=":47b.1" style class="">RTSP</span> server that uses live555 library and we were facing a similar issue of experimenting packet loss when having multiple clients connected to the server. Finally today we had time to make further tests to isolate the issue in order to exclude any performance limitation and we concluded: <br><br>1-> one of our old cheap switches was introducing about 3% of packet loss (keeping network equipment updated and fully functional is a must if you don't want to become mad ;-) )<br><br><div>2-> our server has two interfaces one with a public <span tabindex="-1" id=":47b.2" style class="">IP</span> and another behind the NAT in our company. So it seams that only when the server is using both interfaces simultaneously we have packet losses. Having clients only in the public interface we could stream up to six clients (with <span tabindex="-1" id=":47b.3" style class="">HD</span> h264 streams) without any loses, the same happened if checking only clients from our private LAN. But the interesting point is that having just a single client in the private LAN simultaneously with a single client out of our LAN we faced up to 5% of packet loss.<br></div><div><br></div><div>Our work around is to have the server with a single network interface (not to be tempted to use both at the same time) which works like charm right now. Hopefully this might be useful to you.<br><br></div><div>Best regards,<br>David <span tabindex="-1" id=":47b.4" style class="">Cassany</span><br></div><div><br><br><b><span style="font-size:10pt;font-family:"Arial","sans-serif";color:rgb(0,112,192)"></span></b></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-05 3:30 GMT+02:00 Nguyen Van Long <span dir="ltr"><<a href="mailto:longnv@elcom.com.vn" target="_blank">longnv@elcom.com.vn</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><span style="color:#1f497d">Dear Ross, <u></u><u></u></span></p>

<p class="MsoNormal"><span style="color:#1f497d">I would like to give many thanks
for your suggestions. It seems you are right in my case. I will try to use
another codec (H.264) as well as change from streaming unicast to multicast.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="color:#1f497d">Thank again for your help.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p>

<div>

<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">

<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Nguyen Van Long
[mailto:<a href="mailto:longnv@elcom.com.vn" target="_blank">longnv@elcom.com.vn</a>] <br>
<b>Sent:</b> Thursday, September 04, 2014 4:47 PM<br>
<b>To:</b> <a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<b>Cc:</b> <a href="mailto:longnv@elcom.com.vn" target="_blank">longnv@elcom.com.vn</a><br>
<b>Subject:</b> RE: Problem when multi client connect to server using
OndemandServerMediaSubsession<u></u><u></u></span></p>

</div>

</div><div><div class="h5">

<p class="MsoNormal"><u></u> <u></u></p>

<p class="MsoNormal"><span style="color:#1f497d">Dear Ross,<u></u><u></u></span></p>

<p class="MsoNormal"><span style="color:#1f497d">I had seen the answer at <a href="http://lists.live555.com/pipermail/live-devel/2014-September/thread.html" target="_blank">http://lists.live555.com/pipermail/live-devel/2014-September/thread.html</a>
although I didn’t received email from mailing list (may be our mail server’s
down or something cause to lost email …) and I would like to thank you for your
quick answer.<u></u><u></u></span></p>

<pre><span style="font-family:"Calibri","sans-serif";color:#1f497d">As your suggestions, I use VLC as client running in 4 separated computer (I think hardware in each computer is ok to run just one vlc), The “reuseFirstSource” is of course set to true but nothing changed, video again getting slower with bad image when the 4<sup>th</sup> or 5<sup>th</sup> client connect to server (All clients use RTP-over-UDP to request to server) <u></u><u></u></span></pre><pre><span style="font-family:"Calibri","sans-serif";color:#1f497d">I also use “openRTSP” to get data from my server and write into files. The same thing happens when the 4<sup>th</sup> or 5<sup>th</sup> client connect to server (when the connection less than 4, everything is ok). <u></u><u></u></span></pre><pre><span style="font-family:"Calibri","sans-serif";color:#1f497d">It’s glad if you could give me some more suggestions about this problem.<u></u><u></u></span></pre><pre><span style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></pre><pre><span style="font-family:"Calibri","sans-serif";color:#1f497d">Thanks!<u></u><u></u></span></pre><pre><span style="font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></pre>

<div>

<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">

<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Nguyen Van Long
[mailto:<a href="mailto:longnv@elcom.com.vn" target="_blank">longnv@elcom.com.vn</a>] <br>
<b>Sent:</b> Wednesday, September 03, 2014 5:33 PM<br>
<b>To:</b> <a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<b>Cc:</b> <a href="mailto:longnv@elcom.com.vn" target="_blank">longnv@elcom.com.vn</a><br>
<b>Subject:</b> Problem when multi client connect to server using
OndemandServerMediaSubsession<u></u><u></u></span></p>

</div>

</div>

<p class="MsoNormal"><u></u> <u></u></p>

<p class="MsoNormal">Dear Live555 team,<u></u><u></u></p>

<p class="MsoNormal">I recently develop an application that uses live555 library
and operates simple tasks such as: get video data from camera, decode video
data, draw something on video frame, encode video frame and streaming. My
application is a client (to camera) and also a server when streaming video
data.<u></u><u></u></p>

<p class="MsoNormal">To get video data from camera, I modified the testRTSPClient
in testProgs. Data received then decoded using ffmpeg and drawn some text,
shape using Qt. After that, I use ffmpeg again to encode video frame (codec is
MJPEG-4) and put the output into a queue which will be streamed later.<u></u><u></u></p>

<p class="MsoNormal">To stream video from  a queue, I write a class based on
DeviceSource, the function doGetNextFrame always read mpeg-4 package from queue
and calls FrameSource::afterGetting(this) when data available. I also write a
class called Mpeg4LiveServerMediaSubsession which subbed class from
OnDemandServerMediaSubsession and re-implement three virtual functions
(getAuxSDPLine, createNewFrameSource, createNewRTPSink). The createNewFrameSource
actually return the MPEG4VideoStreamDiscreteFramer::createNew() with input
source parameter is my class based on DeviceSource described above.<u></u><u></u></p>

<p class="MsoNormal">I use VLC as client to connect to my server and play video
stream. Everything seems ok and my application works quite fine when there are
less than 4 clients connect to server. When the 4<sup>th</sup> client connect
to server, the video of all clients is getting slower, image is very bad, I
cannot see video content clearly … <u></u><u></u></p>

<p class="MsoNormal">I don’t think the problem is with my network because I use
LAN with a good capable and even my server and client (VLC) in the same
computer, this problem still happens. <u></u><u></u></p>

<p class="MsoNormal">I have some more information here: <u></u><u></u></p>

<p class="MsoNormal">My processor : corei3 3.36 MHz, Memory (RAM): 4GB, When 4
client connect to server, program uses 30% of memory, 49% of CPU<u></u><u></u></p>

<p class="MsoNormal">When 1 client (VLC) connect to server, from VLC tool I see
that the content birate is about 6000 – 7000 kb/s. It reduce to 4000 – 5000
kb/s when 2 clients connect to server, 2000 – 2500 kb/s when 3 clients connect
to server and 600 – 1500 kb/s when 4 clients connect to server. <u></u><u></u></p>

<p class="MsoNormal">Do you have any ideals with my problem and any suggestions
to improve video quality when there are many clients connect to server? <u></u><u></u></p>

<p class="MsoNormal"><u></u> <u></u></p>

<p class="MsoNormal">Thanks!<u></u><u></u></p>

<p class="MsoNormal"><u></u> <u></u></p>

<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0070c0">Regards,</span></b><span style="font-size:10.5pt;color:black"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><u></u> <u></u></span></p>

<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0070c0">Nguyen Van Long (Mr)</span></b><span style="font-size:10.5pt;color:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="line-height:13.5pt"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#7f7f7f">ESoft - Software Development </span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:13.5pt"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#bfbfbf">-----------------------------------------------------------------------------</span><span style="color:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:13.5pt"><b><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#0070c0">ELCOM
CORP                </span></b><span style="color:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="text-align:justify;line-height:13.5pt"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#7f7f7f">Add:
Elcom Building, Duy Tan Street, Cau Giay District, Ha Noi</span><span style="color:black"><u></u><u></u></span></p>

<p class="MsoNormal" style="line-height:13.5pt"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#7f7f7f">M</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#7f7f7f" lang="FR">obile</span><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#7f7f7f">: (+84)
936 369 326 | Skype: Pfiev.long | Web: </span><span style="font-family:"Arial","sans-serif";color:#1f497d"><a><span style="font-size:8.0pt;color:#0563c1">www.elcom.com.vn</span></a></span><span style="color:black"><u></u><u></u></span></p>

<p class="MsoNormal"><u></u> <u></u></p>

</div></div></div>

</div>


<br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>