h.264 - 从 .mp4 中获取的 H.264 解码器配置记录的格式

标签 h.264 mp4 codec

我正在检查从 Android 设备录制的 .mp4 视频文件中包含的解码器配置记录。某些设备在解码器配置记录中写入了奇怪或不正确的参数。

这是来自 Galaxy Player 4.0 的示例,但不正确:

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 是错误的,因为标准状态 51 是最高值。

AVCProfileIndication 应该在 (66, 77, 88, 100, 120, ..)

profile_compatibility 被称为 constraint_set?_flag 并且 2 个最低有效位被保留并设置为等于 0

它应该是这样的:

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

AVCLevelIndicationAVCProfileIndication 如何从 profile_idclevel_idc 推导出来?

有没有办法通过将它们与 SPS 参数进行比较来检查或可能修复错误的参数?

最佳答案

level_idc10 * level。即,如果您使用的是级别 3.1,它将是 31

profile_idcISO/IEC 14496-10 的附录 A 中指定。例如,Baseline profile 是 66,Main Profile 是 77,Extended Profile 是 88

此外,您可以分别在 7.3.2.1 和 7.3.2.2 节中查看 SPS RBSP 和 PPS RBSP 的语法。注意ue(x)se(x)表示无符号指数哥伦布编码和有符号指数哥伦布编码。

编辑:我很抱歉。 AVCProfileIndicationAVCLevelIndication 应该与 profile_idclevel_idc

相同

关于h.264 - 从 .mp4 中获取的 H.264 解码器配置记录的格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11868869/

相关文章:

video - FFMPEG - 将 MKV 转换为带有所有流(字幕)和水印的 MP4

python - 如何识别 Python3 中的视频格式?

c# - 在 Ubuntu 中没有可用于格式 GIF 的编解码器

javascript - Node.js:获取一个mp4文件的音视频格式信息

signal-processing - RaptorQ 开源实现

ffmpeg - 当图片复杂度增加时,WebRTC 流卡住

flash - MP4 视频略微异步 - 但仅在初始播放时

ffmpeg - 静止图像到视频以供存储 - 但返回静止图像以供查看

h.264 - IDR与非IDR的区别

android - 如何在Android中播放mp4文件中的声音?