From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Ogg" |
|---|
| claim | "In Ogg Opus the granule position counts 48 kHz samples whatever the input sample rate; the PCM sample position is granule position minus the OpusHead pre-skip, and the ID header page and the page completing OpusTags have granule 0." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Ogg" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "PCM sample position = granule - pre_skip" |
|---|
| test_vectors | | input | "granule 59,971 on the first audio page, pre-skip 11,971" |
|---|
| expected | "PCM sample position 48,000 (1 s)" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "documentation" |
|---|
| detail | "granule position rules and the worked example" |
|---|
| repo | "https://github.com/xiph/opus" |
|---|
| commit | "51bd2e649f4516d103ab9a7f22a768595621e847" |
|---|
| path | "doc/draft-ietf-codec-oggopus.xml" |
|---|
| lines | "289-300, 490-505" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Ogg Opus granule position and pre-skip" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T20:47:39.009Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:31:03.494Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read draft-ietf-codec-oggopus.xml at 51bd2e6 lines 289-320 and 490-506: ID header page and the page where the comment header completes have granule 0; granule counts 48 kHz samples; PCM position = granule - pre-skip; worked example 59,971 - 11,971 = 48,000. Not stated in the fact: pages without a completed packet carry granule -1." |
|---|
|
|
|---|