Offer VobSub conversion for PGS subtitle tracks

The subtitle import sheet gains a VobSub action for PGS-format tracks
(default following the bitmap-subtitle conversion preference), which
muxes them as real subp tracks via the framework's new
MP42PgsToVobSubConverter instead of only offering OCR'd tx3g text.
Localized for all six shipping languages.

Also names any flagged subtitle track "SDH" (the recognized community
tokens now share one name) and documents the MKV conversion-path naming
and the PGS-to-VobSub machinery in CLAUDE.md.

Bumps the MP42Foundation submodule for the converter and the
filename/TrackName SDH recognizer.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-28 20:01:04 -05:00
1 parent 5d6c0cd84c
commit dd956fa783
9 files changed
+29 -4

No files matched your search

+19 -2
View File
@@ -55,7 +55,16 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
tag: 0,
enabled: needsConversion == false)
actions.append(action)
// PGS can be kept as bitmap subtitles: the muxer converts the
// stream to VobSub (sup2vob) and writes a real MP4 subp track.
if track.format == kMP42SubtitleCodecType_PGS {
let bitmapAction = Action(title: NSLocalizedString("VobSub", comment: "File Import action menu item."),
tag: 2,
enabled: true)
actions.append(bitmapAction)
}
if (needsConversion || track.format == kMP42SubtitleCodecType_VobSub) {
let conversionAction = Action(title: NSLocalizedString("Tx3g", comment: "File Import action menu item."),
tag: 1,
@@ -157,6 +166,11 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
}
}
}
// PGS: keep it bitmap — VobSub by default, tx3g only if the
// user's bitmap-subtitles-to-tx3g preference says so
else if track.format == kMP42SubtitleCodecType_PGS {
self.selectedActionTag = Prefs.subtitleConvertBitmap ? 1 : 2
}
// Vobsub
else if track.format == kMP42SubtitleCodecType_VobSub && Prefs.subtitleConvertBitmap {
self.selectedActionTag = 1
@@ -371,7 +385,10 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
case let track as MP42SubtitleTrack:
if trackSettings.selectedActionTag > 0 {
if trackSettings.selectedActionTag == 2 {
// PGS → VobSub: mux as a bitmap subp track (sup2vob)
track.conversionSettings = MP42ConversionSettings.subtitlesVobSubConversion()
} else if trackSettings.selectedActionTag > 0 {
track.conversionSettings = MP42ConversionSettings.subtitlesConversion()
}
selectedTracks.append(trackSettings.track)