<div dir="ltr">Thanks,<div>I follow your recommendation and now I get almost zero delay.</div><div>Problem was when I tried to use ..DiscreteFramer, I`ve got a lot of those errors about "MPEG start code found...", even if I use annex_b=0 flag in x264 settings. Only when I truncate first 4 bytes of every NAL unit all begins to work.</div>
<div>And again, stakoverflow saved my time... I dont pretend on first rate skills) </div><div><a href="http://stackoverflow.com/questions/19427576/live555-x264-stream-live-source-based-on-testondemandrtspserver">http://stackoverflow.com/questions/19427576/live555-x264-stream-live-source-based-on-testondemandrtspserver</a><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-07 22:11 GMT+04:00 Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class=""><blockquote type="cite"><div dir="ltr"><div><div><div>I`m implementing low-latency h264 rtsp source. Based on this code<br>
<a href="http://stackoverflow.com/questions/13863673/how-to-write-a-live555-framedsource-to-allow-me-to-stream-h-264-live" target="_blank">http://stackoverflow.com/questions/13863673/how-to-write-a-live555-framedsource-to-allow-me-to-stream-h-264-live</a> <br>
</div></div></div></div></blockquote><div><br></div></div>Oh please! Only second-rate programmers use '<a href="http://stackoverflow.com" target="_blank">stackoverflow.com</a>'.</div><div><br></div><div>The proper web site for documentation on the "LIVE555 Streaming Media" code is <<a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a>>. In particular, you should read</div>
<div><span style="white-space:pre-wrap"> </span><a href="http://www.live555.com/liveMedia/faq.html#liveInput" target="_blank">http://www.live555.com/liveMedia/faq.html#liveInput</a></div><div>and</div><div><span style="white-space:pre-wrap"> </span><a href="http://www.live555.com/liveMedia/faq.html#liveInput-unicast" target="_blank">http://www.live555.com/liveMedia/faq.html#liveInput-unicast</a></div>
<div><br></div><div><div class=""><br><blockquote type="cite"><div dir="ltr"><div><div><div>
</div>I wrote subclass of FramedSource and able to watch this stream in my client app. But even if I put 1 frame per second setting in x264 codec, I have exactly one frame-delayed data in my client. This delay is 100% on server side, because MultiFramedRTPSink::sendPacketIfNecessary() sending compressed data of previous frame (i just compare first several bytes of data in fOutBuf with those I wrote in fTo).<br>
</div></div></div></blockquote><div><br></div></div>I haven't looked at your code in detail, but you should note that once a H.264 NAL unit is delivered to the downstream "H264VideoStreamDiscreteFramer" object (using "FramedSource::afterGetting()"), this delivery will take place immediately. Similarly, the delivery from the "H264VideoStreamDiscreteFramer" to *its* downstream object - a "H264VideoRTPSink" - will also take place immediately. There is no '1 frame (NAL unit) delay'.</div>
<div><br></div><div>(Note also that for H.264 video streaming, because you are delivering discrete NAL units (i.e., one at a time), your NAL unit source class *must* feed into a "H264VideoStreamDiscreteFramer" object (*not* a "H264VideoStreamFramer"), and each NAL unit that's delivered *must not* begin with a 0x00000001 'start code'.)</div>
<div><br></div><div><br></div><div><div class=""><blockquote type="cite"><div dir="ltr"> nextTask() = envir().taskScheduler().scheduleDelayedTask(0,<br>
(TaskFunc*)FramedSource::afterGetting, this);<br></div></blockquote><div><br></div></div>Because your code will already be returning to the event loop immediately afterwards, note that you can simplify this to</div>
<div><span style="white-space:pre-wrap"> </span>FramedSource::afterGetting(this);</div><br><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px">Ross Finlayson<br>
Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>