Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
520 views
in Technique[技术] by (71.8m points)

h.264 - H264 with multiple PPS and SPS

I have a card that produces a H264 stream with a SPS (Sequence Parameter Set) and a PPS (Picture Parameter Set), in that order, directly before each I-Frame. I see that most H264 streams contain a PPS and SPS at the first I-Frame.

Is this recommended? Do decoders/muxers typically support multiple PPS and SRS?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

H.264 comes in a variety of stream formats. One variation is called "Annex B".

(AUD)(SPS)(PPS)(I-Slice)(PPS)(P-Slice)(PPS)(P-Slice) ... (AUD)(SPS)(PPS)(I-Slice).

Typically you see SPS/PPS before each I frame and PPS before other slices.

Most decoders/muxers are happy with "Annex B" and the repetition of SPS/PPS.

Most decoders/muxers won't do anything meaningful if you change the format and SPS/PPS midstream.

Most decoders/muxers parse the first SPS/PPS as part of a setup process and ignore subsequent SPSs.

Some decoders/muxers prefer H.264 without the (AUD), start codes and SPS/PPS. Then you have to feed SPS/PPS out of band as part of setting up the decoders/muxers.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...