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

+4
View File
@@ -50,6 +50,7 @@
A9433A911F2F5D8A00BB38CA /* ChapterDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9433A901F2F5D8A00BB38CA /* ChapterDB.swift */; };
A944E5921F498FC4002E43F6 /* PresetPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A944E5911F498FC4002E43F6 /* PresetPrefsViewController.swift */; };
A94A6A591ED1C5CC00049F7D /* ParseFilename in Resources */ = {isa = PBXBuildFile; fileRef = A94A6A581ED1C5CA00049F7D /* ParseFilename */; };
A9E77B152E5C0FF1E0000001 /* extractsubs in Resources */ = {isa = PBXBuildFile; fileRef = A9E77B152E5C0FF2E0000002 /* extractsubs */; };
A956C1E4202F1B170050C5E2 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = A956C1E3202F1B170050C5E2 /* Document.swift */; };
A956CE651F99E5BB00093992 /* ActivityWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A956CE641F99E5BB00093992 /* ActivityWindowController.swift */; };
A956CE691F99E93D00093992 /* ButtonToolbarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A956CE681F99E93D00093992 /* ButtonToolbarItem.swift */; };
@@ -341,6 +342,7 @@
A944E5911F498FC4002E43F6 /* PresetPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PresetPrefsViewController.swift; path = Classes/PresetPrefsViewController.swift; sourceTree = "<group>"; };
A94868D31F56BA0F00C47B75 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = Classes/it.lproj/PresetEditorViewController.strings; sourceTree = "<group>"; };
A94A6A581ED1C5CA00049F7D /* ParseFilename */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ParseFilename; path = Utilities/ParseFilename; sourceTree = "<group>"; };
A9E77B152E5C0FF2E0000002 /* extractsubs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.shell; name = extractsubs; path = Utilities/extractsubs; sourceTree = "<group>"; };
A956C1E3202F1B170050C5E2 /* Document.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Document.swift; path = Classes/Document.swift; sourceTree = "<group>"; };
A956CE641F99E5BB00093992 /* ActivityWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ActivityWindowController.swift; path = Classes/ActivityWindowController.swift; sourceTree = "<group>"; };
A956CE681F99E93D00093992 /* ButtonToolbarItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ButtonToolbarItem.swift; path = Classes/ButtonToolbarItem.swift; sourceTree = "<group>"; };
@@ -607,6 +609,7 @@
A9C498C2306BC6B9009F332A /* Ratings.json */,
A9C498C3306BC6B9009F332A /* Storefronts.json */,
A94A6A581ED1C5CA00049F7D /* ParseFilename */,
A9E77B152E5C0FF2E0000002 /* extractsubs */,
);
name = Resources;
sourceTree = "<group>";
@@ -935,6 +938,7 @@
A90CD5C51FD177280070A067 /* OutputPrefsViewController.xib in Resources */,
A9A4A966202F51FA00482D12 /* SaveOptions.xib in Resources */,
A94A6A591ED1C5CC00049F7D /* ParseFilename in Resources */,
A9E77B152E5C0FF1E0000001 /* extractsubs in Resources */,
A9ECA05D2029A11500D5F30C /* DetailsViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;