Vellum/internal
mithral 365aac0cc6 Add the transcode session manager
Second step of ADR-008. A session spawns ffmpeg with the detected encoder's
args, packages the file as HLS, and is reused while it is alive so two range
requests do not start two ffmpegs.

Three things it has to get right, and all three are about not burning the GPU:
a session nobody is watching is reaped after a few minutes idle; concurrent
sessions are capped rather than queued, because a GPU encodes one or two
streams and a queue would just make everyone wait longer; and Shutdown stops
everything so a restart does not leave ffmpeg running.

Found a real bug in review, and it is the kind that only a real host catches.
The hardware args were placed BEFORE -i. ffmpeg reads options before the input
as INPUT options, so "-c:v h264_nvenc" was looked up as a decoder and failed
with "Unknown decoder 'h264_nvenc'". Transcoding would have produced nothing on
any NVENC host while looking correct in the code.

Verified against the real hardware rather than reasoned about: the same ffmpeg
command produces zero segments with the args before -i and a valid playlist and
segments with them after. The test now asserts the ordering directly and names
the reason, so a future reordering fails with an explanation instead of two arg
lists. Red-green: moving them back fails with "the hardware args must follow
the input".

Verified end-to-end on this host: the Manager started a session against a real
20-second file and produced a 132-byte EVENT playlist and segments.

Known limit: a stopped session leaves its segment directory on disk, so the
cache directory needs pruning out of band.
2026-10-12 11:54:20 -04:00
..
apitoken Waves 9-10: Jellyfin and Subsonic clients can browse and play 2026-10-11 15:05:43 -04:00
arch Detect transcode hardware, and prove it can actually encode 2026-10-12 11:49:05 -04:00
auth Rate limit every surface that checks a password 2026-10-12 00:57:56 -04:00
catalog Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
cli Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
core Add a ThePornDB provider for the adult kind 2026-10-12 11:30:58 -04:00
discovery Advertise Vellum over mDNS so clients find it without a typed URL 2026-10-12 01:04:33 -04:00
engine Waves 7-8: playback engine selection, and missing files you can see 2026-10-11 14:36:55 -04:00
home Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
httpapi Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
httpx Phase 1: accounts, sessions, per-library grants 2026-10-09 16:31:24 -04:00
jellyfin Expose the television tree: catalog reads, API routes, Jellyfin shapes 2026-10-12 01:41:05 -04:00
jobs Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
library Separate video libraries by kind: movies, TV, adult, hentai 2026-10-12 11:20:51 -04:00
media Discover and serve subtitle tracks 2026-10-12 11:42:51 -04:00
metadata Separate video libraries by kind: movies, TV, adult, hentai 2026-10-12 11:20:51 -04:00
modules Phase 1: one item-access seam, and architecture rules that fail the build 2026-10-11 15:47:18 -04:00
natsort Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
playback Phase 3: a storage seam behind catalog, and one consumer threaded onto it 2026-10-11 16:16:07 -04:00
probe Waves 4-6: audio depth, ffprobe facts, and direct-play video 2026-10-11 14:14:32 -04:00
progress Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
providers Add a ThePornDB provider for the adult kind 2026-10-12 11:30:58 -04:00
scanner Discover and serve subtitle tracks 2026-10-12 11:42:51 -04:00
search Wave 3: search depth, transfer size, and the Home screen's tests 2026-10-11 13:46:18 -04:00
stream Discover and serve subtitle tracks 2026-10-12 11:42:51 -04:00
subsonic Rate limit every surface that checks a password 2026-10-12 00:57:56 -04:00
transcode Add the transcode session manager 2026-10-12 11:54:20 -04:00