<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div lang="EN-GB" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">I am trying to implement decoding of H264 NAL units that are received from the camera (using live555 rtsp streaming). Everything works fine if received NAL unit is IDR (see part of the code in PS) but it does not work for SLICE NAL unit (nal_unit_type == 1). To decode image this NAL unit is not enough on its own and reference needs to be made to all the units since last IDR unit (key frame with nal_unit_type == 5). I do not know how to implement this.</div></div></div></blockquote><div><br></div>Our software does not do any decoding or other processing on the H.264 NAL units that it transmits/receives via RTP (except that it automatically fragments/defragments large NAL units so that they will fit in RTP packets).  It just delivers a sequence of NAL units - the same as if it came directly from the encoder.</div><div><br></div><div><br><blockquote type="cite"><div lang="EN-GB" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="color: rgb(31, 73, 125);"><o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="color: rgb(31, 73, 125);"> </span><span style="font-size: 11pt;">How to combine last IDR unit with the following SLICE NAL units  to produce H264 frame before sending it to the decoder?</span></div></div></div></blockquote><div><br></div><div>Someone on this mailing list might know the answer to your question, but, generally speaking, questions about how to implement the decoding of received NAL units are outside the scope of this mailing list (because the "LIVE555 Streaming Media" software doesn't do any decoding).</div><div><br></div><div>What happens, however, when you try playing your stream using a media player, such as VLC?  If VLC is able to play the stream OK, then you could look at its source code (though ti probably just uses FFMPEG or something for decoding).</div></div><br><br><div apple-content-edited="true">
<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>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>