Skip to content

Conversation

@heistings
Copy link

@heistings heistings commented Jan 13, 2026

Summary

Forward OPUS_SET_DRED_DURATION_REQUEST and OPUS_GET_DRED_DURATION_REQUEST
to all underlying encoders in the multistream encoder.

Motivation

Currently, applications using libopusenc (Ogg Opus) or the multistream API
cannot enable DRED because the CTL requests are not forwarded to the internal
encoders. This patch fixes that gap.

Testing

Verified in an iOS application using libopusenc -> libopus 1.5.2 with
--enable-dred. After this patch, OPUS_SET_DRED_DURATION() returns OPUS_OK
instead of OPUS_UNIMPLEMENTED.

‼️Note for Maintainers

This fix is particularly important for users of v1.5.2 who are already
using DRED with multistream/Ogg encoding.

Since jumping to v1.6 may be a larger commitment for some users, would
it be appropriate to consider a v1.5.3 patch release that includes this
fix? This would provide a safe upgrade path for users who want the bug
fix without adopting new features.

Related PR: This fix works in conjunction with xiph/libopusenc#38, which forwards the DRED CTL requests from the ope_encoder_ctl() API to the multistream encoder.

Together, these two PRs complete the DRED control path for applications encoding Ogg Opus files:

Application
    ↓ ope_encoder_ctl(OPUS_SET_DRED_DURATION)
libopusenc (PR xiph/libopusenc#38)
    ↓ opus_multistream_encoder_ctl()
opus multistream (this PR)
    ↓ opus_encoder_ctl()
opus encoder (DRED enabled ✓)

Without both fixes, users cannot enable DRED when encoding via the standard Ogg Opus workflow.

Forward OPUS_SET_DRED_DURATION_REQUEST and OPUS_GET_DRED_DURATION_REQUEST
to all underlying encoders in the multistream encoder, enabling DRED
(Deep Redundancy) configuration when using libopusenc or other
multistream-based workflows.

This allows applications using the Ogg Opus encoding pipeline to benefit
from the packet loss resilience features introduced in Opus 1.5.

Signed-off-by: Waterforest Pang <[email protected]>
@jmvalin
Copy link
Member

jmvalin commented Jan 13, 2026

Just curious, what your use case for multi-stream DRED?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants