DASH HD playback — WIP behind TORTTUBE_DASH=1 + upstream notes

Sidecar resolve_dash op shipped — returns rustypipe's full video_only_streams
+ audio_streams (16+ representations for NGGYU, from 360p H.264 through 4K
AV1). Addon _build_dash_mpd assembles a valid on-demand MPEG-DASH manifest
filtered to H.264 ≤1080p + best AAC audio.

Two unblocked-by-WIP issues surfaced during integration:
- inputstream.adaptive's libcurl can't open file:// URLs (logged in
  docs/upstream.md as an enhancement-target).
- Rapid Player.Open retries can trigger Kodi's 'two concurrent
  busydialogs' fatal exit; need lifecycle hardening before re-enabling.

Pivoted to localhost HTTP-server serving (ThreadingHTTPServer on a
port-0 socket, MPD bytes captured in a per-instance handler subclass).
Lifecycle: server.shutdown() runs in a finally block after the
SponsorBlockMonitor watcher exits. Works in isolation but Kodi crashed
under rapid retry conditions — needs more testing.

For v0.0.5: DASH path is gated behind TORTTUBE_DASH=1 env var; default
falls through to the stable yt-dlp progressive 360p path that's been
verified live. M7 milestone added to track the remaining work; PRs
to inputstream.adaptive + Kodi candidates logged in docs/upstream.md.
This commit is contained in:
Kayos 2026-05-23 11:14:56 -07:00
parent f610965fcf
commit 45e1306bf3
6 changed files with 329 additions and 14 deletions

View file

@ -11,7 +11,24 @@ _(none yet — opens with M1 development)_
| Date | Project | PR/Issue | Title | Status | Outcome |
|------|---------|----------|-------|--------|---------|
| _empty_ | | | | | |
| _none yet_ | | | | | |
## Investigation notes (not yet a PR — to be evaluated)
- **inputstream.adaptive — `file://` not supported by libcurl downloader**
([kodi addon, xbmc/inputstream.adaptive on github](https://github.com/xbmc/inputstream.adaptive))
Hit during torttube M7 DASH work 2026-05-23. Loading an MPD from a local
filesystem path via `file:///storage/.kodi/temp/torttube/<id>.mpd` fails
with `CURLOpen returned an error, download failed`. Common workaround
is a localhost HTTP server (plugin.video.youtube does this). Worth
filing an enhancement request to either accept `file://` or document
the recommended pattern.
- **Kodi — "Logic error due to two concurrent busydialogs" fatal**
Reproduced during rapid back-to-back `Player.Open` calls while a
previous play's BusyDialog was still dismissing. Log message itself
says "this is a known issue", but the app HARD-exits rather than
silently dropping one of the dialogs. Look up the upstream tracker
before filing.
## Watching (not ours, but relevant to torttube)