No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
BangPlaysGames c337823649 Add downloads, casting, live chat, multiple accounts and more; release 0.4.0
- Downloads for offline playback, with a Downloads screen and a foreground download service
- Casting from the phone: to BoomTube on a TV in the same network (the TV streams on its own),
  or to any Chromecast / Google TV through Google's stock receiver, relayed by the phone
- Live chat: own pane with the input at the bottom, follows new messages, reply to an author
- Several signed-in accounts with switching; feeds reload on their own when the account changes
- Comment posting, save to / remove from playlists, new playlists
- SponsorBlock, playback speed, captions, settings screen, upload notifications
- Search sorting and filters (upload date sorted client-side); fix search paging, which stopped
  after the first page because later pages arrive under onResponseReceivedCommands
- Age-restricted videos through the signed-in account, URLs decoded with yt-dlp's ejs solver in
  a locked-down WebView. Known limit: without a proof-of-origin token YouTube serves only about
  the first minute
- Unblurred thumbnails for age-restricted videos
- Fullscreen hides the system bars also when the phone is simply turned, and after dialogs
- Playback log under Settings to find out why a video paused
- NewPipe Extractor 0.27.1
- Version 0.4.0 (5)

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-13 18:13:02 -06:00
app Add downloads, casting, live chat, multiple accounts and more; release 0.4.0 2026-11-13 18:13:02 -06:00
gradle/wrapper BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
.gitignore BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
build.gradle.kts BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
gradle.properties BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
gradlew BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
gradlew.bat BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00
README.md Add downloads, casting, live chat, multiple accounts and more; release 0.4.0 2026-11-13 18:13:02 -06:00
settings.gradle.kts BoomTube: ad-free, Shorts-free YouTube client (milestone 1) 2026-10-19 11:58:20 -05:00

BoomTube

A personal, sideloaded YouTube client for Android phones, tablets and Google TV: no ads, no Shorts. Unofficial, and against YouTube's Terms of Service; a signed-in account could be flagged.

