[Live-devel] Problem when multi client connect to server using OndemandServerMediaSubsession
David Cassany Viladomat
david.cassany at i2cat.net
Fri Sep 12 06:03:18 PDT 2014
Dear Nguyen and Ross,
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 RTSP 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:
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 ;-) )
2-> our server has two interfaces one with a public IP 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 HD 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.
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.
Best regards,
David Cassany
2014-09-05 3:30 GMT+02:00 Nguyen Van Long <longnv at elcom.com.vn>:
> Dear Ross,
>
> 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.
>
> Thank again for your help.
>
>
>
> *From:* Nguyen Van Long [mailto:longnv at elcom.com.vn]
> *Sent:* Thursday, September 04, 2014 4:47 PM
> *To:* live-devel at lists.live555.com
> *Cc:* longnv at elcom.com.vn
> *Subject:* RE: Problem when multi client connect to server using
> OndemandServerMediaSubsession
>
>
>
> Dear Ross,
>
> I had seen the answer at
> http://lists.live555.com/pipermail/live-devel/2014-September/thread.html
> 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.
>
> 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 4th or 5th client connect to server (All clients use RTP-over-UDP to request to server)
>
> I also use “openRTSP” to get data from my server and write into files. The same thing happens when the 4th or 5th client connect to server (when the connection less than 4, everything is ok).
>
> It’s glad if you could give me some more suggestions about this problem.
>
>
>
> Thanks!
>
>
>
> *From:* Nguyen Van Long [mailto:longnv at elcom.com.vn]
> *Sent:* Wednesday, September 03, 2014 5:33 PM
> *To:* live-devel at lists.live555.com
> *Cc:* longnv at elcom.com.vn
> *Subject:* Problem when multi client connect to server using
> OndemandServerMediaSubsession
>
>
>
> Dear Live555 team,
>
> 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.
>
> 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.
>
> 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.
>
> 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 4th client connect to server,
> the video of all clients is getting slower, image is very bad, I cannot see
> video content clearly …
>
> 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.
>
> I have some more information here:
>
> My processor : corei3 3.36 MHz, Memory (RAM): 4GB, When 4 client connect
> to server, program uses 30% of memory, 49% of CPU
>
> 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.
>
> Do you have any ideals with my problem and any suggestions to improve
> video quality when there are many clients connect to server?
>
>
>
> Thanks!
>
>
>
> *Regards,*
>
>
>
> *Nguyen Van Long (Mr)*
>
> ESoft - Software Development
>
>
> -----------------------------------------------------------------------------
>
> *ELCOM CORP *
>
> Add: Elcom Building, Duy Tan Street, Cau Giay District, Ha Noi
>
> Mobile: (+84) 936 369 326 | Skype: Pfiev.long | Web: www.elcom.com.vn
>
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140912/e8a7a0d8/attachment-0001.html>
More information about the live-devel
mailing list