<div dir="ltr">A related technical question. Can we split a large Iframe nal frame into slices after the fact? Sometimes the encoder is a closed piece of hardware/firmware. Is it possible to split it into slices at a macroblock boundary?<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 10:19 AM, Vikram Singh <span dir="ltr"><<a href="mailto:vikram@vizexperts.com" target="_blank">vikram@vizexperts.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi ross,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I am having --  </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">unsigned OutPacketBuffer::maxSize = 900000;  <span style="color:#376092">in mediaSink.cpp<u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092">If I decrease the maxSize then the frames I get are truncated.<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092">Can you please specify how to decrease the nal unit size without decreasing the value of maxSize.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092">Thanks <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092">Vikram Singh</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> live-devel [mailto:<a href="mailto:live-devel-bounces@ns.live555.com" target="_blank">live-devel-bounces@ns.live555.com</a>] <b>On Behalf Of </b>Ross Finlayson<br>
<b>Sent:</b> Wednesday, June 18, 2014 7:03 PM<br><b>To:</b> LIVE555 Streaming Media - development & use<br><b>Subject:</b> Re: [Live-devel] Starting Frames are corrupted<u></u><u></u></span></p></div></div><p class="MsoNormal">
<u></u> <u></u></p><div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><p class="MsoNormal">I am testing the testH264VideoStreamer.cpp provided in the testprogs of<br>live555 library folder.<br>This file will stream a h264 file.<br>
My h264 file is not corrupted.<br>I am viewing the stream using vlc player.<u></u><u></u></p></blockquote><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">(Sorry, I sent my previous email before I read your last email, in which you explained what you're doing.)<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Your problem is that your stream contains extremely large 'I- frames' (also known as 'key frames'), and your encoder is encoding each I-frame so that it takes up a single H.264 NAL unit.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">If you're using VLC as a client, then be aware that - if your I-frame NAL units are excessively large - the first few received frames *will* be truncated. Â VLC notices this and increases its buffer size, so after a few seconds should have increased its buffer size large enough. Â That's why you see video corruption only for the first few frames. Â (There may be an option in VLC to use a larger initial buffer size. Â However, VLC is not our software, so we can't help you with VLC-related problems.)<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">It's important to understand that each outgoing NAL unit - if it is larger than the RTP/UDP packet size (about 1500 bytes on most networks) - will be broken up into multiple outgoing RTP packets, and the receiver must receive *all* of these packets in order to be able to reconstruct the frame. Â In other words, if even one of these packets is lost, then the receiver will lose the *entire* NAL unit. Â That's why the NAL units - generated by your encoder - should be as small as is reasonable.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">The best solution here - for streaming - is to to not send extremely large NAL units. Â I-frames should be encoded as multiple 'slice' NAL units. Â Reconfigure your encoder to break up 'key frames' into multiple (therefore much smaller) 'slice' NAL units.<u></u><u></u></p>
</div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><span><span style="font-family:"Helvetica","sans-serif";color:black">Ross Finlayson</span></span><span style="font-family:"Helvetica","sans-serif";color:black"><br>
<span>Live Networks, Inc.</span><br><span><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span> <u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></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>