[Libav-user] SPS PPS header
stebbins at jetheaddev.com
Tue Nov 14 17:07:17 EET 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the Libav-user