Format of H.264 decoder configuration record taken from .mp4

蹲街弑〆低调 提交于 2019-12-24 01:54:19

问题


I am inspecting decoder configuration record contained in .mp4 video file recorded from Android devices. Some devices have strange or incorrect parameters written in decoder configuration record.

Here is sample from Galaxy Player 4.0 which is incorrect:

DecoderConfigurationRecord: 010283f2ffe100086742000de90283f201000568ce010f20
       pictureParameterSetNALUnits : 68ce010f20
       AVCLevelIndication : 242
       AVCProfileIndication : 2
       sequenceParameterSetNALUnits : 6742000de90283f2
       lengthSizeMinusOne : 3
       configurationVersion : 1
       profile_compatibility : 131
       profile_idc : 103
       constraint_set : 16
       level_idc : 0

AVCLevelIndication == 242 is wrong because standard states 51 is the highest value.

AVCProfileIndication should be in (66, 77, 88, 100, 120, ..)

profile_compatibility is called constraint_set?_flags and 2 least significant bits are reserved and seposed to be equal to 0

This is how it should look like:

DecoderConfigurationRecord: 0142000dffe100086742000de90283f201000568ce010f20
       pictureParameterSetNALUnits : 68ce010f20
       AVCLevelIndication : 13
       AVCProfileIndication : 66
       sequenceParameterSetNALUnits : 6742000de90283f2
       lengthSizeMinusOne : 3
       configurationVersion : 1
       profile_compatibility : 0
       profile_idc : 103
       constraint_set : 16
       level_idc : 0

How can AVCLevelIndication and AVCProfileIndication be deduced from profile_idc and level_idc ?

Is there a way to check or possibly fix wrong parameters by comparing them to SPS parameters ?


回答1:


level_idc is 10 * level. i.e. if you're using level 3.1, it will be 31.

profile_idc is specified in Annex A of ISO/IEC 14496-10. Baseline profile is 66, Main Profile is 77 and Extended Profile is 88 for example.

Additionally, you can see the syntax for the SPS RBSP and PPS RBSP in section 7.3.2.1 and 7.3.2.2 respectively. Note ue(x) and se(x) indicate unsigned exponential golomb coding and signed exponential golomb coding.

Edit: My apologies. The AVCProfileIndication and AVCLevelIndication should be the same as profile_idc and level_idc



来源:https://stackoverflow.com/questions/11868869/format-of-h-264-decoder-configuration-record-taken-from-mp4

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