YouTube 2.0.0: native client without ads
All checks were successful
release / release (push) Successful in 10m13s

Replaces the web app (youtube.com/tv in Chromium) with a native Rust +
Slint client on sf-ui, built on Netflex TV's page engine.

- InnerTube: web client for public pages, the TV client with the
  account's OAuth token for personal ones, visionOS (direct URLs) for
  streams, the TV client with yt-dlp's ejs solver (QuickJS) as fallback.
- One version, no ads: ad breaks are never requested, ad renderers are
  skipped in feeds. SponsorBlock skips sponsored parts.
- Sign-in with a QR code / youtube.com/activate (OAuth device flow).
- Signed out: subscriptions and history on the TV; a home filled with
  this week's popular Hungarian videos when YouTube's is empty.
- Playback: one-quality DASH manifest for GStreamer, H.264 up to 1080p
  or AV1 up to 4K, captions, quality switching, up next, resume.
- Release builds for x86-64 and the Raspberry Pi (aarch64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tamas Csikel
2026-11-02 16:27:41 +01:00
parent 645fd1c6fe
commit 9875d435e1
40 changed files with 15776 additions and 37 deletions

View File

@@ -1,12 +1,70 @@
#!/usr/bin/env bash
# Builds the two store release assets into dist/: app.toml and
# support.bluefox.youtube-<version>.tar.zst. Needs sf-pack (Fennec SDK):
# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.0 sf-pack
# Builds the store release assets into dist/:
#
# ./package.sh app.toml and support.bluefox.youtube-<version>.tar.zst
# (x86-64; dist/ is emptied first)
# ./package.sh --arm adds support.bluefox.youtube-<version>-aarch64.tar.zst
# (Raspberry Pi, cross-compiled)
#
# Build on Debian trixie or older (the TV's glibc), with the GStreamer dev
# packages (libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev) and
# sf-pack from the Fennec SDK:
# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.2 sf-pack
# --arm also needs gcc-aarch64-linux-gnu, the arm64 (multiarch) dev packages
# of fontconfig, freetype, xkbcommon and glib, and the arm64 GStreamer
# runtime libraries (libgstreamer1.0-0:arm64 libgstreamer-plugins-base1.0-0:arm64).
# Not the GStreamer dev packages: they can't be installed for two
# architectures at once, so the build links the runtime libraries directly.
set -euo pipefail
cd "$(dirname "$0")"
rm -rf pkg dist
mkdir -p pkg
cp app.toml icon.svg pkg/
sf-pack build pkg dist
sf-pack verify dist
target="${CARGO_TARGET_DIR:-target}"
id=$(sed -n 's/^id *= *"\(.*\)".*/\1/p' app.toml | head -1)
version=$(sed -n 's/^version *= *"\(.*\)".*/\1/p' app.toml | head -1)
# pack <binary> <out dir>: the package with this binary.
pack() {
rm -rf pkg
mkdir -p pkg/bin
cp app.toml icon.svg pkg/
install -m755 "$1" pkg/bin/youtube-tv
sf-pack build pkg "$2"
sf-pack verify "$2"
rm -rf pkg
}
if [ "${1:-}" != --arm ]; then
cargo build --release --locked
rm -rf dist
pack "$target/release/youtube-tv" dist
else
t=aarch64-unknown-linux-gnu
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++
export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/
export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig
rustup target list --installed | grep -qx "$t" || rustup target add "$t"
# GStreamer without pkg-config (system-deps): link the runtime libraries
# through a folder of unversioned names.
mkdir -p "$target"
gst="$(cd "$target" && pwd)/arm-gstreamer"
rm -rf "$gst" && mkdir -p "$gst"
# system-deps key (the pkg-config name) and the library it stands for.
for pair in GSTREAMER_1_0:gstreamer-1.0 GSTREAMER_BASE_1_0:gstbase-1.0 \
GSTREAMER_APP_1_0:gstapp-1.0 GSTREAMER_VIDEO_1_0:gstvideo-1.0; do
key=${pair%%:*} lib=${pair#*:}
so=/usr/lib/aarch64-linux-gnu/lib$lib.so.0
[ -e "$so" ] || { echo "missing $so (install the arm64 GStreamer runtime libraries)" >&2; exit 1; }
ln -s "$so" "$gst/lib$lib.so"
export "SYSTEM_DEPS_${key}_NO_PKG_CONFIG=1" "SYSTEM_DEPS_${key}_LIB=$lib" "SYSTEM_DEPS_${key}_SEARCH_NATIVE=$gst"
done
cargo build --release --locked --target "$t"
rm -rf dist-arm
pack "$target/$t/release/youtube-tv" dist-arm
# Fennec OS on ARM looks for <id>-<version>-aarch64.tar.zst (docs/store.md).
mkdir -p dist
mv "dist-arm/$id-$version.tar.zst" "dist/$id-$version-aarch64.tar.zst"
[ -f dist/app.toml ] || mv dist-arm/app.toml dist/
rm -rf dist-arm
fi
ls -l dist