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

Deadly 提交于 2019-12-20 14:43:10

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/22960928/identify-h264-profile-and-level-from-profile-level-id-in-sdp

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