Mamuka Sakhelashvili
Mamuka Sakhelashvili

Reputation: 11

H264 Annex B NALU type

I have Annex B formated data and I want to convert it to AvcC. As I read here to construct Avcc format you should have SPS and PPS type NALUs. But I'm receiving these bytes as Annex B formated data which doesn't have neither SPS nor PPS type NALUs. So I'm confused how am I going to convert these Annex B bytes to Avecc: Hex data: 00 00 00 01 41 9A 20 22 80 53 E1 80

So type number of this NALU is 1 and type 1 is neither SPS nor PPS.

Upvotes: 1

Views: 2890

Answers (1)

szatmary
szatmary

Reputation: 31100

Video is unplayable until you receive and SPS, PPS and IDR (or enough I slices if the stream uses intra refresh, very unlikely). Basically that NALU is worthless. Ignore everything until you have the data you need.

I sort of cover that in the post you referenced:

In these formats it is common to repeat the SPS and PPS periodically, usually preceding every IDR thus creating a random access point for the decoder. This enables the ability to join a stream already in progress.

Upvotes: 1

Related Questions