H264 Profiles in CTS 1.7(4)

Blog

Aug 31, 2011 2:14 PM
Aug 31st, 2011

H.264 Profiles are discussed in depth in the web, but I will focus in the profile-level-id as we can get information for resolution which is the most common request for most of the users.

http://en.wikipedia.org/wiki/H.264#Levels

Profile level ID string is divided into 3 substrings, each 2 characters long:

[PROFILE IDC][PROFILE IOP][LEVEL IDC]

Each substring represents one byte in base16! So, if Profile IDC is 28, that means it is actually 40 in base10.

Later you will use base10 values to construct AVC Decoder Configuration Record

RFC 3984 defines this (page 38).

http://tools.ietf.org/html/rfc3984

"If the profile-level-id parameter is used for capability exchange or session setup procedure, it indicates the profile that the codec supports and the highest level supported for the signaled profile.

The profile-iop byte indicates whether the codec has additional limitations whereby only the common subset of the algorithmic features and limitations of the profiles signaled with the profile-iop byte and of the profile indicated by profile_idc is supported by the codec.

Profile-iop byte is composed of the values of constraint_set0_flag, constraint_set1_flag, constraint_set2_flag, constraint_set3_flag, and reserved_zero_4bits in bit-significance order, starting from the most significant bit.

A level to which the bitstream conforms shall be indicated by the syntax elements level_idc and constraint_set3_flag as follows:

–   If level_idc is equal to 11 and constraint_set3_flag is equal to 1, the indicated level is level 1b.

–   Otherwise (level_idc is not equal to 11 or constraint_set3_flag is not equal to 1), level_idc shall be set equal to a value of ten times the level number specified in Table A-1 and constraint_set3_flag shall be set equal to 0.

For example, if a codec supports only the common subset of the coding tools of the Baseline profile and the Main profile at level 2.1 and below, the profile-level-id becomes 42E015, in which 42 stands for the Baseline profile, E0 indicates that only the common subset for all profiles is supported, and 15 indicates level 2.1."

How does the 15 convert to level 2.1?

Page 298 of the ITU spec for H.264 documents how to convert this hex value into a level.

This means to covert the last byte you convert the hex to decimal and divide it by 10. 0x15 = decimal 21 = level 2.1

Level limits for each are documented at table A-1 of the H.264 ITU spec linked below.

http://www.itu.int/rec/T-REC-H.264/en

Real life example:

In our Cisco CTS system 1.7.4 we support interoperability with other Cisco endpoints or devices. Please check URL below for further information

about which devices are tested.

http://www.cisco.com/en/US/docs/telepresence/interop/interop_1_7_4.html#wp108777

In this example we are experiencing a problem calling from Cisco CTS system to a third party Video solution.

In this case there is no Video display in Cisco CTS system. We collected packet captures and SIP logs from Cisco CTS and this is what we found:

From packet capture:

Call from Cisco CTS 1.7.4 to BJN

Call flow:

Cisco CTS --> CUCM -- SIP --> VCS -- H323 --> VCS-E --H323 --> BJN

Problem:

No Video in CTS

From CTS to Remote end:

By analyzing SIP SDP message:


Media Attribute (a): fmtp:97 profile-level-id=42001F;packetization-mode=0;max-mbps=108000;max-fs=3600;max-br=4000

Media Attribute (a): imageattr:97 send [x=1280,y=720,q=0.6] [x=640,y=368] [x=352,y=288]

                                                           recv [x=1280,y=720,q=0.6] [x=768,y=488] [x=640,y=368] [x=352,y=288] [x=352,y=240]

From Remote end to CTS:

Media Attribute (a): fmtp:96 profile-level-id=428016;max-mbps=108500;max-fs=3840;max-smbps=108500

From CTS: profile-level-id=42 00 1F

From BJN: profile-level-id=42 80 16

[PROFILE IDC]

CTS: 42 = 66

BJN: 42 = 66

Each substring represents one byte in base16! So, if Profile IDC is 42, that means it is

actually 66 in base10. (66=baseline, 77=main, 100=high)

[PROFILE IOP]

CTS: 0000 0000 = 00

BJN: 1000 0000 = 80

If bit 7 (the most significant bit), bit 6, or bit 5 of profile-iop is equal to 1, all constraints of the Baseline profile, the Main profile, or the Extended profile, respectively, are obeyed in the NAL unit stream.

[LEVEL IDC]

CTS: 1F = 31 = 3.1 = 720×480@80.0 (13) 720×576@66.7 (11) 1280×720@30.0 (5)

BJN: 16 = 22 = 2.2 = 352×480@30.7(10) 352×576@25.6 (7) 720×480@15.0 (6) 720×576@12.5 (5)

As seen before, resolution coming from remote end does not match what CTS is expecting, no video displayed.

Average Rating: 0 (0 ratings)

Comments

kocsissandor Wed, 09/07/2011 - 09:16

Hi, i have a same problem with EX90. If i call a simple H264 video announcement in my Genesys SIP Server, it doesnt work. I dont understand one thing. It doesnt matter that there is a mismatch in the Profile IOP?

[PROFILE IOP]

CTS: 0000 0000 = 00

BJN: 1000 0000 = 80

EX90 tells:

a=rtpmap:97 H264/90000

a=fmtp:97 profile-level-id=428014;max-br=3333;max-mbps=245000;max-fs=9000;max-smbps=245000;max-fps=6000

a=rtpmap:98 H264/90000

a=fmtp:98 profile-level-id=428014;max-br=3333;max-mbps=245000;max-fs=9000;max-smbps=245000;packetization-mode=1;max-fps=6000

But i converted my sample video file to 4200xx (42000d for example) format. Is this wrong? I must use this format, because Genesys says: its highly recommended to use this profile-level-id.

Another thing i should focus on, the packetization mode. I tested my h264 video feature with Counterpath Bria softphone and in Bria everything works fine. I cant set in my encoder ( i use mencoder to create h264 videos ) this packetization mode, but when i captured the stream with wireshark, i found  the FU identifier Type: FU-A. What does it mean?

I dont understand this two thing..

Alex

Actions

Login or Register to take actions

This Blog

Posted August 31, 2011 at 2:14 PM
Stats:
Comments:1 Avg. Rating:0
Views:5361   
Shares:0

Related Content

Blogs Leaderboard