<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div dir="ltr"><span id="result_box" class="" lang="en"><span class="">I looked at the</span> <span class="">code</span> <span class="">openRTSP</span>.<br><span class="">I changed the</span> <span class="">code</span> <span class="">of</span> <span class="">testRTSPClient</span> <span class="">adding</span> <span class="">QuickTimeFileSink</span> <span class="">::</span> <span class="">createnew</span>.<br>
</span><div><span class="">But the</span> <span class="">video</span> <span class="">does not play</span> <span class="">generated</span>.</div><div><br></div><div>Code</div><div>        </div><div>        //scs.subsession->sink = DummySink::createNew(env, *scs.subsession, rtspClient->url());        </div>
<div>        qtOut = QuickTimeFileSink::createNew(env, *scs.session, "video.mp4", fileSinkBufferSize, 1280, 720, 25, false, true, true, true);</div><div>        qtOut->startPlaying(subsessionAfterPlaying, NULL);</div>
<div><br></div><div>        env << *rtspClient << "Created a data sink for the \"" << *scs.subsession << "\" subsession\n";</div><div><br></div><div>        /*scs.subsession->miscPtr = rtspClient; </div>
<div>        scs.subsession->sink->startPlaying(*(scs.subsession->readSource()),</div><div>                subsessionAfterPlaying, scs.subsession);*/</div><div><br></div><div>        if (scs.subsession->rtcpInstance() != NULL) {</div>
<div>            scs.subsession->rtcpInstance()->setByeHandler(subsessionByeHandler, scs.subsession);</div><div>        }</div><div><br></div><div><span id="result_box" class="" lang="en"><br><span class="">What</span> <span class="">am I doing wrong?</span><br></span></div></div></blockquote><div><br></div></div><div>First, because you have already called "qtOut<-startPlaying(...);", you must not also call "scs.subsession->sink->startPlaying(...);".</div><div><br></div>Also, one important thing to understand about the "QuickTimeFileSink" class is that - to properly write the output file (including data 'trailers') - your application *must* close it properly - by calling "Medium::close(qtOut);" - when you're done.  You cannot just '<control>-c' your application.<div><span class="Apple-tab-span" style="white-space:pre">    </span>See the "Important note" here: <a href="http://www.live555.com/openRTSP/#quicktime">http://www.live555.com/openRTSP/#quicktime</a></div><div><br></div><div>If the sender sends RTCP "BYE" packets (for each subsession) when the stream ends, then your application's 'bye handler' should do this automatically. Otherwise, you have to set up a signal handler in your application (as "openRTSP" does), or set up a timer, to close "qtOut" after a certain period of time has elapsed.</div><div><br></div><div>I suggest that you first figure out how to get the "openRTSP" application to read your stream - so it will write a proper MP4-format file - and then (and only then) start writing your own application that does the same.</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>