Skip to content
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

Add initial support for VobSub subtitles #11

Merged
merged 16 commits into from
Oct 4, 2024
Merged

Add initial support for VobSub subtitles #11

merged 16 commits into from
Oct 4, 2024

Conversation

ecdye
Copy link
Owner

@ecdye ecdye commented Sep 24, 2024

This will only add support for VobSub stream decoding for the moment.
In the future additional support will be implemented for extracting the
stream from an input .mkv file like has been done with PGS subtitle
streams already.

For now this focuses on simply adding functionality for the basic VobSub
format without any extra bells or whistles.

@ecdye ecdye linked an issue Sep 24, 2024 that may be closed by this pull request
4 tasks
@ecdye ecdye self-assigned this Sep 24, 2024
@ecdye ecdye force-pushed the feat-sub branch 9 times, most recently from 1f866d3 to 58566f3 Compare October 1, 2024 19:36
@ecdye ecdye force-pushed the feat-sub branch 2 times, most recently from 6f0db74 to ff13a20 Compare October 3, 2024 05:25
@ecdye ecdye marked this pull request as ready for review October 3, 2024 05:38
@ecdye
Copy link
Owner Author

ecdye commented Oct 3, 2024

@timj If you don't mind, before I merge, would you try running this on a handful of you VobSub subtitle format files. This PR won't support reading them from Matroska files, but I will add that in a future PR. I just want to see how accurate this is for more than just the handful of files I have thrown at it.

@ecdye ecdye mentioned this pull request Sep 22, 2024
4 tasks
@ecdye ecdye force-pushed the feat-sub branch 4 times, most recently from fe2d90a to 01d833c Compare October 3, 2024 08:08
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@timj
Copy link

timj commented Oct 3, 2024

I will be happy to take a look this evening.

@timj
Copy link

timj commented Oct 3, 2024

First attempt:

$ macSubtitleOCR subs.idx . 
macSubtitleOCR/VobSubParser.swift:134: Fatal error: Unexpectedly found nil while unwrapping an Optional value
zsh: trace trap  macSubtitleOCR subs.idx .

with subs.tar.gz

@ecdye
Copy link
Owner Author

ecdye commented Oct 3, 2024

Whelp, this is why I'm glad I waited to merge. I'll try to look into this again this evening and see if I can figure out what I need to do to fix it.

@ecdye ecdye force-pushed the feat-sub branch 2 times, most recently from 07a1844 to bb48698 Compare October 4, 2024 05:53
@ecdye
Copy link
Owner Author

ecdye commented Oct 4, 2024

Alright, I think I fixed that file at the very least, give it a try now @timj. I do have to say, I appreciate your taste in movies based off of that subtitle file.

ecdye added 3 commits October 4, 2024 00:26
This currently only tries to decode even lines, and doesn't always work
properly.

Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
ecdye added 12 commits October 4, 2024 00:26
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
For some reason the VobSub tests seem to hang forever while running in
the Actions Environment. For now we will skip them as they are passing
when run locally.

Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
@timj
Copy link

timj commented Oct 4, 2024

Thanks. That works for me. Much better quality than I get out of Subtools with Tesseract so that's a bonus. I can try some more examples over the weekend.

@ecdye
Copy link
Owner Author

ecdye commented Oct 4, 2024

Thanks. That works for me. Much better quality than I get out of Subtools with Tesseract so that's a bonus. I can try some more examples over the weekend.

Glad to hear it! That's actually what drew me to want to do this originally, the fact that the macOS OCR API seems to be really good.

@ecdye ecdye merged commit 0b3f309 into main Oct 4, 2024
7 checks passed
@ecdye ecdye deleted the feat-sub branch October 4, 2024 16:19
@ecdye ecdye removed a link to an issue Oct 13, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants