Skip to content

Commit 619ef9e

Browse files
authored
Refactor README for clarity
1 parent cf97e93 commit 619ef9e

1 file changed

Lines changed: 13 additions & 38 deletions

File tree

plugins/extractSubtitles/README.md

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,36 @@
11
# Extract Embedded Subtitles
22

3-
A Stash plugin that pulls **embedded text subtitle tracks** out of your video
4-
files and writes them as external `.srt` sidecar files. Stash already displays
5-
external captions, so once the files exist they show up in the video player's
6-
caption menu — this just automates creating them.
3+
A Stash plugin that pulls **embedded text subtitle tracks** out of your video files and writes them as external `.srt` sidecar files. Stash already displays external captions, so once the files exist they show up in the video player's caption menu—this just automates creating them.
74

85
Addresses [stashapp/stash#3875](https://github.com/stashapp/stash/issues/3875).
96

107
## Why a plugin?
118

12-
Video.js (Stash's player) cannot render *embedded* subtitle tracks directly, and
13-
the maintainers' preferred path for this feature is a plugin that generates
14-
sidecar `.srt` files (see the issue discussion). This plugin does exactly that,
15-
naming the files so Stash's built-in caption matcher attaches them automatically.
9+
Video.js (Stash's player) cannot render *embedded* subtitle tracks directly, and the maintainers' preferred path for this feature is a plugin that generates sidecar `.srt` files (see the issue discussion). This plugin does exactly that, naming the files so Stash's built-in caption matcher attaches them automatically.
1610

1711
## What it does
1812

1913
- Uses `ffprobe` to find subtitle streams in each scene's file(s).
20-
- Extracts each **text** track (SubRip, ASS/SSA, mov_text, WebVTT, …) to
21-
`videoname.<lang>.srt` next to the video, matching Stash's caption naming
22-
convention (`pkg/file/video/caption.go`).
23-
- Triggers a scan of the affected folders so the captions appear without you
24-
having to manually rescan the whole library.
14+
- Extracts each **text** track (SubRip, ASS/SSA, mov_text, WebVTT, …) to `videoname.<lang>.srt` next to the video, matching Stash's caption naming convention (`pkg/file/video/caption.go`).
15+
- Triggers a scan of the affected folders so the captions appear without you having to manually rescan the whole library.
2516

2617
### Limitations
2718

28-
- **Image-based subtitles** (PGS / Blu-ray, VobSub / DVD, DVB) are *skipped*
29-
they're bitmaps and can't be converted to text without OCR.
30-
- **ASS/SSA styling** (fonts, positioning, karaoke) is lost when converting to
31-
SRT. This is a deliberate, predictable trade-off; the original file is never
32-
modified.
33-
- Stash stores one caption per language, so if a file has two tracks in the same
34-
language only the `default` one is extracted.
19+
- **Image-based subtitles** (PGS / Blu-ray, VobSub / DVD, DVB) are *skipped*—they're bitmaps and can't be converted to text without OCR.
20+
- **ASS/SSA styling** (fonts, positioning, karaoke) is lost when converting to SRT. This is a deliberate, predictable trade-off; the original file is never modified.
21+
- Stash stores one caption per language, so if a file has two tracks in the same language only the `default` one is extracted.
3522

3623
## Install
3724

3825
1. Copy the `extractSubtitles` folder into your Stash `plugins` directory.
39-
2. Make sure `stashapp-tools` is available to the Python that Stash uses:
40-
`pip install stashapp-tools` (or use the **PythonDepManager** community plugin
41-
with the bundled `requirements.txt`).
42-
3. `ffmpeg`/`ffprobe` must be on `PATH`, or set their paths in Stash
43-
**Settings → System → FFMPEG**.
26+
2. Make sure `stashapp-tools` is available to the Python that Stash uses: `pip install stashapp-tools` (or use the **PythonDepManager** community plugin with the bundled `requirements.txt`).
27+
3. `ffmpeg`/`ffprobe` must be on `PATH`, or set their paths in Stash **Settings → System → FFMPEG**.
4428
4. In Stash, **Settings → Plugins → Reload Plugins**.
4529

4630
## Use
4731

48-
- **One-off / whole library:** **Settings → Tasks → Plugin Tasks →
49-
Extract Embedded Subtitles → run.** This walks every scene, extracts subs,
50-
then rescans the touched folders.
51-
- **Ongoing additions:** enable **Extract On Scan** in the plugin settings. New
52-
scenes get their subtitles extracted on creation and their folder rescanned.
53-
For a large *initial* import, prefer the one-off task instead of the hook to
54-
avoid many small rescans.
32+
- **One-off / whole library:** **Settings → Tasks → Plugin Tasks → Extract Embedded Subtitles → run.** This walks every scene, extracts subs, then rescans the touched folders.
33+
- **Ongoing additions:** enable **Extract On Scan** in the plugin settings. New scenes get their subtitles extracted on creation and their folder rescanned. For a large *initial* import, prefer the one-off task instead of the hook to avoid many small rescans.
5534

5635
### Settings
5736

@@ -62,12 +41,8 @@ naming the files so Stash's built-in caption matcher attaches them automatically
6241

6342
## Notes
6443

65-
This is a community plugin and not part of Stash core; it complements, rather
66-
than replaces, in-player rendering of embedded tracks.
44+
This is a community plugin and not part of Stash core; it complements, rather than replaces, in-player rendering of embedded tracks.
6745

6846
## Development
6947

70-
LLM-assisted, human-reviewed, and tested. Subtitle extraction was verified
71-
end-to-end against a real `ffmpeg`/`ffprobe` using a multi-track MKV (SubRip +
72-
ASS→SRT conversion + an untagged track), and the output filenames were checked
73-
against Stash's caption-matching rules in `pkg/file/video/caption.go`.
48+
LLM-assisted, human-reviewed, and tested. Subtitle extraction was verified end-to-end against a real `ffmpeg`/`ffprobe` using a multi-track MKV (SubRip + ASS→SRT conversion + an untagged track), and the output filenames were checked against Stash's caption-matching rules in `pkg/file/video/caption.go`.

0 commit comments

Comments
 (0)