问题描述
我已经做了分离与视频(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.
这篇关于我们什么时候需要头添加到每个音频帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!