Skip to content

Fix inverted audio codecs in video transcoding profile - #2090

Closed
StefanBS wants to merge 1 commit into
damontecres:mainfrom
StefanBS:fix-video-transcode-audio-codec
Closed

StefanBS wants to merge 1 commit into
damontecres:mainfrom
StefanBS:fix-video-transcode-audio-codec

Conversation

@StefanBS

Copy link
Copy Markdown
Contributor

Summary

#1955 swapped the preferAc3ForSurround branches in the video transcoding profile, so by default every video transcode was AC3-only. Devices that can't decode or pass through AC3 play video with no audio. Music isn't affected because its transcoding profile was refactored correctly.

 transcodingProfile(VIDEO)
   if (preferAc3ForSurround)
-    audioCodec(*allowedAudioCodecs)
+    audioCodec(AC3)
   else
-    audioCodec(AC3)
+    audioCodec(*allowedAudioCodecs)

Evidence

  • Before: TestDeviceProfileUtils: 8 tests, 2 failed
    • video transcoding allows all audio codecs when not preferring AC3: expected [aac, ac3, eac3, …] but was [ac3]
    • video transcoding uses only AC3 when preferring AC3: expected [ac3] but was [aac, ac3, eac3, …]
  • After: 8 tests, 0 failures

Merge Danger

Door: two-way

Restores the v1.0.8 behavior.

Blast Radius: transcoding

Changes only the audio codecs the server may pick when it transcodes or remuxes video.

The refactor in damontecres#1955 swapped the preferAc3ForSurround branches, so
video transcodes were restricted to AC3 by default. Devices without an
AC3 decoder or passthrough played video with no audio.
@StefanBS StefanBS closed this Oct 16, 2026
@damontecres

Copy link
Copy Markdown
Owner

Hey @StefanBS, why did you close this? I think you're right that this is a bug.

damontecres added a commit that referenced this pull request Oct 19, 2026
## Description
The refactor in #1955
(included in `v1.0.9`) swapped the branches for the experimental "Use
AC3 for surround sound audio" breaking it.

Unfortunately, there isn't a real workaround to get the AC3 behavior
back. With the experimental settings enabled & "Use AC3 for surround
sound audio" _disabled_, surround sound audio will transcode to stereo
AAC. Otherwise if experimental settings are _disabled_ and/or "Use AC3
for surround sound audio" is _enabled_, there's no effect.

### Related issues
Credit to @StefanBS who opened #2090, but closed it before I verified
the bug
Closes #2093

### Testing
Manually via emulator

## Screenshots
N/A

## AI or LLM usage
None
@StefanBS

Copy link
Copy Markdown
Contributor Author

Hey @StefanBS, why did you close this? I think you're right that this is a bug.

Claude accidentally opened this PR while troubleshooting an issue I was having which turned out to be unrelated to this, and I forgot to follow through with this. Thanks for mentioning me in your fix!

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