<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello everyone!<br>
<br>
I would be very grateful if someone could help me out with the issue below, I'm new to live555.<br>
<br>
I've got nine audio streams that I'm pulling in via ffmpeg and then re-encoding them to AAC-LC and pushing to udp://127.0.0.1:port_num?pkt_size=1316 (where port_num is replaced by respective port number) The first stream is being pushed to port 10000, the second
one to 10001, third one to 10002, etc.<br>
<br>
Example for first stream:<br>
ffmpeg -i remotestream [...codec options...] -f mpegts udp://127.0.0.1:10000?pkt_size=1316<br>
<br>
I've modified testOnDemandRTSPServer.cpp as shown below. (taken from live555-latest.tar.gz downloaded today - 8 March 2015)<br>
I launch my ffmpeg instances & the rtsp server and connect to it via VLC/another rtsp client.<br>
<br>
It works, I do hear the audio stream, however the issue is that as soon as one client connects, the RTSP server uses 100% of the CPU.<br>
As soon as the client disconnects, the CPU usage falls back to normal. Any idea of what could be wrong?<br>
<br>
#include "liveMedia.hh"<br>
#include "BasicUsageEnvironment.hh"<br>
<br>
UsageEnvironment* env;<br>
Boolean reuseFirstSource = False;<br>
Boolean iFramesOnly = False;<br>
<br>
int main(int argc, char** argv) {<br>
TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br>
env = BasicUsageEnvironment::createNew(*scheduler);<br>
<br>
RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, NULL);<br>
if (rtspServer == NULL) {<br>
*env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";<br>
exit(1);<br>
}<br>
<br>
char const* descriptionString<br>
= "Session streamed by \"MyRTSPServer\"";<br>
<br>
int NUM_STREAMS = 9;<br>
char const* streams[] = {"stream1","stream2","stream3","stream4","stream5","stream6","stream7","stream8","stream9"};<br>
int port = 10000;<br>
<br>
for(int i=0;i<NUM_STREAMS;i++)<br>
{<br>
const char* streamName = streams[i];<br>
const char* inputAddressStr = "127.0.0.1";<br>
portNumBits inputPortNum = port; port++;<br>
Boolean const inputStreamIsRawUDP = True;<br>
ServerMediaSession* sms = ServerMediaSession::createNew(*env, streamName, streamName,descriptionString);<br>
sms->addSubsession(MPEG2TransportUDPServerMediaSubsession::createNew(*env, inputAddressStr, inputPortNum, inputStreamIsRawUDP));<br>
rtspServer->addServerMediaSession(sms);<br>
<br>
char* url = rtspServer->rtspURL(sms);<br>
*env << "\n\"" << streamName << "\" stream, from a UDP Transport Stream input source \n\t(";<br>
if (inputAddressStr != NULL) {<br>
*env << "IP multicast address " << inputAddressStr << ",";<br>
} else {<br>
*env << "unicast;";<br>
}<br>
*env << " port " << inputPortNum << ")\n";<br>
*env << "Play this stream using the URL \"" << url << "\"\n";<br>
delete[] url;<br>
}<br>
<br>
env->taskScheduler().doEventLoop(); // does not return<br>
<br>
return 0; // only to prevent compiler warning<br>
}<br>
<br>
<br>
Thanks!<br>
Shaan<br>
</div>
<p style="FONT-FAMILY: Arial" id="c1-id-6"><font style="FONT-SIZE: 10pt" color="#444444" id="c1-id-7"><font style="FONT-SIZE: 10pt" id="c1-id-8"><strong id="c1-id-9"><font face="Arial" id="c1-id-10"><font style="FONT-SIZE: 10pt" id="c1-id-11"><font color="#000000" id="c1-id-12"><font color="#f69646" id="c1-id-13"> </font></font></font></font></strong></font></font></p>
<p style="FONT-FAMILY: Arial" id="c1-id-14"><font style="FONT-SIZE: 10pt" color="#444444" id="c1-id-15"><font style="FONT-SIZE: 10pt" id="c1-id-16"><strong id="c1-id-17"><font face="Arial" id="c1-id-18"><font style="FONT-SIZE: 10pt" id="c1-id-19"><font color="#000000" id="c1-id-20"><font color="#f69646" id="c1-id-21">Shaan
Nobee</font> <br id="c1-id-22">
</font></font></font></strong><font face="Arial" id="c1-id-23"><font style="FONT-SIZE: 10pt" id="c1-id-24"><font color="#000000" id="c1-id-25"><font style="FONT-SIZE: 10pt" id="c1-id-26"></font><br id="c1-id-27">
</font><font color="black" id="c1-id-28"><font style="FONT-SIZE: 10pt" id="c1-id-29"></font></font></font></font>- Corporate Office<br id="c1-id-31">
<font face="Arial" id="c1-id-32"><font style="FONT-SIZE: 10pt" id="c1-id-33"><font color="#000000" id="c1-id-34"><strong id="c1-id-35">Tel:</strong> +2302037117 <strong id="c1-id-36">|</strong>
<strong id="c1-id-37">Mob:</strong> +23052518816 <strong id="c1-id-38">|</strong> <strong id="c1-id-39">Fax:</strong> +2302116996<br id="c1-id-40">
</font><font color="#004dbb" id="c1-id-41"><a href="mailto:shaan.nobee@mauritiustelecom.com">shaan.nobee@mauritiustelecom.com</a>
</font></font></font><br id="c1-id-42">
<a href="http://www.mauritiustelecom.com/" id="c1-id-43"><font style="FONT-SIZE: 10pt" color="#004dbb" face="Arial" id="c1-id-44">www.mauritiustelecom.com</font></a> |<font color="#000000" face="Arial" id="c1-id-45">
</font><a href="http://www.orange.mu/" id="c1-id-46"><font style="FONT-SIZE: 10pt" color="#004dbb" face="Arial" id="c1-id-47">www.orange.mu</font></a> |
<a title="Orange on Facebook" href="http://www.facebook.com/orangemauritius?ref=hl" id="c1-id-48">
<img border="0" hspace="0" alt="Orange on Facebook" src="cid:logo-fb.jpg" id="c1-id-49"></a> |
<a title="Orange on Twitter" href="http://https//twitter.com/OrangeMauritius" id="c1-id-50">
<img border="0" hspace="0" alt="Orange on Twitter" src="cid:logo-twitter.jpg" id="c1-id-51"></a>
<br id="c1-id-52">
<br id="c1-id-53">
<font style="FONT-SIZE: 10pt" id="c1-id-54"><a title="Mauritius Telecom" href="http://www.mauritiustelecom.com/" id="c1-id-55"><font style="FONT-SIZE: 10pt" color="#000000" face="Arial" id="c1-id-56"><img border="0" hspace="0" alt="Mauritius Telecom" src="cid:logo-mt.png" id="c1-id-57"></font></a><font style="FONT-SIZE: 10pt" color="#000000" face="Arial" id="c1-id-58">
</font><a title="Orange Mauritius" href="http://www.orange.mu/" id="c1-id-59"><font style="FONT-SIZE: 10pt" color="#000000" face="Arial" id="c1-id-60"><img border="0" hspace="0" alt="Orange Mauritius" src="cid:logo.gif" id="c1-id-61"></font></a></font><br id="c1-id-62">
</font></font><font style="FONT-SIZE: 10pt" color="#444444" id="c1-id-63"><font style="FONT-SIZE: 10pt" id="c1-id-64"><font color="#000000" face="Arial" id="c1-id-65">This message and its attachments may contain confidential or privileged information that may
be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Mauritius Telecom - Orange
is not liable for messages that have been modified, changed or falsified.</font></font></font></p>
</body>
</html>