1.7 KiB
1.7 KiB
ECP-0025: yt-dlp adapter + bundled runtime
Status: Draft
Problem / context
We want to paste a YouTube Live (or other supported site) URL into the app and ingest it as a stream. This requires resolving the URL to an HLS playlist or direct stream URL. We also want the app to be self-contained (no external Python install).
Decision
Ship a bundled yt-dlp runtime inside the Tauri app and expose a Tauri command that resolves a URL to a stream URL via yt-dlp. The resolved URL is then treated like any other ingest source and sent through our ffmpeg-based pipeline.
Details
Bundling
- Bundle a Python runtime +
yt-dlpinside the app resources directory. - Prefer the bundled runtime at runtime; fallback to a system
yt-dlponly if explicitly configured. - Use a
scripts/vendor-yt-dlp.shhelper to build the bundled environment per platform.
Tauri integration
- Add a
add_ytdlp_sourcecommand that:- Executes
python -m yt_dlp -J --no-playlist <url>. - Selects a suitable HLS URL from the JSON.
- Creates a
StreamDescriptorandStreamSource.
- Executes
- The UI provides a URL input in the “Add source” menu.
Security / policy
- The app only resolves URLs; it does not automate login or cookie handling.
- The resolved URL is treated as untrusted; playback uses existing safeguards.
Alternatives considered
- External yt-dlp dependency: rejected (not self-contained).
- Browser-based extraction: rejected (too brittle).
Rollout / teardown plan
- Add bundling layout and helper script.
- Add backend command and UI input.
- Add docs for building the bundled runtime.
Teardown: remove the command and UI input, keep HLS ingest via direct URLs.