Skip to content

Add support for SABR#5588

Draft
unixfox wants to merge 2 commits intoiv-org:masterfrom
unixfox:sabr-shakajs
Draft

Add support for SABR#5588
unixfox wants to merge 2 commits intoiv-org:masterfrom
unixfox:sabr-shakajs

Conversation

@unixfox
Copy link
Member

@unixfox unixfox commented Jan 11, 2026

This pull request is for adding SABR support to invidious.

Close #5263

TODO

@unixfox unixfox marked this pull request as draft January 11, 2026 18:37
@acheong08
Copy link

acheong08 commented Jan 12, 2026

Shaka error 1006 happens on the DASH manifest path because itags don't match. They get filtered out for SABR (see unixfox@13f0943) but not here: https://github.com/unixfox/invidious/blob/13f094302392228d3db2a07ece67a6cf3db2b588/assets/js/sabr_player.js#L551-L557

Diff from Kira:

diff --git a/src/composables/useYoutubePlayer.ts b/src/composables/useYoutubePlayer.ts
index 9d5803c..7156e83 100644
--- a/src/composables/useYoutubePlayer.ts
+++ b/src/composables/useYoutubePlayer.ts
@@ -689,7 +689,12 @@ export function useYoutubePlayer() {
                                        `${videoInfo.streaming_data.dash_manifest_url}/mpd_version/7`;
                        } else {
                                try {
+                                       // Filter out formats with xtags (DRC variants) to prevent duplicate itag issues
+                                       // that cause "Could not determine current format" errors in the SABR adapter.
+                                       // This must match the filter applied to setServerAbrFormats() above.
+                                       // Note: format_filter is a reject filter - return true to EXCLUDE the format.
                                        const dashManifest = await videoInfo.toDash({
+                                               format_filter: (format) => !!format.xtags,
                                                manifest_options: {
                                                        is_sabr: true,
                                                        captions_format: "vtt",

Fixes it in my experience

Edit: turns out this fix causes audio to disappear from dubbed videos. This is what ended up fixing it: acheong08/invidious-sabr-player@54c6700

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.

[Enhancement] SABR support

2 participants