Disable video and text tracks in background player and prefer DASH manifests over HLS ones for livestreams#12601
Merged
Stypox merged 7 commits intoTeamNewPipe:devfrom Jan 28, 2026
Conversation
4 tasks
Stypox
requested changes
Nov 5, 2025
Member
Stypox
left a comment
There was a problem hiding this comment.
Looks good to me, thank you! I just have a couple of small questions/nitpicks, but then this can be merged
This is a hacky solution, a better one should be investigated and used.
As both subtitles and video tracks are disabled in this method, the goal of this rename is to highlight disabling/enabled subtitles.
This allows disabling these track types when stream info has been not loaded while the ExoPlayer instance is. It is now possible to do so with the background player, in order to disable fetching video and text tracks for manifest sources, especially used for livestreams. Also set the recovery first before reloading play queue manager in the useVideoAndSubtitles method of the Player class.
This reduces data usage for manifest sources with demuxed audio and video, such as livestreams, for non-HLS sources only due to an ExoPlayer bug.
268ae39 to
216867c
Compare
Stypox
approved these changes
Jan 28, 2026
Member
Stypox
left a comment
There was a problem hiding this comment.
I addressed my review comments by adding a few comments to the code. I tested and this seems to work fine.
One subtle thing I noticed: when playing something in the background, and enqueueing something else, the player pauses for a fraction of a second, and then resumes. I pushed another commit to fix this: basically the code was reinitializing the background player class from scratch every time the player received an intent ;-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is it?
Description of the changes in your PR
This PR prioritizes DASH manifests over HLS ones for live sources, and works around bugged YouTube DASH manifests in order to use them. This workaround has been only tested for running livestreams and not running premieres (i.e. in the time the video can be played as a livestream during its release), so please test if you can get a running premiere. YouTube DASH manifests allow to rewind up to 4 hours to the current live time.
It also disables fetching video and text tracks in background player, in order to reduce data usage for livestreams on services on which we can get DASH manifests. When there are only HLS ones, nothing will change, at least for video track fetching, due to an ExoPlayer bug which still fetches video (and subtitles?), even if it has been disabled with the track selector (a low priority has been given by the ExoPlayer team to this bug for several years without any change).
Fixes the following issue(s)
Fixes #12024 and fixes #11756 (for non-HLS sources).
Related issue: #10158
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence