-
Notifications
You must be signed in to change notification settings - Fork 512
feat(matroska): Add VOBSUB subtitle extraction support for MKV files #1919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+401
−9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, CCExtractor would only print "Error: VOBSUB not supported" when encountering VOBSUB (S_VOBSUB) subtitle tracks in Matroska files. This left users without any usable output. This commit adds full VOBSUB extraction support: - Generate proper .idx index files with timestamps and file positions - Generate proper .sub files with PS-wrapped SPU data - Correct PS Pack header with SCR derived from timestamps - Correct PES header with PTS for each subtitle - 2048-byte block alignment (standard VOBSUB format) The output is compatible with VLC, FFmpeg, and other players that support VobSub subtitle format. Tested with sample from issue #1371 - output validates correctly with FFprobe and produces identical subtitle data to mkvextract. Fixes #1371 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add docs/VOBSUB.md explaining the VOBSUB extraction workflow - Add tools/vobsubocr/Dockerfile for building subtile-ocr OCR tool - Document how to convert VOBSUB (.idx/.sub) to SRT using OCR The Dockerfile uses subtile-ocr (https://github.com/gwen-lg/subtile-ocr), an actively maintained fork of vobsubocr with better accuracy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MSVC doesn't support variable-length arrays (VLAs). The const int declaration wasn't being treated as a compile-time constant, causing Windows build failure with errors C2057, C2466, C2133. Changed to #define which is a true compile-time constant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 5beb438...:
Congratulations: Merging this PR would fix the following tests:
All tests passed completely. Check the result page for more info. |
Collaborator
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit ec30a79...:
Your PR breaks these cases:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Core VOBSUB extraction (
src/lib_ccx/matroska.c):save_vobsub_track()function to write both .idx and .sub filesLLX_M) for cross-platform file position formattingDocumentation and tooling:
docs/VOBSUB.md- comprehensive guide for VOBSUB extraction and OCR conversiontools/vobsubocr/Dockerfile- Docker image for subtile-ocr (VOBSUB to SRT conversion)Usage
Test plan
dvd_subtitlecodecFixes #1371
🤖 Generated with Claude Code