Extract text subtitle streams to sidecar SRT #189
Closed
opened 2026-08-24 21:28:32 +01:00 by naps62-yolo
·
2 comments
No Branch/Tag Specified
main
ui-mobile-first
codex/fix-action-button-reload
translation
qbit-2
docker
bugs
blitz/subtitles
fix/255-provider-reorder
blitz/feedback-3
subtitles/251-icon-vocab
subtitles/237-relocate-subs
fix/248-title-move-creates-root
blitz/feedback-2
issue/227-abandoned-pack-visible
issue/245-backoff-anchor
issue/240-design-coherence
issue/211-waived-rule
issue/232-plainer-words
issue/246-policy-reclassify
issue/244-root-slash-stored
issue/231-settings-rows
issue/241-reclassify-on-root-change
issue/239-failure-window
issue/230-icon-only
issue/243-root-path-edges
issue/238-attention-liveness
issue/229-back-button
issue/236-root-path-move
issue/226-attention-threshold
issue/228-root-move
blitz/size-bands
size-bands/209-runtime-scale
size-bands/210-size-waiver
size-bands/208-runtime-design
blitz/reliability
reliability/155-sqlx-migrations
reliability/176-refresh-on-add
removal-nav/175-removal-controls
removal-nav/174-season-file-removal
removal-nav/172-search-titles
removal-nav/173-homepage-library
removal-nav/171-untrack-clears
removal-nav/170-chip-align
removal-nav/169-design-amendment
feedback/167-deck-autosearch
feedback/165-chip-colour
feedback/166-header-rail
feedback/163-drop-cast
feedback/164-control-geometry
feedback/162-season-ordering
feedback/161-search-episodes
feedback/160-autotrack-seed
feedback/159-design-amend
blitz/rich-metadata
rich/151-grid
rich/148-search-rows
rich/150-series-meta
rich/149-movie-page
rich/147-search-art
rich/156-rating-null
rich/146-meta-api
rich/145-poster-cols
rich/144-trailer
rich/143-meta-detail
rich/142-design-amend
blitz/153-empty-episode-titles
blitz/152-deck-routes
blitz/141-season-vanished-api
blitz/129-series-detail-view
blitz/140-attention-episode-numbers
blitz/137-season-removals
blitz/133-attention-tv-lanes
blitz/139-movie-id-episode-guard
blitz/134-stale-attention-queue
blitz/124-rss-episode-matching
blitz/136-imdb-series-lookup
blitz/132-manual-commands
blitz/128-series-delete-files
blitz/131-status-seasons-input
blitz/138-plural-season-range
blitz/135-pack-name-parse
blitz/122-upstream-removals
blitz/130-add-series-search
blitz/121-series-refresh
blitz/127-unified-search-tv
blitz/123-episode-matching
blitz/126-tv-attention
blitz/119-tracked-rule
blitz/125-season-deck
blitz/120-tvdb-id
blitz/118-season-zero
blitz/117-design-amend
issue/115-avail-search
issue/112-name-truncate
issue/111-score-colors
No results found.
Labels
Clear labels
area/api
area/ci
area/compat
area/core
area/daemon
area/db
area/dl
area/indexer
area/infra
area/meta
area/parse
area/probe
area/subs
area/web
difficulty/easy
difficulty/hard
difficulty/moderate
difficulty/trivial
phase/1-skeleton
phase/2-logic
phase/3-sourcing
phase/4-movies
phase/5-ui
phase/6-tv
phase/7-people
phase/8-compat
phase/9-subtitles
type/bug
type/chore
type/feature
type/test
arr-api
CI and test harness
arr-compat
arr-core
arr-daemon
arr-db
arr-dl
arr-indexer
workspace and tooling
arr-meta
arr-parse
arr-probe
arr-subs crate: providers, extraction, translation, sync
web/
bounded, obvious approach, few files
subtle correctness or cross-cutting
multiple files, judgement, an interface to design
one file, mechanical, no design decisions
workspace, CI, config, database, empty API and SPA
parsing and policy engine, pure, no network
TMDB and Prowlarr, read-only
movies end to end
search, buckets, library views, queues
seasons, episodes, tracking, derived status
owner tags and notifications
Jellyseerr shim
build order: subtitles, DESIGN.md §15
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: yolo/arr#189
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Extract text-format embedded subtitle tracks to sidecar SRT files, so an
embedded English track can serve as a translation source. Bazarr cannot do
this, and it is the single reason the operator asked for embedded handling at
all (DESIGN.md §15, added by #183).
arr-probealready reports subtitle tracks with resolved languages. It mustadditionally report the codec, because the split that matters is text versus
bitmap.
subrip,ass,mov_text— extract withffmpeg, mappingthe single stream and converting to SRT. Spawn-and-die, like
ffprobe.viewing and are recorded as satisfying, but they are never extracted and
never become a translation source. No OCR (that is deliberately deferred; see
the separate backlog issue).
reconcile loop can tell a satisfied language from a gap without re-probing.
An extracted track is written as a sidecar under the naming rule in §15, with
no
.mtsegment — it is a real subtitle, not a machine translation.Depends on: #184, #186
Scope addition from the milestone driver — please fold this in.
Two separate reports (#184 and #186) landed on the same gap:
arr_core::SubtitleTrackcarries onlylanguage. It needs two more facts, and both belong to the probe change this issue already owns:subrip,ass,mov_text) from image formats (PGS, VobSub) per §15.forceddisposition — not currently in any issue. §15 says a forced track never satisfies a want. #186's schema keys embedded rows on(media_file_id, language, forced, sdh), but with nothing supplyingforcedevery embedded track records asforced = false, so a file carrying only a forced English track reads as satisfied for English and the reconcile loop stops looking. ffprobe reports it asdisposition.forced(anddisposition.hearing_impairedfor SDH, worth carrying at the same time).Add both to
SubtitleTrackand to whateverarr-probefills it from. This does not widen the issue much — it is the same struct and the same ffprobe read.Implemented #189 on branch
subtitles/189-extract-subs(two commits, based offblitz/subtitles).arr_core::SubtitleTracknow carries the codec — a newSubtitleCodecenum (SubRip,Ass,MovText,Pgs,VobSub,Other) with anis_text()split per §15 — plus theforcedandsdhdispositions from the milestone-driver comment;arr-probefills all three from ffprobe'scodec_nameanddisposition. Extraction lives in a newarr_probe::Extractor: one spawn-and-die ffmpeg call maps a single subtitle stream and converts it to SRT, writing beside the target under a dot-name and renaming so no half-written sidecar is ever visible. A purelayout::subtitle_namehelper builds §15's<video>.<lang>.srt/.mt.srtnames. The committed fixture clip gained a forced track and was regenerated viamake-probe-fixtures.sh; tests cover codec mapping (including PGS/VobSub names), live extraction of text tracks, stream indexing by subtitle position, and out-of-range-stream failure.just ci: passed (gate exit 0; 499 tests green). Not merged, no PR opened.Findings
probed_json(crates/arr-daemon/src/import.rs) now serialises codec/forced/sdh into themedia_files.probedcolumn, but nothing yet writes embedded tracks tosubtitle_filesat import time — I read that wiring as #196's step 1 and left it there.NewSubtitleFile::extractedin arr-db takes the path but ignores its own builder pattern (..Self::new) inconsistently with the other constructors — cosmetic only, works fine.