feat: bundle yt-dlp and ffmpeg as sidecars

The app is now self-contained: yt-dlp, ffmpeg and ffprobe ship inside
the bundle and are resolved beside the executable, so a fresh Mac needs
nothing installed. A system copy still wins when present, which is how
to run a newer yt-dlp than the bundled one. yt-dlp is pointed at the
bundled ffmpeg explicitly, since a bundled app has no reason to have one
on PATH.

The binaries stay out of git (~140MB); scripts/fetch-binaries.sh pulls
them. Homebrew's ffmpeg cannot be used — it links a dozen dylibs and
does not relocate — so the static arm64 build is used instead.

Version checks moved to the async Command. yt-dlp is a PyInstaller
bundle that unpacks ~37MB on first run, and the blocking call was
stalling a runtime worker for roughly twenty seconds.

Bundle size goes from 19MB to 153MB.
This commit is contained in:
vincent
2026-08-29 11:41:14 +02:00
parent 9bb7b71225
commit 3296b5436a
6 changed files with 114 additions and 18 deletions
+15 -6
View File
@@ -4,7 +4,7 @@ A desktop app that merges all your YouTube subscriptions into one newest-first f
downloads the videos you pick, and — when you have no connection — shows only what you
already downloaded. Built for the flight.
Tauri 2 · Rust · React · Tailwind CSS 4 · SQLite
Tauri 2 · Rust · React · Tailwind CSS 4 · SQLite · self-contained (bundles yt-dlp + ffmpeg)
Styled to `DESIGN-SYSTEM.md`: slate and sky, a 915px type ladder, outline-first
controls, borders for separation and shadows only for elevation, with light and dark
@@ -39,13 +39,20 @@ deliberate: every download is guaranteed to play inside FlightTube.
## Requirements
None at runtime — `yt-dlp`, `ffmpeg` and `ffprobe` ship inside the app as Tauri sidecars,
so a fresh Mac needs nothing installed. Settings shows each tool's version and whether it
came from the bundle or the system; a copy on your machine takes precedence, which is how
you run a newer yt-dlp than the bundled one.
The binaries are not in git (~140 MB together). Fetch them once before building:
```bash
brew install yt-dlp ffmpeg
./scripts/fetch-binaries.sh
```
Both are checked at startup; Settings shows their versions and this command if either is
missing. `ffmpeg` is required because best-quality H.264 and AAC arrive as separate
streams that must be merged.
That pulls yt-dlp from its official GitHub release and static arm64 ffmpeg/ffprobe from
osxexperts.net — Homebrew's ffmpeg links a dozen dylibs and cannot be relocated into an
app bundle. Note that static ffmpeg builds are GPL, which matters if you redistribute.
## Running it
@@ -78,7 +85,9 @@ system by default; Settings offers System / Light / Dark.
- The Atom feed returns only the **~15 most recent videos per channel**. There is no
backfill and no pagination — this is a rolling recent window, not an archive.
- Quality tops out at 1080p, by the deliberate choice described above.
- `yt-dlp` needs occasional updating (`brew upgrade yt-dlp`) as YouTube changes.
- The bundled `yt-dlp` is frozen at build time and YouTube changes often. Re-run
`./scripts/fetch-binaries.sh` and rebuild, or install a newer one on your system —
the app prefers a system copy when it finds one.
- Downloading videos is contrary to YouTube's Terms of Service.
## Tests