-
Notifications
You must be signed in to change notification settings - Fork 2
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
Getting Invalid Data Format errors #13
Comments
(the MKV files are all made with MakeMKV) |
All great questions... I will have to look into it, to be honest I have only tested against a few samples personally, so it is very possible that my tests are not encapsulating all available formats. Or it's possible I just broke something. Let me check and get back to you. |
Out of curiosity, if you compile it and run it on the included test files (which are from the Sintel Blender open movie) do those work? |
I had tried but I get an error immediately:
So I'm not sure what I'm doing wrong (sorry, this is the first time I've looked at swift builds). |
OK, I have a theory, I think you might not have Swift 6 support on your compiler. Have you tried updating to Xcode 16? As a second step, you could try using the nightly build binary. |
I don't technically have XCode installed, I use the command line tools. I'll look at the binary. |
Downloaded the nightly. Same result (once I removed the quarantine bit). |
Hmm, this is super weird I have
And it compiles and runs the tests just fine. I wonder if you're missing some sort of testing package or something. I'll do some research and try and figure out why it wouldn't compile. As for the errors with the nightly build, I'll look into that as I haven't had any issues with any mkv's that I have tried from makeMKV and also none with binary files extracted with mkvextract. But also like I said, I've only tested against a few movie samples. |
@timj I just found this forum post, it might be part of the issue, I'm not sure why mine was working as I don't recall installing the version from Swift.org but its worth a shot. https://forums.swift.org/t/error-no-such-module-testing/74784/4 |
Ok. I tried the command on a bunch of MKV files I had lying around and the good news is that it does seem to work for a lot of them (but not all). The ones I tried last night were all in the "not working" batch. |
Ok, so I think I figured out what the issue is, I never implemented support for multi segment ODS, because none of my test files had them. I just pushed some commits that hopefully add support for them, but I still don't have any test files, so it may or may not actually work. Give it a try and let me know. |
Related #13 Signed-off-by: Ethan Dye <[email protected]>
Thanks. Didn't help. I will see if I can extract a very small failing .sup file for you. |
If you can, that would help a lot. |
Ok. Try this file https://www.dropbox.com/scl/fi/il366x0se4t0sqxmmwvvp/testing.sup.gz?rlkey=qjg5cfashioyjjx1thl41syhu&st=bg4dckjn&dl=0 When unzipped it loads into SUBTools just fine. |
Fixes #13 Signed-off-by: Ethan Dye <[email protected]>
* Add support for multi-segment ODS Fixes #13 * Add back comments Signed-off-by: Ethan Dye <[email protected]>
Everything worked except one file that, it turned out has a PGS segment but no actual content. SubTools did load it without complaint (with no actual subtitles). The error status meant my batch script fell over so if you are interested in this tiny issue the (small) file is attached. |
I will say that the program worked great though. Looking forward to #7 since vosub2srt is annoying to build. |
Oh believe me, I know. I had to make custom changes to it years ago to make it work and that was what I was relying on up until I finally broke down and dug myself this rabbit hole. I'll take a look at the no subs one. I suspect that one is probably a pretty easy fix, I'm probably throwing an error when I should just issue a warning and skip. |
Thank you so much for working on a tool like this. I've been looking around for a PGS to SRT convertor for a while and had considered learning Swift purely to use the Apple OCR library (I'm mainly a Python guy). I was looking at installing .NET and trying to get SubtitleEdit to work in batch mode and then I saw your comment pointing to this repo.
I've built it just fine (I just updated to Sequoia on M1 Ultra) but haven't yet found a file that it works with. I've tried a few MKV files (and a .sup file I extracted with
mkvextract
and I'm getting errors like:or
(the latter came from ODS.swift where I added a debug print).
Is there any information I can send you about these files that would help debug?
The text was updated successfully, but these errors were encountered: