<div dir="ltr"><div><div>The first of the 3 images looks like the information has been truncated, at least on the luminence plane but with all grey it is not certain. The first frame in full color pictures from earlier email, the one of a cube and pyrimid is definitely truncated. With the decoders I've used, when the decoder runs out of info it just maintains the same value for the pixels. <br>
<br></div>There is also damage within the image So there is more going on incorrectly here than just truncated information. Have you checked your YUV flavor? they have different layouts and memory usage. <br><br></div>Also when I copied my own data in i was re-educated on how types effect copying. SO double check your data moving for "overlap" make sure you are indeed copying bytes in order and not any overlap, byte order, or type promotion to wider types!<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 6:38 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">On a further note : <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><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I was testing the same file with wowza streaming server and I did not find any glitches at the start.<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><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">But the same file when I am streaming with directly downloaded file testH264VideoStreamer.exe provided in the testprogs of live555 library,<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">the stream starting was very noisy as shown in the links from previous emails.<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I also found the same starting frame issues with Darwin streaming server when I was streaming with the same file.<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><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">And I am sure the files I am testing with are not corrupted.<u></u><u></u></span></p>
<p><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">-vikram singh<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>Vikram Singh<br>
<b>Sent:</b> Friday, June 20, 2014 7:58 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><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">Please ignore my previous mail. I was sent accidently.<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">Just for testing purpose, I have reduced my streaming video size to 100*100 px size.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">By reducing the size I want to avoid the scenario where on the client side there is truncation of data, due to buffer overflow in the starting.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This buffer overflow was assumed because the client had no idea about server frame size and initialized a default size to the buffer that receives data.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Even then I have the problem of corrupt frames in the starting.<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">Can there be any other case because of which this initial corruption of frames is happening.<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">An another observation is when I had incorrect </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">OutPacketBuffer::maxSize <span style="color:#376092">initialized to it, the frame rendered were like this<u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092"><a href="https://drive.google.com/file/d/0B9yXmUZbfI7_OWJiblZta1hXYWM/edit?usp=sharing" target="_blank">https://drive.google.com/file/d/0B9yXmUZbfI7_OWJiblZta1hXYWM/edit?usp=sharing</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">i.e the frame would bleed to the bottom and that symbolizes the truncation of frame.<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">Instead the corruption was something like this<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="https://docs.google.com/file/d/0B9yXmUZbfI7_YUxEb1ltZ2pwa3M/edit" target="_blank">https://docs.google.com/file/d/0B9yXmUZbfI7_YUxEb1ltZ2pwa3M/edit</a><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">and after some time it would clear up like this<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="https://docs.google.com/file/d/0B9yXmUZbfI7_VW9uU2NWU041SkE/edit" target="_blank">https://docs.google.com/file/d/0B9yXmUZbfI7_VW9uU2NWU041SkE/edit</a><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">So can there be any other issue that is causing this problem.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-vikram<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 11:13 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"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I am having -- <span> </span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">unsigned OutPacketBuffer::maxSize = 900000; <span> </span><span style="color:#376092">in mediaSink.cpp</span></span><u></u><u></u></p>
</div><div><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.</span><u></u><u></u></p></div>
</div></blockquote><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">OK, there are two separate buffer sizes that you need to concern yourself with.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p>
</div><div><p class="MsoNormal">"OutPacketBuffer::maxSize" is the buffer size that is used - by your server - when *transmitting* NAL units. You must set it to be at least as large as your largest NAL unit. Otherwise you will see (in 'stderr') error messages about needing to increase "OutPacketBuffer::maxSize".<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">The receiving application - in your case VLC - must also have sufficient buffer space to be able to reassemble the incoming RTP packets into a complete NAL unit. That is what I referred to in my previous email message.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">In any case, 900000 bytes is an *insanely large* NAL unit (I-frame) size!! A NAL unit this large will get fragmented into *60* RTP packets, and *all* of these RTP packets must be received by the receiving application, otherwise the entire frame will be unrenderable. This is why it's much better to reconfigure your encoder so that it breaks up large I-frames into smaller 'slice' NAL units.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><div><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.</span><u></u><u></u></p>
</div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">You mean "how to decrease the nal unit size without *increasing* the value of maxSize"? Once again, you need to reconfigure your encoder to break up large I-frames into smaller 'slice' NAL units.<u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt"><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><div><p class="MsoNormal"><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>