eb53de2ea5
Ship a smaller installer that no longer carries ffmpeg.exe/ffprobe.exe (the bulk of its size). On first run they are downloaded from a pinned upstream archive (gyan 8.1.2), verified against a pinned SHA-256, and unpacked with the OS tar.exe into the managed userData/bin dir -- the same place as the self-updating yt-dlp, so they survive app updates and portable re-extraction. A hard onboarding gate blocks the app until they are present, with a "locate existing ffmpeg" folder-picker fallback for offline machines and a Repair action in Settings > About. The updater's streaming/checksum/redirect/idle-timeout download loop is extracted to lib/verifiedDownload.streamVerifiedFile and shared by both the app-installer download and the ffmpeg fetch; the updater's public behaviour and error strings are unchanged (its boundary tests still pass). No new npm dependency: extraction uses the System32 bsdtar resolved by absolute path (audit F3). Note: this commit also carries pre-existing, in-progress aria2c/network and updater-token work that was already uncommitted in the working tree and is entangled with the above in shared files (updater.ts, ipc.ts, preload/index.ts, mockApi.ts, shared/ipc.ts, plus the settings/network files and aria2c.exe). It was not cleanly separable by path, so it is included here rather than split out. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Bundled binaries
AeroFetch spawns these from the main process. yt-dlp.exe (and optional
aria2c.exe) ship in the installer via electron-builder extraResources (outside the
asar archive) and are committed here so a fresh clone builds and runs.
ffmpeg.exe + ffprobe.exe are NOT shipped in the installer — they're the bulk of
its size, so they're downloaded on first run into userData/bin (see
src/main/ffmpegSetup.ts, pinned in src/main/config.ts). The copies here are used only
as a dev seed — ensureManagedFfmpeg copies them into userData/bin so npm run dev
needs no download — and are excluded from the shipped build.
resources/bin/
├── yt-dlp.exe (bundled + committed)
├── ffmpeg.exe (dev seed only — excluded from the installer)
├── ffprobe.exe (dev seed only — excluded from the installer)
└── aria2c.exe (optional, bundled)
yt-dlp.exe
- Download: https://github.com/yt-dlp/yt-dlp/releases/latest
- Grab
yt-dlp.exe. - Unlicense / public domain.
ffmpeg.exe + ffprobe.exe (dev seed only)
- The app downloads these on first run from the pinned upstream archive in
src/main/config.ts(FFMPEG_ARCHIVE_URL+FFMPEG_ARCHIVE_SHA256). To bump the version, edit those constants — recompute the SHA-256 from the new zip — in their own commit (the "pinned decisions" discipline). - For local dev, drop both
ffmpeg.exeandffprobe.exehere — they come together in the same archive'sbin/folder and their versions must match. yt-dlp needsffprobe.exeto read media durations; without it, duration-dependent post-processing fails with "ffprobe not found" (--sponsorblock-remove,--force-keyframes-at-cuts, and--split-chaptersall error out). Any recent win64 build works, e.g. https://www.gyan.dev/ffmpeg/builds/ or https://github.com/BtbN/FFmpeg-Builds/releases. - The installer no longer redistributes ffmpeg, so there's no ffmpeg license text to ship with the build — users fetch the binary from upstream themselves.
aria2c.exe (optional)
- Powers the "Use aria2c downloader" toggle in Settings → Network for faster multi-connection downloads. If it's missing, that toggle silently falls back to yt-dlp's built-in downloader — nothing breaks.
- Download: https://github.com/aria2/aria2/releases (grab the
aria2-*-win-64bit-build1.zip, copyaria2c.exefrom it here). - GPL-2.0 — ship its license text alongside the installer before release if bundled.
Branding stays generic: AeroFetch is a "yt-dlp frontend." Keep upstream license texts with any distributed build.