# Tools downloaded at runtime: yt-dlp, FFmpeg, Deno **These programs are not bundled in the RIVET installer, MSI or portable build.** The RIVET app downloads them onto the user's machine straight from the projects' own release pages, and runs each one as a separate process. RIVET never links them. This note records what the code in `crates/prism-video/src/tools.rs` (as of the Prism 1.2.11 baseline, commit 698b47dd0940169e62b7f2c06c2a6ac6a4e727a9) actually does. If any of this changes, update this note and the audit report. ## When the downloads happen - `app/src-tauri/src/main.rs`: at app start-up, when the setting `video.auto_update` is on, RIVET calls `ensure_tools()` in the background, then `update_ytdlp()`. The user does not confirm the download first, and no licence notice is shown for it. - The user can also install or update the tools from Settings (`commands::ensure_tools`, `commands::update_ytdlp`). - Order in which each tool is looked up (`tools::resolve`): custom path in Settings, then RIVET's managed copy in its `tools` folder, then the system `PATH`. For ffmpeg a system copy is preferred by default (`prefer_system_ffmpeg: true`). RIVET only downloads a tool when it is missing. yt-dlp is also downloaded when the system copy is older than 2025.11.12. ## What is downloaded on Windows x64 | Tool | Source repository | Asset (Windows x64) | Checksum used | |---|---|---|---| | yt-dlp (stable channel) | `https://github.com/yt-dlp/yt-dlp/releases/download//` | `yt-dlp_win.zip` (unpacked PyInstaller build). Falls back to `yt-dlp.exe` (single-file PyInstaller build). | `SHA2-256SUMS` from the same release | | yt-dlp (nightly channel, if selected) | `https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/download//` | same names | same | | FFmpeg + ffprobe | `https://github.com/BtbN/FFmpeg-Builds/releases/download//` | `ffmpeg-master-latest-win64-gpl.zip` (only `ffmpeg.exe` and `ffprobe.exe` are taken out of it) | `checksums.sha256` from the same release | | Deno | `https://github.com/denoland/deno/releases/download//` | `deno-x86_64-pc-windows-msvc.zip` | `deno-x86_64-pc-windows-msvc.zip.sha256sum` | Other platforms, for reference only: Windows ARM64 gets `yt-dlp_win_arm64.zip` and `ffmpeg-master-latest-winarm64-gpl.zip`. Linux gets the `linux64-gpl` / `linuxarm64-gpl` tarballs. macOS gets static builds from `https://ffmpeg.martin-riedl.de` with a `.sha256` file for each. "Latest tag" is found by following the redirect of `https://github.com//releases/latest`. Nothing is pinned. Each run gets whatever version upstream has released most recently. ## How the downloads are verified - Each archive's SHA-256 is computed while it downloads. The download is rejected (`ChecksumMismatch` / `ChecksumMissing`) unless the hash matches the entry in the checksum file. - **Limit:** the checksum file comes from the **same GitHub release** as the archive. This guards against a broken or truncated download and against tampering in transit (HTTPS already does that). It does **not** guard against a compromised upstream release or account. No hash is pinned and no signature (GPG or Sigstore) is checked. - Archive extraction refuses path traversal and symlinks. Only the expected executables are kept. ## Licences of the downloaded programs | Tool | Licence of the exact artefact RIVET downloads | |---|---| | yt-dlp | The yt-dlp source is under the **Unlicense** (`Unlicense.txt`). However, yt-dlp's README (section "Release Files" > "Licensing") says the **PyInstaller-bundled executables include GPLv3+ licensed code, so the combined work is licensed under GPLv3+**. That covers `yt-dlp.exe` and `yt-dlp_win.zip`, the exact files RIVET fetches on Windows. Third-party details are in yt-dlp's `THIRD_PARTY_LICENSES.txt`. | | FFmpeg (BtbN `gpl` variant) | **GPL-3.0-or-later** as a whole. The `gpl` variant "includes all dependencies, even those that require full GPL" (for example libx264 and libx265). The `lgpl` variant leaves out the GPL-only libraries. RIVET downloads the `gpl` variant. It never downloads the `nonfree` variant (fdk-aac), which may not be redistributed at all. | | Deno | MIT (Deno Land Inc.). The binary also contains V8 (BSD-3-Clause) and other permissive components. | ## What this means for RIVET 1. **As shipped today (downloaded by the end user from the upstream project):** WMD Corporations does not distribute these binaries. The GPL obligations to provide source and the licence text normally attach to whoever *distributes* the binary, which here is the upstream release host. RIVET talks to them only through command-line arguments and pipes, as separate programs ("mere aggregation" / arm's-length communication). Their licences therefore do not reach RIVET's own proprietary code. Good practice anyway: - show a short notice the first time the tools are fetched (or in About / Settings > Video) that names each tool, its licence and its upstream URL, and links to this note; - consider asking the user before the first download (this is also a privacy and telemetry point: RIVET contacts github.com at start-up). 2. **If WMD ever bundles any of these binaries** (installer, portable ZIP, offline package, mirror or CDN), WMD becomes the distributor and must, for every release that contains them: - ship the GPL-3.0 text (and for yt-dlp, its `THIRD_PARTY_LICENSES.txt`; for FFmpeg, the licence texts of the bundled libraries); - provide the **complete corresponding source code** for the exact build: the FFmpeg source plus the BtbN build scripts and every library source, and yt-dlp plus all bundled Python packages and the PyInstaller bootloader. Provide it either alongside the binary or through a written offer valid for 3 years (GPL-3.0 ยง6). A link to upstream "latest" is **not** enough, because "latest" moves; - pass the binaries on under the GPL with no extra restrictions. RIVET's EULA must say clearly that it does not apply to these components, and that reverse-engineering and modification bans do not cover them; - keep the tools as separate executables. **Never link FFmpeg libraries (libav\*) into RIVET.** Linking the GPL build would make RIVET a derivative work under GPL-3.0. Linking even the LGPL build brings LGPL-2.1 relinking and source obligations; - prefer the BtbN `lgpl` variant (or an LGPL build you make yourself) if you bundle at all. It avoids GPL-only encoders and keeps the obligations to LGPL-2.1 (still separate process, source offer, licence text). Never bundle the `nonfree` variant. - **Patents:** H.264, HEVC, AAC and other codecs inside FFmpeg can need patent licences for commercial distribution, whatever the copyright licence says. This needs legal review before any bundling. 3. **Supply chain:** since the downloads are unpinned and checked only against a checksum from the same release, consider pinning known versions with SHA-256 values embedded in RIVET and updated through RIVET's own signed update channel, or checking upstream signatures where they exist.