According to RFC 6184:

Annex B of H.264 defines an encapsulation process to transmit such NALUs over bytestream-oriented networks. In the scope of this memo, Annex B is not relevant.

I see a lot of examplex, including in RFC6236, of SPS/PPS like this

a=fmtp:99 packetization-mode=0;profile-level-id=42e011; \
      sprop-parameter-sets=Z0LgC5ZUCg/I,aM4BrFSAa  

However, according to H.264, Annex B, there should be no comma, and a preamble must be added to the beginning of both SPS and PPS (and after that SPS/PPS is converted to base 64).

So I don't understand what is the right thing to do.

有帮助吗?

解决方案 3

comma should be there. prefix is for MPEG-2 only.

其他提示

The comma separates SPS and PPS. They are two separate units (in Annex B format).

seperate the sps and the pps to two byte arrays. convert them to base 64. add the prefix '001' to each one.

The short answer is above and these are specification references:

RFC 3984:

sprop-parameter-sets:

This parameter MAY be used to convey any sequence and picture parameter set NAL units (herein referred to as the initial parameter set NAL units) that MUST precede any other NAL units in decoding order. The parameter MUST NOT be used to indicate codec capability in any capability exchange procedure. The value of the parameter is the base64 [6] representation of the initial parameter set NAL units as specified in sections 7.3.2.1 and 7.3.2.2 of [1]. The parameter sets are conveyed in decoding order, and no framing of the parameter set NAL units takes place. A comma is used to separate any pair of parameter sets in the list. Note that the number of bytes in a parameter set NAL unit is typically less than 10, but a picture parameter set NAL unit can contain several hundreds of bytes.

Where [1] above is H.264 spec reference, and its 7.3.2.1 and 7.3.2.2 sections define bitstream without start code prefixes.

7.3.2 Raw byte sequence payloads and RBSP trailing bits syntax 7.3.2.1 Sequence parameter set RBSP syntax 7.3.2.2 Picture parameter set RBSP syntax

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top