unarr/internal/library/mediainfo
Deivid Soto 1c8cc1c409 perf(stream): run the subtitle/thumbnail prewarm at idle I/O priority
The prewarm's single big read (a ~14 min sequential pass over a 60GB remux to
demux subtitles) shares the same disk/NFS as live streaming. Lower the prewarm
ffmpeg processes to the Linux IDLE I/O class (ioprio_set) so that background
read yields bandwidth to a user who's actually watching — the prewarm slows
down under contention instead of starving playback, and runs full speed when the
disk is idle.

Applied only to the prewarm-only extractors (ExtractSubtitlesVTTMulti,
ExtractThumbnailJPEG) via Start → setIdleIOPriority(pid) → Wait; the on-demand
/sub + /thumbnail handlers keep normal priority (a user is waiting on those).
Linux-only syscall behind a build tag; a no-op stub elsewhere. Best-effort —
errors ignored, never required for correctness.

Verified: the prewarm ffmpeg shows 'idle' under ionice -p; on-demand stays normal.
2026-06-02 11:51:26 +02:00
..
ffmpeg.go feat(stream)!: retire WebRTC, HLS-only, bump 0.9.4 2026-05-26 18:04:35 +02:00
ffmpeg_download.go feat(mediainfo): ResolveFFmpeg + DownloadFFmpeg mirroring ffprobe pattern 2026-05-06 09:49:32 +02:00
ffmpeg_test.go feat(mediainfo): ResolveFFmpeg + DownloadFFmpeg mirroring ffprobe pattern 2026-05-06 09:49:32 +02:00
ffprobe.go feat(stream): transcode debrid sources to HLS from a URL (hueco #2/2b) 2026-05-31 16:22:14 +02:00
ffprobe_download.go fix(library): use native arm64 ffprobe on Apple Silicon (osx-arm-64) 2026-04-09 09:26:10 +02:00
ffprobe_download_test.go test(mediainfo): add ffprobe download unit tests 2026-04-06 10:16:27 +02:00
ffprobe_test.go feat(cli): upgrade command, rich status, and version cache 2026-03-31 22:05:43 +02:00
ioprio_linux.go perf(stream): run the subtitle/thumbnail prewarm at idle I/O priority 2026-06-02 11:51:26 +02:00
ioprio_other.go perf(stream): run the subtitle/thumbnail prewarm at idle I/O priority 2026-06-02 11:51:26 +02:00
lang.go feat: add migrate command, media server detection, and debrid auto-config 2026-03-29 16:54:32 +02:00
lang_test.go feat: add migrate command, media server detection, and debrid auto-config 2026-03-29 16:54:32 +02:00
sidecar.go perf(stream): run the subtitle/thumbnail prewarm at idle I/O priority 2026-06-02 11:51:26 +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