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: <applewebdata://60404A86-7623-48A0-9326-200D87BEDAD4/Bi%E1%BB%83u%20m%E1%BA% ABu/www.elcom.com.vn> www.elcom.com.vn
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel