unarr/internal/library
Deivid Soto 8a47132f15 perf(stream): extract all text subtitles of a file in one ffmpeg pass
Subtitle extraction is I/O-bound: subtitle packets are interleaved across the
whole container, so ffmpeg must read the entire file to demux a complete track
(measured ~57 MB/s reading a 60GB remux over ~75 MB/s NFS → ~14 min for the
full read). Doing that once per track meant N full reads of a huge file.

ExtractSubtitlesVTTMulti demuxes the container ONCE and routes every text track
to its own WebVTT output, so an N-text-track file costs one read instead of N.
The prewarm now enqueues one job per file (all its text indices) and raises the
per-file deadline to 45 min so even ~200GB remuxes finish the single read in the
background (idempotent; the on-demand /sub keeps its 60s fallback). Thumbnails
are unaffected — a keyframe seek reads a tiny slice (~0.7s even on 60GB).
2026-06-02 10:09:28 +02:00
..
mediainfo perf(stream): extract all text subtitles of a file in one ffmpeg pass 2026-06-02 10:09:28 +02:00
cache.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
cache_test.go feat: add migrate command, media server detection, and debrid auto-config 2026-03-29 16:54:32 +02:00
delete.go feat(library): add server-driven file deletion with allow_delete config 2026-04-10 16:35:12 +02:00
delete_test.go feat(library): add server-driven file deletion with allow_delete config 2026-04-10 16:35:12 +02:00
paths.go feat(scan): always scan downloads + organize dirs, deduplicate child paths 2026-04-10 11:46:20 +02:00
prewarm.go perf(stream): extract all text subtitles of a file in one ffmpeg pass 2026-06-02 10:09:28 +02:00
resolve.go fix(library): classify resolution by width + height, not height alone 2026-05-27 11:54:29 +02:00
resolve_test.go fix(library): classify resolution by width + height, not height alone 2026-05-27 11:54:29 +02:00
scanner.go chore: rename module from torrentclaw-cli to unarr 2026-03-30 13:06:07 +02:00
scanner_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
sync.go fix(library): classify resolution by width + height, not height alone 2026-05-27 11:54:29 +02:00
sync_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
types.go fix(lint): use default:none to disable errcheck, fix all gofmt and exhaustive 2026-03-31 00:29:16 +02:00