我们什么时候需要头添加到每个音频帧 [英] When do we need to add header to each audio frame

查看:191
本文介绍了我们什么时候需要头添加到每个音频帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了分离与视频(MP4),音频(AAC)。据我所知,AAC,可写入文件之前,如果播放并添加仅是从MP4文件读取每个数据包的AAC ADTS头。

I've done detaching audio (aac) from video (mp4). As I know, aac can play if and only each aac packet which is read from mp4 file is added ADTS header before writing to file.

我想知道什么时候/我们需要添加头(其中音频格式)?

I want to know when/ (which audio format) we need to add header ?

推荐答案

这取决于codeC /容器组合。 AAC(如你所知)总是需要一个头。在.AAC容器,有一个ADTS头标每一帧。在.MP4有一个头音频特定的配置在 mdhd 框。另一方面MP3总是具有每帧的报头,无论该容器。 $ C $立方厘米容器组合的数目是巨大的​​和不切实际的堆栈溢出格式列出

It depends on the codec/container combination. AAC (as you know) Always requires a header. In the .aac container, there is a ADTS header every frame. In .mp4 there is a single header Audio Specific Config in the mdhd box. MP3 on the other hand always has a header per frame no matter the container. The number of codec container combinations is enormous and impractical to list in the stack overflow format.

这篇关于我们什么时候需要头添加到每个音频帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