博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[mp4]The audio codec for mp4 atom
阅读量:4130 次
发布时间:2019-05-25

本文共 2568 字,大约阅读时间需要 8 分钟。

In the 'esds' atom there are a few fields of relevance to determining the codec used. The first byte of content of the esds atom is the objectTypeIndication. (This is the 11th byte from your solution.) This field is supposed to indicate the codec used but annoyingly there are a few entries used by multiple codecs. . From the list a few are relevant in this case.:

  • 0x40 - MPEG-4 Audio
  • 0x6B - MPEG-1 Audio (MPEG-1 Layers 1, 2, and 3)
  • 0x69 - MPEG-2 Backward Compatible Audio (MPEG-2 Layers 1, 2, and 3)
  • 0x67 - MPEG-2 AAC LC

0x6B and 0x69 denote MPEG-1 and 2 respectively layers 1, 2, and 3. 0x67 denotes MPEG-2 AAC LC but generally is unused in favor of 0x040 (0x66 and 0x68 are also MPEG-2 AAC profiles are seen even less frequently). 0x40 denotes MPEG-4 Audio. MPEG-4 Audio generally is thought of as AAC but there is a whole framework of audio codecs that can go in MPEG-4 Audio including AAC, BSAC, ALS, CELP, and something called MP3On4. MP3On4 is an MP3 variant with some new header information for multichannel.

We can figure out what audio format is actually in the MPEG-4 Audio by looking at the the AudioSpecificConfig. This is the global header for the decoder that exists at byte 13 of the content of the 'esds' atom.【ss:不是在byte 13,具体需要将esds字段解析,得到MP4DecSpecificDescr的data,video&audio是一样的,一般来说,11th为objectTypeIndication,11th+13th即24th为MP4DecSpecificDescr:起始码为0x05,后面跟的是size(data-size),然后为data。At the begining of the AudioSpecificConfig there is a 5-bit AudioObjectType. A full list can be found on the multimedia wiki (that was linked in your post under the 'MPEG-4 Audio' article <http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio> but here are the useful values:

  • 00 - NULL
  • 01 - AAC Main (a deprecated AAC profile from MPEG-2)
  • 02 - AAC LC or backwards compatible HE-AAC (Most realworld AAC falls in one of these cases)
  • 03 - AAC Scalable Sample Rate (rarely used)
  • 03 - AAC LTP (a replacement for AAC Main, rarely used) 【ss:应该为04】
  • 05 - HE-AAC explicitly signaled (Non-backward compatible)
  • 22 - ER BSAC (A Korean broadcast codec)
  • 23 - Low Delay AAC
  • 29 - HE-AACv2 explicitly signaled (In one draft this was MP3On4 instead)
  • 31 - ESCAPE (read 6 more bits, add 32)
  • 32 - MP3on4 Layer 1
  • 33 - MP3on4 Layer 2
  • 34 - MP3on4 Layer 3

If you aren't worried about 'MP3On4' mp3 variant nor the other weird MPEG-4 Audio codecs then just use the objectTypeIndication.

In the MPEG specifications these details are spread across 14496-1, -12, -14, and -3. Of these only 14496-12 is freely available. <http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html>

参考:

转载地址:http://ccdvi.baihongyu.com/

你可能感兴趣的文章
前后台传值request.getParameter方法中文乱码问题的解决办法
查看>>
node.js安装及使用教程(hello world示例)
查看>>
纯css实现table滚动条(纯css实现div滚动条)
查看>>
jquery 设置disabled与去掉disabled属性的方法
查看>>
DIV居中(水平居中及垂直居中)实现代码
查看>>
Mybatis遇到No constructor found in ....的解决方法
查看>>
tomcat启动控制台中文乱码问题解决方法
查看>>
隐藏tomcat版本号/修改tomcat版本号
查看>>
tomcat安全加固手册
查看>>
tomcat指定项目路径(tomcat访问项目不带项目名称)
查看>>
tomcat设置窗口标题名字
查看>>
tomcat指定jdk路径
查看>>
oracle用命令执行sql脚本文件
查看>>
js定制器启动与停止
查看>>
create table as select from和 insert into select from的用法
查看>>
java.lang.IllegalArgumentException: Request header is too large 解决方法
查看>>
word图片批量添加题注(序号)的方法
查看>>
input输入框,只输入数字的控制方法
查看>>
oracle case when then else 语法
查看>>
eclipse 显示内存使用情况
查看>>