<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.apple-tab-span
{mso-style-name:apple-tab-span;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi ross,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am not able to get SPS and PPS units from the encoder.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am using CUDA Video Encode library which has a function NVGetSPSPPS().<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>NVGetSPSPPS() returns a buffer to SPS and PPS.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The problem is that I don’t have the formatting for this buffer so that I could separate SPS and PPS units from each other.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In my case this buffer is<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> 00 24 </span><b><span style='font-family:"Calibri","sans-serif";color:#1F497D'>67</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>4d 40 1e f6 04 00 83 7f e0 00 80 00 62 00 00 07 d2 00 01 d4 c1 c0 00 00 27 a1 20 00 02 62 5a 17 79 70 50 00 04 </span><b><span style='font-family:"Calibri","sans-serif";color:#1F497D'>68</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ee 3c 80</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Total of 44 bytes.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In the link <a href="http://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set/">http://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set/</a> </span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>0x00, 0x00, 0x00, 0x01, <b>0x67</b>, 0x42, 0x00, 0x0a, 0xf8, 0x41, 0xa2 ==> sps<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><pre>0x00, 0x00, 0x00, 0x01, <b>0x68</b>, 0xce, 0x38, 0x80 ==> pps<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>According the webpage, 7 in 0x67 for nal_unit_type sps<o:p></o:p></pre><pre>And 8 in 0x68 is for pps nal_unit_type.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>I have the same in my buffer.<o:p></o:p></pre><pre>Does this mean <span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>4d 40 1e f6 04 00 83 7f e0 00 80 00 62 00 00 07 d2 00 01 d4 c1 c0 00 00 27 a1 20 00 02 62 5a 17 79 70 50 00 04</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> is sps and <o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ee 3c 80 </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>is pps leaving out 00 24 at the starting.<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>According to my assumption <o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> 00 00 00 01 </span><b><span style='font-size:12.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>67 </span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>4d 40 1e f6 04 00 83 7f e0 00 80 00 62 00 00 07 d2 00 01 d4 c1 c0 00 00 27 a1 20 00 02 62 5a 17 79 70 50 00 04 ==> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>sps<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>And 00 00 00 01 </span><b><span style='font-size:12.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>68</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ee 3c 80 ==> pps<o:p></o:p></span></pre><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'><o:p> </o:p></span></pre><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Sorry I am not getting the detailed documentation for the function NVGetSPSPPS(). Please help me.<o:p></o:p></span></p><pre><o:p> </o:p></pre><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></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:live-devel-bounces@ns.live555.com] <b>On Behalf Of </b>Ross Finlayson<br><b>Sent:</b> Tuesday, April 22, 2014 8:46 PM<br><b>To:</b> LIVE555 Streaming Media - development & use<br><b>Subject:</b> Re: [Live-devel] Frames are corrupted<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></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'>Does this happen because I have not received SPS and PPS nal units ?</span><o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>Yes. If you are streaming H.264 video, then you *must* have SPS and PPS NAL units. Either<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>1/ Your H.264 video source contains SPS and PPS NAL units, occurring frequently. In this case, you *should not* modify "getAuxSDPLine()". Or:<o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-tab-span> </span>2/ Your H.264 video source does not contain SPS and PPS NAL units, but you know them some other way, in advance. In this case, you should not implement "getAuxSDPLine()", but you *must* then pass these NAL units to "H264VideoRTPSink::createNew()", in your implementation of the "createNewRTPSink()" virtual function.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If neither 1/ nor 2/ is true - i.e., if your video source does not contain SPS and PPS NAL units, nor do you know these in advance - then you will not be able to successfully stream H.264 video.<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal><span class=apple-style-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 class=apple-style-span>Live Networks, Inc.</span><br><span class=apple-style-span><a href="http://www.live555.com/">http://www.live555.com/</a></span></span> <o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>