From 81ee5b3262fa27b05fac3167cba5bfb72c182f81 Mon Sep 17 00:00:00 2001 From: Hector Oswaldo Caballero Date: Fri, 22 May 2026 17:58:53 -0400 Subject: [PATCH] Add preference to disable auto-dubbed audio tracks (#714) (#869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit YouTube has been rolling out AI-generated dubbed audio tracks on videos. Roku's player automatically selects the dubbed track matching the device language, overriding the original audio — and the app provides no way to switch back. The only workaround is a cumbersome device-level setting. This adds a "Disable auto-dubbed audio" boolean preference under Playback settings. When enabled, auto-dubbed audio groups (identified by the existing isAutoDubbed flag from xtags parsing) are excluded from the locally-generated DASH manifest, so only the original audio track is available for playback. A softer approach — keeping dubbed tracks available but defaulting to the original — was also investigated. Both DASH `selectionPriority` attributes and AdaptationSet reordering were tested on a Hisense 65R6107 Roku TV, but Roku's player ignores both and always selects the track matching the device language. Removing the tracks from the manifest is the only reliable approach. Tested on a Hisense 65R6107 (Roku OS). With the preference enabled, auto-dubbed tracks are no longer listed and the original audio plays by default. With the preference disabled (default), behavior is unchanged. Scope: DASH (local) path only. HLS and DRM DASH paths are not yet covered and will be addressed in follow-up work. Co-authored-by: Claude Opus 4.6 (1M context) --- playlet-lib/src/components/Services/Dash/DashManifest.bs | 7 ++++++- .../Web/PlayletWebServer/Middleware/DashRouter.bs | 2 ++ playlet-lib/src/config/preferences.json5 | 7 +++++++ playlet-lib/src/locale/en_US/translations.ts | 8 ++++++++ playlet-lib/src/source/utils/Locale.bs | 3 +++ 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/playlet-lib/src/components/Services/Dash/DashManifest.bs b/playlet-lib/src/components/Services/Dash/DashManifest.bs index 7c1e5b6b..e1061545 100644 --- a/playlet-lib/src/components/Services/Dash/DashManifest.bs +++ b/playlet-lib/src/components/Services/Dash/DashManifest.bs @@ -7,9 +7,11 @@ import "pkg:/source/utils/UrlUtils.bs" class DashManifest public invidiousInstance as dynamic + public disableAutoDubbed as boolean - function new(invidiousInstance as string) + function new(invidiousInstance as string, disableAutoDubbed = false as boolean) m.invidiousInstance = invidiousInstance + m.disableAutoDubbed = disableAutoDubbed m.utils = new Http.Utils() @@ -279,6 +281,9 @@ class DashManifest function GenerateAudioAdaptationSets(xml as object, audioGroups as object, id as integer, metadata as object) as integer for each group in audioGroups firstFormat = group[0] + if m.disableAutoDubbed and ValidBool(firstFormat.isAutoDubbed) + continue for + end if hoisted = {} adaptationSetAttributes = { diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/DashRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/DashRouter.bs index ea7b8ca8..eea866ff 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/DashRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/DashRouter.bs @@ -12,6 +12,7 @@ namespace Http m.videoQueueNode = server.sceneNodes.videoQueue m.invidiousNode = server.sceneNodes.invidious + m.preferencesNode = server.sceneNodes.preferences m.invidiousService = new Invidious.InvidiousService(m.invidiousNode) ' No need to pass the invidious instance here, we will refresh it for ' each request to make sure we are using the latest one @@ -51,6 +52,7 @@ namespace Http end if m.dashManifest.invidiousInstance = m.invidiousService.GetInstance() + m.dashManifest.disableAutoDubbed = ValidBool(m.preferencesNode["playback.disable_auto_dubbed"]) qualityFilter = m.CreateQualityFilter(quality) xmlContent = m.dashManifest.FromVideoMetadata(metadata, qualityFilter, ValidString(local) = "true") diff --git a/playlet-lib/src/config/preferences.json5 b/playlet-lib/src/config/preferences.json5 index 940d9919..7b9dbf8f 100644 --- a/playlet-lib/src/config/preferences.json5 +++ b/playlet-lib/src/config/preferences.json5 @@ -27,6 +27,13 @@ visibility: "web", svelteComponent: "EditQualityControl", }, + { + displayText: "Disable auto-dubbed audio", + key: "playback.disable_auto_dubbed", + description: "Remove AI-generated dubbed audio tracks.", + type: "boolean", + defaultValue: false, + }, ], }, { diff --git a/playlet-lib/src/locale/en_US/translations.ts b/playlet-lib/src/locale/en_US/translations.ts index 4ea0a087..6f2efb1d 100644 --- a/playlet-lib/src/locale/en_US/translations.ts +++ b/playlet-lib/src/locale/en_US/translations.ts @@ -800,6 +800,14 @@ Feed preferences Feed preferences + + Disable auto-dubbed audio + Disable auto-dubbed audio + + + Remove AI-generated dubbed audio tracks. + Remove AI-generated dubbed audio tracks. + Disable Shorts Disable Shorts diff --git a/playlet-lib/src/source/utils/Locale.bs b/playlet-lib/src/source/utils/Locale.bs index 764a0610..c53a715e 100644 --- a/playlet-lib/src/source/utils/Locale.bs +++ b/playlet-lib/src/source/utils/Locale.bs @@ -253,6 +253,9 @@ namespace Locale PreferredQualityDescription = "Preferred video quality" AutoQuality = "Auto" + DisableAutoDubbedAudio = "Disable auto-dubbed audio" + DisableAutoDubbedAudioDescription = "Remove AI-generated dubbed audio tracks." + Backend = "Backend" BackendPreferences = "Backend preferences" SelectedBackend = "Selected backend"