Audio Specific Config 在FLV格式中又称 AAC sequence header

位置

FLV [FLV头] [ScriptTag] [AudioTag1【这里】] [VideoTag1]…… [AudioTagN] [VideoTagN]


格式

标记 0 = AAC sequence header, 1 = AAC raw data (1 Byte)

信息 位数
audioObjectType (对象类型) 5 bit
samplingFrequencyIndex (取样频率) 4 bit
channelConfiguration (声道标记) 4 bit
frameLengthFlag (位长度标记) 1 bit
dependsOnCoreCoder 1 bit
extensionFlag 1 bit

audioObjectType (对象类型)

0: Null
1: AAC Main
2: AAC LC (Low Complexity)
3: AAC SSR (Scalable Sample Rate)
4: AAC LTP (Long Term Prediction)
5: SBR (Spectral Band Replication)
6: AAC Scalable
7: TwinVQ
8: CELP (Code Excited Linear Prediction)
9: HXVC (Harmonic Vector eXcitation Coding)
10: Reserved
11: Reserved
12: TTSI (Text-To-Speech Interface)
13: Main Synthesis
14: Wavetable Synthesis
15: General MIDI
16: Algorithmic Synthesis and Audio Effects
17: ER (Error Resilient) AAC LC
18: Reserved
19: ER AAC LTP
20: ER AAC Scalable
21: ER TwinVQ
22: ER BSAC (Bit-Sliced Arithmetic Coding)
23: ER AAC LD (Low Delay)
24: ER CELP
25: ER HVXC
26: ER HILN (Harmonic and Individual Lines plus Noise)
27: ER Parametric
28: SSC (SinuSoidal Coding)
29: PS (Parametric Stereo)
30: MPEG Surround
31: (Escape value)
32: Layer-1
33: Layer-2
34: Layer-3
35: DST (Direct Stream Transfer)
36: ALS (Audio Lossless)
37: SLS (Scalable LosslesS)
38: SLS non-core
39: ER AAC ELD (Enhanced Low Delay)
40: SMR (Symbolic Music Representation) Simple
41: SMR Main
42: USAC (Unified Speech and Audio Coding) (no SBR)
43: SAOC (Spatial Audio Object Coding)
44: LD MPEG Surround
45: USAC


samplingFrequencyIndex (取样频率)

0: 96000 Hz
1: 88200 Hz
2: 64000 Hz
3: 48000 Hz
4: 44100 Hz
5: 32000 Hz
6: 24000 Hz
7: 22050 Hz
8: 16000 Hz
9: 12000 Hz
10: 11025 Hz
11: 8000 Hz
12: 7350 Hz
13: Reserved
14: Reserved
15: frequency is written explictly


channelConfiguration (声道标记)

0: Defined in AOT Specifc Config
1: 1 channel: front-center (单声道)
2: 2 channels: front-left, front-right (双声道)
3: 3 channels: front-center, front-left, front-right
4: 4 channels: front-center, front-left, front-right, back-center
5: 5 channels: front-center, front-left, front-right, back-left, back-right
6: 6 channels: front-center, front-left, front-right, back-left, back-right, LFE-channel (5.1 声场声道)
7: 8 channels: front-center, front-left, front-right, side-left, side-right, back-left, back-right, LFE-channel (7.1 声场声道)
8-15: Reserved


例子

0800 0004 0000 0000 0000 00ae 0012 0800
0000 0f

08 = Audio Tag
00 0004 = 数据区 4位

(头11位 从08 开始,数11位后)
ae 00 12 08

AE = 1010 1110 = AAC, 44100, 16, Mono

00 = AAC sequence header

1208 = 0001 0010 0000 1000

0001 0
audioObjectType = 2 【AAC LC (Low Complexity)】

010 0
samplingFrequencyIndex = 4 【44100 Hz】

000 1
channelConfiguration = 1 【1 channel: front-center】

0
frameLengthFlag = 0 【16 bit】

0
dependsOnCoreCoder = 0 (一直都是0)

0
extensionFlag = 0 (一直都是0)


为毛要有这货,因为每个音频头 的 8 位其实表示不下这些东西。解码时以此为准,钦此。