Skip to content

"Use AC3 for surround sound audio" transcodes to AAC 2.0 since v1.0.9 (branches swapped in video transcoding profile) #2093

Closed

Description

@andrewxhang

Description

Since v1.0.9, the experimental setting "Use AC3 for surround sound audio" does the opposite of what it should for video. When it is on, surround audio is transcoded to AAC 2.0 instead of AC3 5.1. Downgrading to v1.0.8 with the same server and settings brings AC3 5.1 back.

The cause looks like the refactor of the video transcoding profile in #1955 (559abe2). In util/profile/DeviceProfileUtils.kt, the preferAc3ForSurround branches were swapped:

v1.0.8:

if (preferAc3ForSurround) {
    transcodingProfile { /* VIDEO ... */ audioCodec(Codec.Audio.AC3) }
} else {
    transcodingProfile { /* VIDEO ... */ audioCodec(*allowedAudioCodecs) }
}

v1.0.9 / current main:

if (preferAc3ForSurround) {
    audioCodec(*allowedAudioCodecs)
} else {
    audioCodec(Codec.Audio.AC3)
}

When the setting is on, the profile also caps every non-AC3 codec at 2 channels. So the server picks the first allowed codec (AAC) and downmixes it to stereo. When the setting is off, every video transcode is forced to AC3. The audio-only transcoding profile just below it is still correct (AC3 when on, AAC when off).

Suggested fix: swap the two branches back in the video transcodingProfile.

Reproduction steps

  1. Turn on Experimental settings, then "Use AC3 for surround sound audio".
  2. Play a video with a 5.1 audio track the device can't direct play, such as E-AC-3 or AAC 5.1.
  3. In the server dashboard, the transcode is aac, 2 channels, with reasons AudioCodecNotSupported, AudioChannelsNotSupported.
  4. Install v1.0.8 and do the same: the transcode is ac3, 6 channels.

Experimental settings

Yes

App Version

v1.0.9 (1.0.9-0-g2d87d526). Works in v1.0.8.

Server Version

12.2.0. I also confirmed v1.0.8 works correctly on 12.2.0, so this is not caused by the server.

Device

TCL 65P725 (Android TV, armeabi-v7a)

Activity

  1. damontecres commented on Oct 19, 2026

    @damontecres
    Owner

    Thanks, this was originally reported in #2090, but he closed it before I verified the fix.

    So #2101 will fix this.

  2. added a commit that references this issue on Oct 19, 2026
    ebf4469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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