<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 18/12/12 11:20, Ross Finlayson wrote:
<blockquote
cite="mid:8503C0B4-6FB7-4B98-97A7-8878738B03F4@live555.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Unfortunately I wasn't able to reproduce your problem at all. I
ran "testMPEG2TransportStreamer" to continuously stream a
Transport Stream file via multicast, and also ran
"testOnDemandRTSPServer" to receive this multicast stream, and use
it as input for a unicast RTSP server. I then kept running
<div><span class="Apple-tab-span" style="white-space:pre"> </span>openRTSP
-d 5 -n <rtspURL></div>
<div>to repeatedly open and receive the stream for 5 seconds, then
close it. Each time, "openRTSP" received data.</div>
<div><br>
</div>
<div>So unfortunately you're going to have to track down yourself
what is going wrong.</div>
</blockquote>
<br>
Hi Ross,<br>
<br>
Yes, I shall look into it more deeply. In case it makes any
difference, I'll describe the setup here for you.<br>
<br>
Linux 64 bit, multicast source is RAW, not RTP, from an external
machine (In this case a Cisco Digital Content Manager), SPTS at
3.7MBit/sec.<br>
<br>
The only mechanical modifications to the testOnDemandRTSPServer that
have been made are reuseFirstSource=True, inputStreamIsRawUDP=True,
and the inputAddressStr and inputPortNum values.<br>
<br>
When I run the testOnDemandRTSPServer, I, like you, am able to
connect to it with openRTSP and it says it receives data. <i>That
is not in dispute</i>. I thought at first data was completely
lacking but as I described in my previous email, that is not
actually the case.<br>
<br>
However, if I subsequently try and play from the RTSP server with
VLC, it connects but cannot play because <i>insufficient data</i>
appears to be sent. Are you able to play the transport stream via
RTSP successfully with VLC after a few launches of openRTSP?<br>
<br>
I have a hunch at this point that the TransportStreamFramer is not
being reinitialized when a new client arrives (after all clients
have left) and the packet playout rate is no longer correct - but
like I said, it's only a hunch.<br>
<br>
In order to make sure I'm on absolutely the right page, I rebuilt
the latest source. I have trimmed testOnDemandRTSPServer from your
example (to cut out all other example instances other than the
multicast source) and made only the modifications I mentioned
above. The same results are exhibited. The source of the test
program is as follows:<br>
<br>
<br>
#include "liveMedia.hh"<br>
#include "BasicUsageEnvironment.hh"<br>
<br>
UsageEnvironment* env;<br>
Boolean reuseFirstSource = True;<br>
Boolean iFramesOnly = False;<br>
<br>
static void announceStream(RTSPServer* rtspServer,
ServerMediaSession* sms,<br>
char const* streamName, char const*
inputFileName); // fwd<br>
int main(int argc, char** argv) {<br>
TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br>
env = BasicUsageEnvironment::createNew(*scheduler);<br>
<br>
UserAuthenticationDatabase* authDB = NULL;<br>
<br>
RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554,
authDB);<br>
if (rtspServer == NULL) {<br>
*env << "Failed to create RTSP server: " <<
env->getResultMsg() << "\n";<br>
exit(1);<br>
}<br>
char const* descriptionString<br>
= "Session streamed by \"testOnDemandRTSPServer\"";<br>
<br>
// A MPEG-2 Transport Stream, coming from a live UDP (raw-UDP or
RTP/UDP) source:<br>
{<br>
char const* streamName =
"mpeg2TransportStreamFromUDPSourceTest";<br>
char const* inputAddressStr = "239.200.1.102";<br>
portNumBits const inputPortNum = 5500;<br>
Boolean const inputStreamIsRawUDP = True;<br>
ServerMediaSession* sms<br>
= ServerMediaSession::createNew(*env, streamName, streamName,<br>
descriptionString);<br>
sms->addSubsession(MPEG2TransportUDPServerMediaSubsession<br>
::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>
env->taskScheduler().doEventLoop(); // does not return<br>
return 0; // only to prevent compiler warning<br>
}<br>
<br>
<br>
<br>
<br>
</body>
</html>