サウンド_MP3_圧縮 - hsk/swfspec_ja GitHub Wiki
MP3 圧縮
MP3 sound data
MP3サウンドデータは、次の表で説明されています:
| フィールド | 型 | コメント |
|---|---|---|
| SeekSamples | SI16 | Number of samples to skip. |
| Mp3Frames | MP3FRAME[zero or more] | Array of MP3 frames. |
SeekSamplesフィールドの説明については、「サウンドをストリーミングするためのフレーム細分割」を参照してください。 注:イベントサウンドの場合、SeekSamplesは、初期の待ち時間を指定することに限定されている。
MP3 frame
MP3FRAMEレコードは正確にあなたがMP3音楽ファイルで見つけるだろうMPEGオーディオフレームに対応する。 フレームの最初の32ビットは、符号化されたオーディオサンプルであるバイトの配列に続く、ヘッダ情報を含む。
| フィールド | 型 | コメント |
|---|---|---|
| Syncword | UB[11] | Frame sync. All bits must be set. |
| MpegVersion | UB[2] | MPEG2.5 is an extension to MPEG2 that handles very low bitrates, allowing the use of lower sampling frequencies. 0 = MPEG Version 2.5; 1 = reserved; 2 = MPEG Version 2; 3 = MPEG Version 1 |
| Layer | UB[2] | Layer is always equal to 1 for MP3 headers in SWF files. The “3” in MP3 refers to the Layer, not the MpegVersion.: 0 = reserved; 1 = Layer III; 2 = Layer II; 3 = Layer I |
| ProtectionBit | UB[1] | If ProtectionBit == 0, a 16-bit CRC follows the header: 0 = Protected by CRC; 1 = Not protected |
| Bitrate | UB[4] | Bitrates are in thousands of bits per second. For example, 128 means 128000 bps. |
| SamplingRate | UB[2] | Sampling rate in Hz. Value MPEG1 MPEG2.xMPEG2.5---------------------0 44100 22050 110251 48000 24000 120002 32000 16000 8000-- -- -- |
| PaddingBit | UB[1] | Padding is used to fit the bitrate exactly. 0 = frame is not padded; 1 = frame is padded with one extra slot |
| Reserved | UB[1] | ~ |
| ChannelMode | UB[2] | Dual-channel files are made of two independent mono channels. Each one uses exactly half the bitrate of the file. 0 = Stereo; 1 = Joint stereo (Stereo); 2 = Dual channel; 2 = Single channel (Mono) |
| ModeExtension | UB[2] | ~ |
| Copyright | UB[1] | 0 = Audio is not copyrighted; 1 = Audio is copyrighted |
| Original | UB[1] | 0 = Copy of original media; 1 = Original media |
| Emphasis | UB[2] | 0 = none; 1 = 50/15 ms; 2 = reserved; 3 = CCIT J.17 |
| SampleData | UB[size of sample data*] | The encoded audio samples |
*サンプルデータのサイズは(整数演算を使用して)次のように計算される。
Size = (((MpegVersion == MPEG1 ? 144 : 72) * Bitrate) / SamplingRate) + PaddingBit - 4
例えば:128000のビットレート、44100のサンプリングレート、および1のPaddingBitのMPEG1フレームのサンプルデータのサイズは、次のとおりです:
Size = (144 * 128000) / 44100 + 1 – 4 = 414 bytes
移動
- 前のページ : ADPCM 圧縮
- 次のページ : Nellymoser 圧縮