MPEG Audio Frame Header 간략정리
- 작성자
- 고친과정
2010년 8월 18일 : 처음씀
1.1. 시작하기전에
우리가 쉽게 접할수 있는 MP3파일에 대한 Frame Header구조를 간단명료하게 정리하였습니다.
1.2. MPEG Audio Frame Header 구조
#define Frame header preview 32bit big endian - AAAAAAAA AAABBCCD EEEEFFGH IIJJKLMM #define Frame header bit index A[31..21] : Frame sync B[20..19] : MPEG audio version indentification C[18..17] : Layer description D[16] : Protection bit E[15..12] : Bitrate index F[11..10] : Sampling rate frequency index G[9] : Padding bit H[8] : Private bit I[7..6] : Channel mode J[5..4] : Mode extension K[3] : Copyright L[2] : Original M[1..0] : Emphasis #define Frame header description A: 11bit - Frame sync (All bit '1') '11111111 111' B: 2bit - MPEG audio version identification '00': MPEG version 2.5 '01': Reserved '10': MPEG version 2.0 (ISO/IEC 13818-3) '11': MPEG version 1.0 (ISO/IEC 11172-3) C: 2bit - Layer description '00': Reserved '01': Layer III '10': Layer II '11': Layer I D: 1bit - Protection bit '0': Protected by CRC (16bit crc follow header) '1': Not protected E: 4bit - Bitrate index See also mpeg_audio_bitrate.txt F: 2bit - Sampling rate frequency index MPEG version 1.0 '00': 44100 '01': 48000 '10': 32000 '11': Reserved MPEG version 2.0 '00': 22050 '01': 24000 '10': 16000 '11': Reserved MPEG version 2.5 '00': 11025 '01': 12000 '10': 8000 '11': Reserved G: 1bit - Padding bit '0': Frame is not padded '1': Frame is padded with one extra slot Layer I frame size ((12000 * Bitrate / Samplerate) + Padding) * 4 Layer II/III frame size (144000 * Bitrate / Samplerate) + Padding H: 1bit - Private bit I: 2bit - Channel mode '00': Stereo '01': Joint stereo (Stereo) '10': Dual channel (Stereo) '11': Single channel (Mono) J: 2bit - Mode extension (Only if joint stereo) Layer I/II '00': Bands 4 to 31 '01': Bands 8 to 31 '10': Bands 12 to 31 '11': Bands 16 to 31 Layer III '00': Intensity stereo off, MS stereo off '01': Intensity stereo on , MS stereo off '10': Intensity stereo off, MS stereo on '11': Intensity stereo on , MS stereo on K: 1bit - Copyright '0': Audio is not copyrighted '1': Audio is copyrighted L: 1bit - Original '0': Copy of original media '1': Original media M: 2bit - Emphasis '00': None '01': 50/15ms '10': Reserved '11': CCIT J.17
1.3. 각 MPEG version 및 Layer에 따른 Bitrate 참조 table
A: MPEG version 1.0, Layer I B: V1,Layer II C: V1,Layer III D: V2,Layer I E: V2, L2 & L3 -: Free format x: Not use (Invalid bitrate !) [A] [B] [C] [D] [E] 0000 - - - - - 0001 32 32 32 32 8 0010 64 48 40 48 16 0011 96 56 48 56 24 0100 128 64 56 64 32 0101 160 80 64 80 40 0110 192 96 80 96 48 0111 224 112 96 112 56 1000 256 128 112 128 64 1001 288 160 128 144 80 1010 320 192 160 160 96 1011 352 224 192 176 112 1100 384 256 224 192 128 1101 416 320 256 224 144 1110 448 384 320 256 160 1111 x x x x x