Skip to content

Fall back to the channel count for unknown audio layouts - #322

Open
zotabee wants to merge 1 commit into
jellyfin:masterfrom
zotabee:channel-count-fallback
Open

zotabee wants to merge 1 commit into
jellyfin:masterfrom
zotabee:channel-count-fallback

Conversation

@zotabee

@zotabee zotabee commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

When FFmpeg reports no layout name, or one the switch doesn't know (e.g. "8 channels"), nothing is sent to Trakt, even though the channel count is known. Follow-up to #279.

In those cases the plugin now uses the most common layout for the count, as FFmpeg does: 1→1.0, 2→2.0, 3→2.1, 4→4.0, 5→5.0, 6→5.1, 7→6.1, 8→7.1. All of these are valid Trakt values (API docs; Trakt has no 6.0 or 7.0). Above 8 channels nothing is sent, because the count alone is ambiguous (10 could be 5.1.4 or 7.1.2).

Tested on my Jellyfin 12.1 server since 2026-10-18. Cabrini (2024) has an audio track with the layout "8 channels", so trakt.tv had no channel value for it. It now gets 7.1 (the Atmos part comes from #320):

- dolby_digital_plus        (no audio_channels)
+ dolby_digital_plus_atmos  7.1

Comparing my Trakt data exports from before and after, one more item got its channels this way: an episode whose mono PCM track has no layout name now has 1.0.

Builds with no warnings on its own and merges cleanly with #320, #321, #323, #329 and #342, which change the same file.

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.

1 participant