<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Dear Live555 team,<o:p></o:p></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.<o:p></o:p></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.<o:p></o:p></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.<o:p></o:p></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 … <o:p></o:p></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. <o:p></o:p></p>

<p class=MsoNormal>I have some more information here: <o:p></o:p></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<o:p></o:p></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. <o:p></o:p></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? <o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Thanks!<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></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'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.5pt;color:black'><o:p> </o:p></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'><o:p></o:p></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'><o:p></o:p></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'><o:p></o:p></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'><o:p></o:p></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'><o:p></o:p></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 lang=FR
style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#7F7F7F'>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
href="applewebdata://60404A86-7623-48A0-9326-200D87BEDAD4/Bi%E1%BB%83u%20m%E1%BA%ABu/www.elcom.com.vn"><span
style='font-size:8.0pt;color:#0563C1'>www.elcom.com.vn</span></a></span><span
style='color:black'><o:p></o:p></span></p>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</body>

</html>