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

前端 未结 2 1857
既然无缘
既然无缘 2020-12-29 15:19

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

相关标签:
2条回答
  • 2020-12-29 15:39

    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

    0 讨论(0)
  • 2020-12-29 15:41

    Refer to following table from RFC 6184: Table 5. Combinations of profile_idc and profile-iop representing the same sub-profile corresponding to the full set of coding tools supported by one profile. In the following, x may be either 0 or 1, while the profile names are indicated as follows. CB: Constrained Baseline profile, B: Baseline profile, M: Main profile, E: Extended profile, H: High profile, H10: High 10 profile, H42: High 4:2:2 profile, H44: High 4:4:4 Predictive profile, H10I: High 10 Intra profile, H42I: High 4:2:2 Intra profile, H44I: High 4:4:4 Intra profile, and C44I: CAVLC 4:4:4 Intra profile.

          Profile     profile_idc        profile-iop
                      (hexadecimal)      (binary)
    
          CB          42 (B)             x1xx0000
             same as: 4D (M)             1xxx0000
             same as: 58 (E)             11xx0000
          B           42 (B)             x0xx0000
             same as: 58 (E)             10xx0000
          M           4D (M)             0x0x0000
          E           58                 00xx0000
          H           64                 00000000
          H10         6E                 00000000
          H42         7A                 00000000
          H44         F4                 00000000
          H10I        6E                 00010000
          H42I        7A                 00010000
          H44I        F4                 00010000
          C44I        2C                 00010000
    

    It is Baseline Profile Level 2.0.

    0 讨论(0)
提交回复
热议问题