<div dir="auto"><div>Thanks John. Can you tell me where I set that "sample entry "? Is it a part of sps pps bits?  <br><div class="gmail_extra"><br><div class="gmail_quote">On Nov 14, 2017 6:07 PM, "John Stebbins" <<a href="mailto:stebbins@jetheaddev.com">stebbins@jetheaddev.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On 11/14/2017 03:10 AM, Michael IV wrote:<br>
> Hi. I am not sure about the following setup.<br>
> I create elementary  h264 bitstream using h264 encoder. I append SPS PPS nals to the start of the stream because I<br>
> stream this raw bitstream to some presentation endpoint. But now I also have a use case where I wrap that stream into<br>
> mp4 container. Should I still append the SPS PPS header both into the container header and into the raw bitstream itself?<br>
> I am asking it because some tool which I used to analize the integrity of produced mp4  show parsing errors in the<br>
> areas of the header and adjacent packets.<br>
><br>
<br>
</div>There are 2 ways defined by the MP4 spec to include SPS and PPS.  The first, most common, and supported by ffmpeg, is to<br>
put the parameter sets in the MP4 header *only*.  In this type of MP4, the sample entry type must be set to avc1.  The<br>
second way allows the SPS and PPS to be in the MP4 header and inline in the stream.  In this case SPS and PPS may be<br>
repeated in the stream before each IDR.  This is useful for adaptive streaming scenarios where the characteristics of<br>
the video stream may change.  In this type of MP4, the sample entry type must be avc3.<br>
<font color="#888888"><br>
--<br>
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7<br>
<br>
<br>
</font><br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div></div></div>