Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

sip - Identify h264 profile and level from profile-level-id in sdp?

In a SIP video call, the receiver of the video stream respond with the capabilities of its decoder.

The parameter which defines that is the profile-level-id. Here is an example value of the profile-level-id parameter: 428014

RFC 6184 defined that as

A base16 [7] (hexadecimal) representation of the following three bytes in the sequence parameter set NAL unit is specified in 1: 1) profile_idc, 2) a byte herein referred to as profile-iop, composed of the values of constraint_set0_flag, constraint_set1_flag, constraint_set2_flag, constraint_set3_flag, constraint_set4_flag, constraint_set5_flag, and reserved_zero_2bits in bit- significance order, starting from the most-significant bit, and 3) level_idc.

According to that, the following parameters from the example value can be identified:

  • profile_idc 42
  • profile-iop 82
  • level-idc 14

How to relate those numbers to the profiles and levels defined for h264?

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

For such things you should read actual H.264 spec not Wikipedia. Using it you can parse your example as

  • profile_idc 0x42 == 66 so it is Baseline profile
  • profile-iop 0x80 mean constraint_set0_flag=1 (so it is Constrained Baseline profile) and others 0
  • level-idc 0x14 == 20 so it is Level 2.0

So result is Constrained Baseline profile Level 2.0


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...