Can profile-level-id and sprop-parameter-sets be extracted from an RTP stream?

假如想象 提交于 2019-12-03 16:13:45

You can extract the profile-level-id from the Sequence Parameter Set NAL Unit (if, in fact, the parameter sets are even being sent in the stream), it's the first 3 bytes after the NAL header. i.e. the first four bytes of the SPS NAL unit from a Baseline Profile stream with level 3.0 would look like this:

67 42 00 1E

Disregard the first byte, this just indicates that it is an SPS NAL Unit (0x67 & 0x1F == 0x7 SPS is NAL Type 7, PPS is NAL Type 8). The other 3 bytes give you the profile, constraint flags, and level (in fact, it's simply level times 10 in the 3rd byte).

sprop-parameter-sets is the Base64 encoded Sequence Parameter Sets and Picture Parameter Sets, separated by commas. So just Base64 encode the SPS and PPS NAL Units (Nal type 7 and NAL type 8) and separate by comma and you should be good to go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!