You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while designing the #618 fix (container → default audio encoder). Split out
because it undoes a deliberate existing choice and is a user-visible behaviour change
in its own right, rather than part of #618's catch-all removal.
The defect
audio_encoder_registry::select_audio_encoder_for_container
(crates/rdlp-ffmpeg/src/ffmpeg/audio_encoder_registry.rs:368) overrides ContainerFormat::Ogg to Opus:
The wiki adds that .ogg was "more recently also been used for Ogg FLAC and for Theora,
too — these uses are deprecated now in favor of .oga and .ogv respectively", with the
rationale given as backwards-compatibility with hardware players.
[RFC 7845] §9 ("Content Type"):
"The RECOMMENDED filename extension for Ogg Opus files is '.opus'."
Neither source forbids Opus-in-.ogg, so this is a conformance/expectation issue
rather than a spec violation. But hardware players that treat .ogg as Vorbis are
exactly the population the Xiph recommendation exists to protect.
Precedent
This is the same class as #538, where --remux=wmv wrote Title.asf. The resolution
there was that the extension the user asked for wins over internal canonicalisation,
and Wmv/Wma/Asf became distinct variants so the spelling survived to the output
filename.
rdlp already has a separate ContainerFormat::Opus mapping to .opus, so a user who
wants Opus has a correct and unambiguous way to ask for it. The override gives Opus to
users who did not ask for it.
Add an Oga variant for .oga (Xiph's extension for non-Vorbis Ogg audio) and
route Opus-in-Ogg there. More complete, larger change, and .oga has poor real-world
player support.
Keep as-is, documenting the deviation explicitly rather than leaving it implicit.
Leaning toward (1) on the #538 precedent, but it is a judgement call about existing
user-visible behaviour, not a clear-cut bug.
Verified vs not
Verified (measured against the linked FFmpeg build, 2026-07-22):
ogg muxer declares vorbis; .opus resolves to the opus muxer declaring opus.
rdlp has no Oga variant; Ogg and Opus are both in is_audio_only().
The Xiph and RFC 7845 quotes above are verbatim from the cited pages.
NOT verified — do not treat as established:
What yt-dlp does by default for .ogg targets. A search was inconclusive; read the
postprocessor source before citing it as prior art either way.
Whether any specific hardware player actually rejects Opus-in-.ogg. The Xiph
rationale asserts the compatibility concern; I did not test a device.
Whether any rdlp user depends on the current Opus behaviour.
Acceptance
A decision recorded among the three options, with rationale
If (1): Ogg resolves via the muxer default; test asserts .ogg → vorbis and .opus → opus, and that the two do not collapse
Behaviour change noted in the changelog if user-visible
Found while designing the #618 fix (container → default audio encoder). Split out
because it undoes a deliberate existing choice and is a user-visible behaviour change
in its own right, rather than part of #618's catch-all removal.
The defect
audio_encoder_registry::select_audio_encoder_for_container(
crates/rdlp-ffmpeg/src/ffmpeg/audio_encoder_registry.rs:368) overridesContainerFormat::Oggto Opus:FFmpeg's
oggmuxer declaresvorbisas its default audio codec (measured:av_guess_format("x.ogg")→ muxerogg,av_guess_codec(AUDIO)→vorbis).So
--recode-audio=autotargeting.oggwrites Opus inside a file whose extensionsignals Vorbis.
Why that's wrong
Xiph.Org — MIME Types and File Extensions:
The wiki adds that
.oggwas "more recently also been used for Ogg FLAC and for Theora,too — these uses are deprecated now in favor of .oga and .ogv respectively", with the
rationale given as backwards-compatibility with hardware players.
[RFC 7845] §9 ("Content Type"):
Neither source forbids Opus-in-
.ogg, so this is a conformance/expectation issuerather than a spec violation. But hardware players that treat
.oggas Vorbis areexactly the population the Xiph recommendation exists to protect.
Precedent
This is the same class as #538, where
--remux=wmvwroteTitle.asf. The resolutionthere was that the extension the user asked for wins over internal canonicalisation,
and
Wmv/Wma/Asfbecame distinct variants so the spelling survived to the outputfilename.
rdlp already has a separate
ContainerFormat::Opusmapping to.opus, so a user whowants Opus has a correct and unambiguous way to ask for it. The override gives Opus to
users who did not ask for it.
Options
Oggresolves to the muxer default (vorbis). Mostconformant; matches the bug(postprocess): --remux wmv produces a .asf file, inverting Microsoft's own naming rule #538 precedent. Cost: quality regression vs Opus for anyone
relying on the current behaviour.
Ogavariant for.oga(Xiph's extension for non-Vorbis Ogg audio) androute Opus-in-Ogg there. More complete, larger change, and
.ogahas poor real-worldplayer support.
Leaning toward (1) on the #538 precedent, but it is a judgement call about existing
user-visible behaviour, not a clear-cut bug.
Verified vs not
Verified (measured against the linked FFmpeg build, 2026-07-22):
oggmuxer declaresvorbis;.opusresolves to theopusmuxer declaringopus.Ogavariant;OggandOpusare both inis_audio_only().NOT verified — do not treat as established:
.oggtargets. A search was inconclusive; read thepostprocessor source before citing it as prior art either way.
.ogg. The Xiphrationale asserts the compatibility concern; I did not test a device.
Acceptance
Oggresolves via the muxer default; test asserts.ogg→ vorbis and.opus→ opus, and that the two do not collapseRefs #618, #538