Ship the extractsubs subtitle-extraction helper with the app

extractsubs pulls the subtitle tracks out of mkv/mp4 files with ffmpeg
stream copy — .srt/.ass/.ssa/.vtt text, .sup for PGS (then converted to
.sub/.idx with sup2vob --full) — defaulting to English tracks, --all for
every language. Output names follow the shape the app's importers probe
(<input>.<track>[.<type>].<lang>.<ext>), so extracted files drag back
into Subler already named and tagged.

The script lives in Utilities/ beside ParseFilename and is copied into
the app bundle's Resources by the build (like ParseFilename, but nothing
in the app invokes it — it's for terminal use). Dependencies are checked
up front (ffprobe/ffmpeg/sup2vob on PATH; mkvtoolnix plus python3 only
for the S_TEXT/WEBVTT rescue path).

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-28 22:58:27 -05:00
1 parent 87e0c82bbb
commit c08d607baa
3 files changed
+363 -1

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ xcodebuild -project Subler.xcodeproj -scheme Subler -configuration Debug build
No deployment-target override is needed: the projects moved from upstream's 10.13 to `$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)` (recent toolchains refuse 10.13).
There is **no test target and no CI** — changes are verified by building and running the app manually. Of the `Utilities/` tools, MP4Dump (legacy ObjC debugging) is not part of the app build, but `ParseFilename/` **is** — it's copied into the app bundle and executed at runtime by `MetadataHelper.parseFilename` via `Process`.
There is **no test target and no CI** — changes are verified by building and running the app manually. Of the `Utilities/` tools, MP4Dump (legacy ObjC debugging) is not part of the app build, but `ParseFilename/` **is** — it's copied into the app bundle and executed at runtime by `MetadataHelper.parseFilename` via `Process`. `extractsubs` is also copied into the bundle (Resources phase → `Contents/Resources/extractsubs`, exec bit preserved by the copy) but **nothing in the app invokes it** — it's a user-facing CLI helper shipped with the app: it extracts subtitle tracks from mkv/mp4 files via ffmpeg stream copy (named `<input>.<track>[.<type>].<lang>.<ext>` — the shape `getFilenameLanguage`/`getFilenameSubtitlesTrackName` probe, so results drag straight back in) and runs `sup2vob --full` on extracted PGS `.sup` files. It needs ffprobe/ffmpeg/sup2vob on PATH (sup2vob builds from the Sup2Vob sources with `make && sudo make install`), plus mkvtoolnix and python3 only for its `S_TEXT/WEBVTT` rescue path, and it skips extraction with a clear message rather than failing per-track mid-pipeline.
## Architecture