Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<ol> <li><p>You should write SPS and PPS at the start of stream, and only when they change in the middle of stream.</p></li> <li><p>SPS and PPS frames are packed in a STAP NAL unit (generally STAP-A) with NAL type 24 (STAP-A) or 25 (STAP-B) STAP format is described in <a href="http://tools.ietf.org/html/rfc3984#section-5.7" rel="noreferrer">RFC-3984 section 5.7.1</a></p></li> <li><p>Don't rely on marker bit, use start bit and end bit in NAL header.</p></li> <li><p>For fragmented video frames you should regenerate NAL unit using 3 NAL unit bits of first fragment (F, NRI) combined with 5 NAL type bits of first byte in payload (only for packets with start bit set to 1) check <a href="http://tools.ietf.org/html/rfc3984#section-5.8" rel="noreferrer">RFC-3984 section 5.8</a>:</p> <blockquote> <p>The NAL unit type octet of the fragmented NAL unit is not included as such in the fragmentation unit payload, but rather the information of the NAL unit type octet of the fragmented NAL unit is conveyed in F and NRI fields of the FU indicator octet of the fragmentation unit and in the type field of the FU header.</p> </blockquote></li> </ol> <p><strong>EDIT:</strong> more explanation about NAL unit construction for fragmentation units:</p> <p>this is first two bytes of a FU-A payload (right after rtp header):</p> <pre><code>| FU indicator | FU header | +---------------+---------------+ |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |F|NRI| Type |S|E|R| Type | +---------------+---------------+ </code></pre> <p>to construct the NAL unit you should take "Type" from "FU Header" and "F" and "NRI" from "FU indicator"</p> <p><a href="https://github.com/hawell/rcpplus/blob/master/src/rtp.c" rel="noreferrer">here</a> is a simple implementation</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload