Skip to content

Bug: --upmix=surround is ignored when Virtual Cable is configured as 5.1 in Windows (Channel Detection Logic Flaw) #6

Description

@r0jooo

There is a logical flaw in how the encoder detects input streams to determine if upmixing should be applied. Currently, the encoder checks if the input source has exactly 2 channels before applying the upmix matrix, using a condition like

if (input_channels == 2 && config.upmix == UpmixMode::Surround).

The problem is that to bypass Windows downmixing and to capture native 5.1 audio whenever it is available from sources like Netflix, users must configure the virtual recording device (CABLE Output / VB-Audio Virtual Cable) as a 5.1 / 6-channel endpoint in the Windows Sound Control Panel.

When the virtual cable is configured this way, input_channels is detected as 6 by the application, regardless of whether the actual source audio playing - such as YouTube or a stereo browser stream - is just 2-channel Stereo. Windows simply pads the remaining 4 channels with digital silence. Because input_channels equals 6, the condition input_channels == 2 evaluates to false. As a result, the upmix filter is completely bypassed, and stereo audio is sent as an AC3 5.1 stream containing only Left and Right signals, with Center, Rear, and LFE channels completely muted.

Hardware receivers, such as the Logitech Z-5500, detect the incoming Dolby Digital 5.1 flag and lock out their own internal upmixers like Dolby Pro Logic II, leaving the user with sound from only two speakers. To reproduce this, you can configure CABLE Input and CABLE Output as 5.1 Surround in Windows, set upmix to surround in the encoder configuration, and play a 2-channel Stereo source. The encoder will output an AC3 5.1 stream, but only L/R channels will contain audio because the upmix code was bypassed. If you change the Windows sound device configuration back to Stereo and restart the encoder, the upmix matrix triggers correctly and audio fills all 5.1 speakers.

To solve this, instead of tying the upmix logic to the hardware device channel count, the configuration flag should take priority, or the encoder should inspect the actual active stream layout rather than the Windows endpoint configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions