<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><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;" class=""><div class=""><blockquote type="cite" class=""><div class="">While maintaining a single live source, is there a way for which,<br class="">each new client can always receive a sequence beginning with SPS, PPS<br class="">and key frames?<br class=""></div></blockquote><div class=""><br class=""></div>No. However, each RTSP client will already have the SPS and PPS NAL units - because they will have been present in the SDP description that the client received from the server (as a response to the RTSP "DESCRIBE" command). Therefore, the client can insert these SPS and PPS NAL units at the front of the stream, before it starts to decode them.</div><div class=""><br class=""></div><div class="">To illustrate this, look at the code for the "openRTSP" client application - see "testProgs/playCommon.cpp", lines 863-865. Note how the code calls "MediaSubsession::fmtp_spropparametersets()" to get a SDP format string that encodes the SPS and PPS NAL units. </div><div class=""><br class=""></div><div class="">Then, note the code in "liveMedia/H264or5VideoFileSink.cpp", lines 48-55. Note how the code calls the function "parseSPropParameterSets()" to decode the SDP format string into a sequence of (binary) NAL units. (For H.264 video, this will usually be 2 NAL units: the SPS and the PPS.) You can then feed each of these binary NAL unit to your decoder, before it receives the rest of the NAL units (in the network stream). (Depending on your decoder, you may need to prepend each one with a 4-byte 0x00 0x00 0x00 0x01 'start code'.)</div><br class=""><br class=""><div apple-content-edited="true" class="">
<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 class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span>
</div>
<br class=""></body></html>