<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);">I am a new guy to learn live555 and porting it into our platform.</span></div>
<div class=""><span class="" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);">Now, we are coding a RTSP server based on
</span><span class="" style="white-space: pre-wrap;">testOnDemandRTSPServer sample code.</span></div>
<div class=""><span class="" style="white-space: pre-wrap;">We create 4 new classes to read H264 and AAC frames from our ring buffer not file.</span></div>
<div class=""><span class="" style="white-space: pre-wrap;">Each time call doGetNextFrame(), the class will deliver a “discrete” frame to fTo.</span></div>
<div class=""><span class="" style="white-space: pre-wrap;">Now, what we face is very familiar with</span></div>
<div class=""><span class="" style="white-space: pre-wrap;"><a href="http://lists.live555.com/pipermail/live-devel/2014-September/018686.html" class="">http://lists.live555.com/pipermail/live-devel/2014-September/018686.html</a></span></div></div></div></blockquote><div><br class=""></div>Eric,</div><div><br class=""></div><div>Please read that message once again - because it explains your problem. Specifically:</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="" style="white-space: pre-wrap;">6. Now, we use </span>
<span class="" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);">H264VideoStreamFramer not
</span><span class="" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);">H264VideoStreamDiscreteFramer,</span></div>
<div class=""><span class="" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);"> because we need a parser to create SDP for H264.</span></div></div></div></blockquote><div><br class=""></div>No, once again, if you’re streaming audio along with the video, then you should use a “H264VideoStreamDiscreteFramer”, *not* a “H264VideoStreamFramer”.</div><div><br class=""></div><div>Getting the SPS and PPS NAL units for the stream should not be a problem. This is usually something that you need to do just once (unless you are changing the parameters of your H.264 stream each time). Once you have the SPS and PPS NAL units, you can just modify your implementation of the “CreateNewRTPSink()” virtual function to use one of the variants of “H264VideoRTPSink::createNew()” that take the SPS and PPS NAL units as parameters. See “liveMedia/include/H264VideoRTPSink.hh”.</div><div><br class=""></div><div>Another thing that you need to be aware of is that your “fPresentationTime” values - for both video and audio - need to be aligned with ‘wall clock’ time- i.e., with the times that you’d get by calling “gettimeofday()”.</div><br class=""><div apple-content-edited="true" class="">
<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; "><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; ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span></span>
</div>
<br class=""></body></html>