When do we need to add header to each audio frame

2019-06-03 08:22发布

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 ?

1条回答
疯言疯语
2楼-- · 2019-06-03 09:11

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.

查看更多
登录 后发表回答