Skip to content

Subtitles

AutoMiner mines from subtitle lines. Every card’s sentence is one line of a source’s subtitles, and every clip is cut where that line is spoken. This page explains where the subtitles come from, how AutoMiner reads them into lines, how to pick or load a different subtitle file, how to fix timing by hand, and every setting in Settings › Subtitles.

Checking subtitle timing against the audio is the job of the judge. It has its own page: The judge.

A few terms used below:

  • Source: one video, episode or podcast episode you watched or listened to.
  • Cue: one entry in a subtitle file: a start time, an end time and some text.
  • Line: what AutoMiner mines from. Usually one cue, but AutoMiner can split a cue that holds two speakers, and join cues that are one sentence.
  • Offset: a shift in seconds applied to all of a source’s subtitle times.
  • Subtitle check (判定, “check” in the English UI): the judge’s verdict on whether the subtitles are timed to the audio. See The judge.

AutoMiner always prefers subtitles that already exist. It transcribes the audio (speech recognition, ASR) only when it finds no subtitles. It looks for subtitles in the source’s own language (see Language profiles).

  1. The captions the uploader added in the video’s language.
  2. YouTube’s automatic captions in that language.
  3. Transcription, when the video has neither.

When a video has only automatic captions, AutoMiner stores them and then transcribes the video with your transcription provider, if a key is set and the budget allows the call. The transcript then replaces the automatic captions as the source’s lines. If the transcription is skipped or fails, AutoMiner mines the automatic captions, and the subtitle screen names them YouTube auto subtitles. After a transcript replaced them, they stay available there as the YouTube subtitles card.

Two YouTube settings, in Settings › Sources › YouTube, decide which videos are mined at all:

Setting Default What it does
Mine only videos with manual subtitles OFF ON: only videos with uploader captions in the video’s (studied) language are mined automatically. Others stop with a reason such as “No manual Japanese subtitles (auto captions only)”.
Mine only videos in a studied language OFF ON: a video whose audio is known to be in none of your studied languages is not mined, even if it has subtitles in one.

YouTube sources have no subtitle pool (see below).

Stremio sources are video files AutoMiner downloads. It tries, in order:

  1. A subtitle file next to the video with the same name (.srt, .ass or .smi).
  2. A text subtitle track embedded in the video, in the source’s language. Tracks tagged with another language are skipped. Untagged tracks are used only if their text is in the source’s language.
  3. Jimaku, for Japanese only, when a Jimaku API key is set.
  4. Transcription, when nothing above was found.

Image-based subtitle tracks (such as Blu-ray PGS) cannot be read. They show on the subtitle screen as Image subtitles (cannot extract).

When nothing is found and transcription is off or has no key, the fetch fails with No subtitles found, followed by the reason (for example Transcription OFF).

Animetosho and OpenSubtitles are not part of this order. They only add check candidates to the subtitle pool.

Podcasts have no subtitles. AutoMiner always transcribes them with your transcription provider. With Only what I watched chosen for the platform, only what you listened to, plus 2 minutes, is transcribed; listening further transcribes the rest. Podcasts are never checked by the judge.

Source of subtitles Languages Needs Cost
Uploader captions, automatic captions (YouTube) any nothing free
Companion file, embedded tracks (Stremio) any ffmpeg and ffprobe on the server free
Jimaku Japanese a Jimaku API key (jimaku.cc → Account) none from AutoMiner
Animetosho (pool only) Japanese nothing none from AutoMiner
OpenSubtitles (pool only) any an OpenSubtitles API key (opensubtitles.com → Consumers) none from AutoMiner; the site limits downloads per key
Transcription with OpenAI (Whisper) any an OpenAI key about $0.36 per hour of audio
Transcription with ElevenLabs (Scribe) any an ElevenLabs key with Speech to Text access about $0.40 per hour of audio

Where to enter the keys:

  • Jimaku: Settings › Languages, the Japanese tab, Japanese options › Jimaku API key.
  • OpenSubtitles, OpenAI and ElevenLabs: Settings › Services › API keys.

Keys are stored in the server’s secrets directory, never in the database. You can also set them with autominer secret set <NAME> (see Configuration).

Transcription is a paid call. AutoMiner estimates its cost from built-in price tables and refuses it when it would break a spending limit in Settings › Budget. The job then waits as Waiting for budget and resumes by itself when the day or month turns or you raise the limit.

The subtitle pool: several candidates per episode

Section titled “The subtitle pool: several candidates per episode”

For an episode, there is often more than one subtitle file: different fansubs, different releases, or files made for another cut of the episode. AutoMiner can collect several and let the judge pick the one that matches the audio.

The pool is filled from three sites, each tried only if it serves the source’s language:

Site Languages Needs New files per gathering
Jimaku Japanese its API key up to 20
Animetosho Japanese nothing up to 4
OpenSubtitles any its API key up to 4

A site without its key is skipped.

A downloaded file is kept only if it parses, its text is in the source’s language, and it is not identical to a file already there.

The pool is gathered:

  • when a subtitle check starts for a source that has no pool yet,
  • when you press Check by audio on the subtitle screen,
  • when you press Update subtitles on the subtitle screen,
  • when you press a source’s ↻ button while it reads Gather subtitles again and check (shown when the source’s original subtitle file is gone).

The Workers strip shows this job as Gather subtitle candidates. Gathering never changes the subtitles in use. Pool files appear on the subtitle screen as cards whose second line names the site, where you can preview them or pick one yourself.

When AutoMiner reads a subtitle file into lines, it applies these steps, in order. The filter, the speaker breaks and the sentence continuation patterns are settings in Settings › Subtitles › Advanced (see Settings › Subtitles). Subtitle files on disk are never rewritten, so you can change a rule and read the file again.

  1. Speaker breaks. When one cue holds two speakers’ lines on separate lines, it is split where a later line starts with a match. This runs on the text before the filter, so a bracketed name can mark the break and the filter can then remove it.

  2. Subtitle filter. Each pattern is a regular expression. Matching text is removed from the cue. A cue left empty is dropped, time and all. For example, (ドアが開いた) goes as a whole cue, and the name in (ルーデウス)… is removed while the line stays.

  3. Joining cues into one sentence. Two cues next to each other become one line when the first does not end a sentence and one of these holds:

    • the first ends with a joining comma (、 for Japanese; , or 、 for Chinese),
    • a Sentence continuation pattern matches the line so far (by default: a line ending in ― or an arrow, or a 「 or 『 not yet closed),
    • the second cue is shown inside the first (overlapping cues),
    • the judge said the two cues are one sentence split by the subtitles (Japanese only; see Line joins).

    A join never spans a gap of more than 1.5 s or a line longer than 15 s, except while a continuation pattern holds it open, up to 30 s. Outside a continuation, katakana-only lines and a cue that starts with a speaker mark are not joined. A sung lyric is never joined with a spoken line.

Transcripts (podcasts, generated subtitles) skip the filter and the speaker breaks, and join on their own rule: a line that does not end a sentence (with 。, ! or ?, a closing bracket or an ellipsis) joins the next when the gap is at most 1.5 s, up to 15 s. 「今、」 and 「やる気がありますか?」 become one sentence. A Sentence continuation pattern can still hold a transcript line open.

To join a neighbouring line to one card’s sentence by hand, use Add previous and Add next in the card editor.

A change applies from the next read. Sources already read become stale: their row in Sources shows how many items are stale, and the source’s dependency graph (open it with the status mark next to the source’s title) marks Subtitle parsing as Changed. Press the source’s ↻ button (Fix dependencies) to read its subtitles again and mine again. The ↻ in the Sources bar does every stale source.

Each source with a local video (or a kept audio track) has a subtitle screen. To open it, go to the source’s page and press the subtitles button at the top right (tooltip Sync subtitles). The page title becomes “source — Subtitle sync”.

What is on it:

  • The bar: Words (back to the source), the source’s language, Update subtitles, Load subtitles and Save.
  • The name of the subtitles being shown. “(unsaved · save to keep)” follows it while you preview subtitles that are not in use.
  • Undo alignment, when the last timing change can be undone.
  • A search box (Search the subtitles).
  • The Subtitle check by audio card, with the judge’s verdict. See The judge.
  • The player, with the current offset over the picture (for example +1.0s, followed by Unsaved until you save). Without a local video it plays the audio and says No video — playing the audio.
  • The offset buttons, then the list of subtitle cards.
  • At the side, every line of the subtitles shown, with its start time. Click a line to jump to it.

Clicking a subtitle card only previews it: the player and the line list show it, and nothing changes for the source. Leaving the page drops the preview. Save is the only thing that switches the source to it. The card marked In use is the one the source uses; the mark moves only after a save succeeds.

The cards, top to bottom:

Card What it is When you click it
Check candidates (times fixed by audio) Every subtitle the last check ranked, each shifted or retimed as the check measured it Previews it with those times. See Picking a check candidate.
The subtitles in use Shown when they are not one of the files below, for example YouTube subtitles, YouTube auto subtitles or Generated subtitles —
Jimaku files Files listed on Jimaku for this episode Previews it, downloading it if needed
Pool files Files from the subtitle pool; the second line names the site Previews it
YouTube subtitles or Embedded subtitles The platform’s own subtitles, kept from the first fetch, when other subtitles are in use Saved: previews them. Fetch again: asks, then fetches them and replaces the source’s subtitles
Generated subtitles A transcript of the audio Generated: previews it. Not generated: asks, then transcribes (paid) and replaces the source’s subtitles
Other files Files you loaded and earlier check results Previews it
Embedded subtitles (group) Every subtitle track inside the video file Text tracks are extracted on first click (Extracting…)

j and J (or the Subs ⟳ button) step through the Jimaku files.

Generating subtitles transcribes the whole source with the provider set in Settings › Subtitles › Subtitle transcription, then replaces the source’s subtitles with the transcript. The confirmation dialog names OpenAI, but the provider you chose is the one used.

After a save that changes the subtitles, AutoMiner says how many lines the source now has and how many old candidates will be rebuilt. Candidates and clips stay as they are until you press Recalculate (in the source’s More actions menu) or the source’s ↻ Fix dependencies. With Check mode on, the new subtitles are checked on that next run.

File and pool cards have a ✕. It deletes only the file; the source’s lines stay. You cannot delete the file in use: save another one first.

Update subtitles does three things:

  1. Lists the subtitles again from every place (Jimaku, the video’s embedded tracks).
  2. Gathers the subtitle pool again (with Check mode on, a check follows).
  3. Reads the file in use again with the current reading rules. Only lines that changed are replaced, and they keep the start times a check gave them. When lines were replaced, the source is mined again.

The message says what happened, for example “Subtitles re-read: 3 lines replaced (412 unchanged)” or “Subtitles are up to date”. If the original file is gone, the subtitles in use are not read again, and the message says so.

  1. On the subtitle screen, press Load subtitles.
  2. Choose a .srt, .ass, .ssa or .smi file of at most 8 MB.
  3. Confirm Switch the subtitle file to “…”?

The file’s cues replace the source’s lines at once. AutoMiner reads UTF-8, and for older files the usual encoding of the source’s language (Shift_JIS for Japanese, CP949 for Korean, GB18030 or Big5 for Chinese). The reading rules above apply. The message says “Switched to “…” (n lines …)“. Candidates and clips stay until you press Recalculate.

AutoMiner refuses a file with another extension, an empty file, a file over 8 MB, or one with no cues it can read. These refusals are shown in Japanese for now.

The loaded file stays in the source’s folder and appears as a card, so you can switch back and forth.

Most timing problems are a constant shift: every line shows a second or two early or late. Fix that with the offset on the subtitle screen.

  1. Open the subtitle screen and play a stretch with speech.

  2. Move the subtitles with the buttons under the player, or the keys:

    Button Key Effect
    −10 { subtitles 10 s earlier
    −1 [ subtitles 1 s earlier
    −0.1 z subtitles 0.1 s earlier
    +0.1 Z (shift+z) subtitles 0.1 s later
    +1 ] subtitles 1 s later
    +10 } subtitles 10 s later
    — - / = subtitles 30 s earlier / later

    Holding a button repeats it. The offset stays between −600 s and +600 s. Reset puts back the saved offset.

  3. Press Save. The message reads “Subtitle offset set to ns” and reminds you that clips can be re-cut with the source’s ↻ Fix dependencies.

Saving an offset does not re-cut clips by itself: the source’s line times become stale, and ↻ Fix dependencies re-cuts them.

When you can find one line in the audio, let AutoMiner compute the offset:

  1. Play the video to the moment the line starts and pause.
  2. Press / and type part of the line. The results show the top 20 matches.
  3. Press ⚓ at the end of the right result (with the keyboard: move to the result and press Enter).

The offset becomes the gap between the line’s time in the file and the playhead. AutoMiner plays 2 seconds so you can hear it, and says “Subtitle t → playhead t ⇒ offset d — not saved yet”. Press Save to keep it.

You can also work the other way round: click a result to jump to where that line shows now, move the player to where it is actually spoken, then press ⚓ Align under the player.

With a Transcription runner set up, AutoMiner measures where each line is actually spoken (after a subtitle check, and before clips are cut, even with Check mode off). The line list at the side then shows a badge per line of the subtitles in use:

  • the share of the line the speech recognizer heard (for example 92%),
  • how far the first word is from where the line shows (for example +0.35s),
  • green when the line was clearly heard, gold when partly, red when hardly. ✗ marks a line the judge said was not spoken.

Hover a badge for the details, including what was heard. The shift follows the offset on screen, so you can see an unsaved offset’s effect before you save.

When the check applied an offset, or moved lines one by one to where they were heard, the screen shows “Applied: Check” or “Applied: Line times fixed by listening” with Undo alignment. Undo puts the times back and restores your own offset. A check that wrote new subtitles (another file, or lines retimed one by one) cannot be undone this way: choose the old file on the subtitle screen and save it.

A single line’s clip range can be changed without touching the subtitles:

  • In the card editor, drag the clip’s edges (see The pages).
  • In Audit › Lines, open the line and move its clip range. Cards made from that line from then on are cut to it.
Key Action
space play or pause
← / → back or forward 2 s (shift: 10 s)
, / . previous or next line
z Z [ ] { } - = shift the subtitles (table above)
j / J previous or next Jimaku file
/ search the subtitles
esc close the search results
f full screen
m mute
c show or hide the subtitles on the video

Audit › Lines lists every subtitle line of your sources, one row per line, newest first by default. Lines of deleted sources are not listed.

Column What it shows
Sentence the line’s text
Source the source’s title, with its language
No. the line’s number in the source
Time where the line starts
Cards how many cards use the line

Search works as in Audit › Clips: a bare word looks in the sentence, and source:Name*, episode:12, lang:zh and prop:len<5 narrow the list. Terms separated by spaces must all match, or gives either, a leading - excludes, ( ) groups and * matches any text. The ? beside the box lists them.

Click a row, or select it with ↑ ↓ (or j k) and press Enter, to open the line in the editor. It opens the line itself, not one of its cards. Its range is the line’s clip: move it and save, and cards made from the line from then on are cut to it. The editor’s Words tab lists the line’s words and the cards already made from it; picking a word opens its card, making it from the line’s clip if it does not exist yet. The pages describes the rest.

The Subtitles section holds two cards and, at its foot, a collapsed Advanced row with four more. Defaults are what a new install uses.

Used for sources without subtitles (and YouTube videos with only automatic captions).

Setting Default What it does
Provider OpenAI (Whisper) Who transcribes: OpenAI (Whisper), ElevenLabs (Scribe) or No transcription. With No transcription, videos without subtitles and podcasts are skipped. Needs that provider’s key in Settings › Services › API keys.
Advanced › OpenAI model whisper-1 (blank) The OpenAI model to call.
Advanced › ElevenLabs model scribe_v1 (blank) The ElevenLabs model. Its per-word timestamps are grouped into sentence cues.

The tabs under Advanced only show the model of each provider; only the Provider is used.

Subtitle check (checked against the audio)

Section titled “Subtitle check (checked against the audio)”

This card turns the judge’s subtitle check on and sets how it listens. Every row is explained in The judge.

Setting Default What it does
Services the check uses — A status table: Voice separation · optional, Transcription · required, Judge service · required.
Transcription use (30 days) — Minutes sent to transcription and the estimated cost, per model and use: Check · measure (the check and line measuring) and Subtitle generation. Not a bill.
Check mode OFF ON: when candidates are made from a subtitled source, its subtitle timing is checked against the audio and fixed if off, once per subtitle file.
Transcription runner Container — transcription service Where the check’s audio is transcribed: Container — transcription service, Cloud — OpenAI, Cloud — ElevenLabs Scribe or This machine — Whisper.
Advanced › Spans to hear (max) 12 (3 to 48) Used only when a sampled check is requested through the API. Checks started from the app hear the whole source.
Advanced › Check each line with the judge service OFF ON: the judge also confirms, for every measured line, that it was really said.

Check mode and Transcription runner have tabs: Shared, YouTube and Stremio. A kind’s tab can override the shared value; until it does, it shows “Inheriting the shared setting”.

Advanced: subtitle filter, speaker breaks, sentence continuation, voice separation

Section titled “Advanced: subtitle filter, speaker breaks, sentence continuation, voice separation”

These cards are collapsed under Advanced at the foot of the section. The three lists take one Python regular expression per line. Press Fill defaults to fill in the starter list, then save. A pattern that is not a valid regular expression, or that matches empty text, is not used, and the status line lists it.

Setting Default What it does
Subtitle filter blank (OFF) Removes matching text from every cue when subtitles are read; an emptied cue is dropped. The starter list drops whole cues that are signs ({\an8}), italic only, or hold ♪ or ♬. From the cues that stay it removes text in round brackets (sound effects, names), text in 《 》 or 〈 〉, arrows, ⚟ ⚞ marks, < > marks, line breaks inside a cue and leading dashes.
Speaker breaks blank (OFF) Splits a cue where a later line starts with a match. The starter list: a bracketed name, a dash, ⚟ or ⚞. Removing the name is the filter’s job: with the filter empty, the names and dashes stay in the text.
Sentence continuation blank (OFF) While a pattern matches, the next cue joins the same line, for up to 30 s. The starter list: a line ending in ―, ➡, ➨ or →, and an unclosed 『 or 「.
Separation mode (Shared, YouTube only, Stremio only) No separation Pulls the voice out of music before the check transcribes it: No separation, This machine — MDX-Net (not on a Raspberry Pi) or Container — separation service. Slow; turn it on only for kinds with a lot of singing. Not used for clip edges.
Separation model (this machine only) blank (mdx_vocals.onnx) The model file for separating on this machine. A bare file name is looked up in the models folder.
Execution providers (this machine only) blank (CPU) The compute devices for separating on this machine, in order, comma separated. DmlExecutionProvider uses a GPU on Windows.
Where Setting Default
Overview › Cost presets Free, Recommended and Minimal fill in Check mode, the transcription runner, the transcription provider and translation at once. Nothing changes until you save. —
Languages, Japanese tab › Japanese options Jimaku API key not set
Languages, Chinese tab › Chinese options Chinese script: Simplified or Traditional, when a video has both Simplified
Sources › YouTube Mine only videos with manual subtitles, Mine only videos in a studied language OFF, OFF
Services › API keys OpenSubtitles, OpenAI, ElevenLabs not set
Services › Service addresses Transcription service URL, Separation service URL not set

The two service addresses are for the transcription and separation containers. Setting them up is in Self-hosting the separator and the recognizer.

What you see What it means What to do
A Stremio source fails with No subtitles found No subtitle track in the source’s language, no Jimaku match, and transcription is off or has no key Add a Jimaku key (Japanese), load a file yourself, or set a transcription Provider and its key.
“No manual Japanese subtitles (auto captions only)” Mine only videos with manual subtitles is ON Turn it off, or press the source’s mine button (Fetch the video again and mine from scratch): a fetch you start by hand is not held back by this setting.
A track shows Image subtitles (cannot extract) The track is pictures, not text Use another track, Jimaku, a file, or transcription.
Lines start or end a moment off, all by the same amount The file is timed for a slightly different video Shift the offset, or turn on Check mode and let the judge measure it.
Lines drift further off as the episode goes on The file was made for another cut Try another card on the subtitle screen, or let the judge pick.
A save on the subtitle screen did nothing Nothing changed The message says “No changes”.
Lines still hold sound effects or names after you edited the filter Sources read before the change keep their old lines Press the source’s ↻ Fix dependencies.
Transcription waits as Waiting for budget A spending limit would be crossed See Spend, or raise the limit in Settings › Budget.

The internal design of subtitle timing, with every rule the check applies, is in Subtitle sync.