From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Ogg" |
|---|
| claim | "The Ogg Opus identification header (RFC 7845) is "OpusHead", version 1, channel count, pre-skip (u16, 48 kHz samples), input sample rate (u32, informational), output gain (s16, Q7.8 dB) and channel mapping family (u8): 19 bytes for family 0; other families append stream count, coupled count and a channel mapping table." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Ogg" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "OpusHead" |
|---|
| size | "0x13" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 8 |
|---|
| type | "char[8]" |
|---|
| name | "magic" |
|---|
| notes | ""OpusHead"" |
|---|
|
| offset | "0x8" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "version" |
|---|
| notes | "1; upper nibble = major (accept <= 15)" |
|---|
|
| offset | "0x9" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "channel_count" |
|---|
| notes | "not 0" |
|---|
|
| offset | "0xA" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "pre_skip" |
|---|
| notes | "48 kHz samples to drop; also subtracted from granule positions" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "input_sample_rate" |
|---|
| notes | "informational only" |
|---|
|
| offset | "0x10" |
|---|
| size | 2 |
|---|
| type | "int16_t" |
|---|
| name | "output_gain" |
|---|
| notes | "Q7.8 dB" |
|---|
|
| offset | "0x12" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "channel_mapping_family" |
|---|
| notes | "0 mono/stereo, 1 Vorbis order up to 8 ch, 255 undefined; non-zero: stream_count, coupled_count, mapping[channel_count] follow" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "Identification Header figure and field definitions" |
|---|
| repo | "https://github.com/xiph/opus" |
|---|
| commit | "51bd2e649f4516d103ab9a7f22a768595621e847" |
|---|
| path | "doc/draft-ietf-codec-oggopus.xml" |
|---|
| lines | "639-835" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "parsed from a generated sample by the Python dumper (Code:Ogg/Ogg page and packet dumper (Python))" |
|---|
|
| type | "documentation" |
|---|
| detail | "Pre-skip (16 bits, unsigned, little endian), Input Sample Rate (32 bits, unsigned, little endian), Output Gain (16 bits, signed, little endian)" |
|---|
| repo | "https://github.com/xiph/opus" |
|---|
| commit | "51bd2e649f4516d103ab9a7f22a768595621e847" |
|---|
| path | "doc/draft-ietf-codec-oggopus.xml" |
|---|
| lines | "713-770" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "OpusHead" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T20:47:38.941Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:25:13.383Z" |
|---|
| summary | "State the byte order: pre_skip, input_sample_rate and output_gain are little-endian (RFC 7845); data.endianness was missing." |
|---|
| changed | |
|---|
|
|
|---|