How it works

  • Feeds, search, up next (innertube/): YouTube's InnerTube API as the desktop site uses it, signed with the session cookies (SAPISIDHASH). FeedParser walks the whole response tree, never descends into ad or Shorts containers, and drops anything that opens the Shorts player. ShortsFilter HEAD-checks short or unknown-length videos against youtube.com/shorts/<id> (200 = Short, 303 = regular video).
  • Search filters (innertube/SearchFilters.kt): upload date, duration and features are sent as the params protobuf the website's own filter links use. YouTube only sorts by relevance or popularity now (its upload-date sort is gone; the old parameter is ignored), so "Sort: Upload date" is done in the app: three pages of results per load, ordered by the age shown on them. Combine it with an upload-date filter to get the newest results rather than the newest of the most relevant.
  • Blurred thumbnails (innertube/Thumbnails.kt): YouTube blurs some thumbnails on its image server, by a blur radius in the image URL's signed sqp parameter. Such URLs are recognised by that field and replaced with the video's plain hqdefault.jpg, which is served sharp.
  • Sign-in (auth/, ui/SignInScreen.kt): Google's own sign-in page in a WebView. The app keeps only the resulting youtube.com cookies, encrypted with an Android Keystore key, and wipes the WebView's copies. Rotated cookies are persisted via the OkHttp cookie jar.
  • Accounts (auth/SessionStore.kt): several accounts can stay signed in; one is active and the "You" tab (phone) or Account section (TV) switches between them. Everything loaded per account (feeds, library, the website config InnerTube signs requests with) is keyed by the store's generation, which changes on every sign-in, sign-out and switch.
  • Live chat (innertube/PageParsers.kt, ui/WatchScreen.kt): live streams show their chat where other videos show comments, polled while it is on screen (live_chat/get_live_chat), newest message first; signed-in accounts can send messages. Chat replays of ended streams aren't shown.
  • Playback (stream/, player/): NewPipe Extractor resolves streams anonymously (no account cookies); DashManifestBuilder turns every video-only/audio-only format into one DASH manifest, so ExoPlayer adapts quality or pins one via track selection. YoutubeDataSource requests googlevideo the way YouTube's clients do (POST, rn, range parameter). PlaybackService (MediaSessionService) gives background play and media controls; the activity auto-enters picture-in-picture while a video plays.
  • Age-restricted videos (stream/AccountStreams.kt, stream/JsChallengeSolver.kt): the one case where the account is used to get media. When NewPipe reports an age restriction (and only then), the signed-in account's player response is requested as the WEB_CREATOR client, the only one that still returns plain stream URLs for these videos (November 2026). googlevideo refuses those URLs until their throttling parameter is decoded by a function inside YouTube's player script, which NewPipe Extractor can no longer extract. That is done with yt-dlp's solver (github.com/yt-dlp/ejs 0.8.0, Unlicense; bundles meriyah, ISC, and astring, MIT; unmodified under assets/ytsolver), run in a throwaway WebView with no network or file access. The resulting formats go through the same DASH manifest, player and downloader as everything else. The account must be age-verified with Google. Known limit: these videos stop after about a minute (HTTP 403). YouTube's web clients must attach a "proof of origin" token to stream URLs, minted by running its attestation program; without one only the start of a stream is served. BoomTube deliberately doesn't mint one.
  • Account features (innertube/PageParsers.kt): library (history FEhistory, liked VLLL, Watch Later VLWL, playlists), channel pages (Videos / Live / Playlists, never Shorts), playlists, read-only comments, like/dislike and subscribe via the InnerTube action endpoints. Playlists play as a queue whose entries are resolved only when the player reaches them.
  • Watch history (player/WatchHistoryReporter.kt): while signed in, the service fetches the account's WEB player response and pings its videostatsPlaybackUrl / videostatsWatchtimeUrl like the website, so videos watched in BoomTube land in the YouTube history. Only a video tapped in the app starts playing; links and relaunches open paused.
  • Playlists and comments: "Save" on the watch screen adds or removes the video from the account's playlists (playlist/get_add_to_playlist, browse/edit_playlist) or creates a new private one; signed-in accounts can post top-level comments (comment/create_comment).
  • Captions and speed: every caption track goes into the DASH manifest as a text track (subtitle button in the player). The default speed and "captions by default" are settings.
  • SponsorBlock (player/SponsorBlock.kt): skips segments reported to sponsor.ajay.app, each once per play. Uses the API's hash-prefix mode, so the video ID itself isn't sent. On by default for sponsors; categories are a setting.
  • Downloads (download/): a foreground service saves the best video-only stream up to the chosen quality and the best audio stream as two files in the app's external files directory; a downloaded video plays from them (merged in the player) without the network.
  • Upload notifications (notify/): an hourly JobScheduler job reads the subscriptions feed and notifies about videos that weren't there before. Off by default; phones and tablets only.
  • Casting (cast/), two ways, both from the Cast chip on the watch screen:
    • To BoomTube on a TV (Cast.kt): the TV advertises _boomtube._tcp over DNS-SD while the app is open; the phone sends a video ID and position and gets playback status back (one JSON object per line over TCP). The TV streams the video itself, so the phone isn't needed while it plays. No pairing: anything in the local network can control playback (and nothing else); it can be turned off in the TV's settings.
    • To any Chromecast / Google TV (GoogleCast.kt, StreamRelay.kt): Google Cast with the stock "Default Media Receiver", which needs no registration. That player can't fetch YouTube's streams (plain requests are refused or throttled), so the phone runs a small HTTP server that hands it a DASH manifest and relays every byte range, fetched the way BoomTube's player fetches them. The phone must stay in the network while the video plays; a foreground service keeps it going with the screen off. SponsorBlock skips are sent from the phone. No live streams yet. Uses Google's proprietary play-services-cast-framework and needs Google Play services on the phone; a build with it can't be distributed under the GPL.
  • UI (ui/): Compose + Material 3; NavigationSuiteScaffold (bottom bar on phones, rail on tablets), two-pane watch screen at ≥ 840 dp, fullscreen on phone landscape.
  • Google TV (tv/): a D-pad, 10-foot interface on the same data and player. Sign-in by QR code from a signed-in phone, or with a code at google.com/device. Has the player features (captions, speed, SponsorBlock, cast receiver) and their settings; downloads, notifications, saving to playlists and commenting are phone and tablet features.

Build

./gradlew assembleDebug
./gradlew testDebugUnitTest                 # parser tests on captured responses
./gradlew testDebugUnitTest -Pnetwork=true  # plus a live extraction + range-request test

NewPipe Extractor is GPLv3, so any distributed build must be GPLv3 too.