[Libav-user] SPS PPS header

Michael IV explomaster at gmail.com
Tue Nov 14 17:21:41 EET 2017


Thanks John. Can you tell me where I set that "sample entry "? Is it a part
of sps pps bits?

On Nov 14, 2017 6:07 PM, "John Stebbins" <stebbins at jetheaddev.com> wrote:

On 11/14/2017 03:10 AM, Michael IV wrote:
> Hi. I am not sure about the following setup.
> I create elementary  h264 bitstream using h264 encoder. I append SPS PPS
nals to the start of the stream because I
> stream this raw bitstream to some presentation endpoint. But now I also
have a use case where I wrap that stream into
> mp4 container. Should I still append the SPS PPS header both into the
container header and into the raw bitstream itself?
> I am asking it because some tool which I used to analize the integrity of
produced mp4  show parsing errors in the
> areas of the header and adjacent packets.
>

There are 2 ways defined by the MP4 spec to include SPS and PPS.  The
first, most common, and supported by ffmpeg, is to
put the parameter sets in the MP4 header *only*.  In this type of MP4, the
sample entry type must be set to avc1.  The
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
repeated in the stream before each IDR.  This is useful for adaptive
streaming scenarios where the characteristics of
the video stream may change.  In this type of MP4, the sample entry type
must be avc3.

--
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4
D0F7



_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171114/0b930f1b/attachment.html>


More information about the Libav-user mailing list