-
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
Add support for VobSub in MKV files #17
Conversation
@timj, Here is a really nice one. I originally did this to prepare for processing VobSub streams from the MKV files but this change alone seems to improve decoding performance by a lot, in fact it might even be faster than ffmpeg. Let me know how it works for you. Edit: It seems like it's kinda lethargic in debug mode, but something about the optimizations of release make it way faster. |
416dceb
to
5513f53
Compare
I'm using I see that the ffmpeg went away. I will look at the invert colors option. |
Actually FFmpeg is still default, the internal decoder option in just hidden in the help. You can see it by using As for the compiling with optimizations try running |
Ok.
|
So, because of the way the vision API works, you can really only do a max of 5-6 threads. Otherwise it seems to hang like that. I should probably add a cap, or something. I found only one reference to this in one of Apple's developer videos, but they seemed to indicate that it is because of the large amount of memory that the Machine Learning Vision API uses. Also, I don't think it will show the |
Not trying to specify cores helped and it does finish. It's kind of odd since I never see any load on the machine when I run this. RAM isn't an issue on this computer and it wasn't using any when I killed it. |
So for me the sweet spot is 2 cores:
There are 20 cores. It doesn't use any GPU. I had assumed that the Vision API was going to use the neural engine or GPU. |
Yeah, thats where I'm confused as well. On my MacBook Pro M3 it seems to utilize 5 cores pretty well, but if I do more it will hang forever. I suspect it's more of an issue with the API than anything, but can't say for sure. It seems to only use a minimal amount of the GPU for me as well. I'm not really sure why, but I'll just attribute it to the black magic of Apple's API. |
This will improve the performance of the internal decoder significantly by taking advantage of unsafe pointers in Swift to reduce the memory overhead and processing time for decoding input files. This also adds compatibility that is needed in order to move forward with #17. --------- 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>
Thanks for this. I just tried it on an MKV and it crashes for me.
Quick question, when you extract from an MKV do you use the subtitle language from the MKV as the language hint or does it always use the |
I was afraid of that, I only had one test case on hand to throw at it so I wasn't sure if I had really caught all the edge cases.
Currently no I'm actually only using the language parameter, that's a good suggestion. I should be able to add that pretty easily. |
Actually I'm getting crashes with .idx files on main. |
So just when you try to pass a |
Yes.
|
OK, I think I fixed it. It seems like it has something to do with a technically malformed file according to specification, but I'm not sure because I also might be parsing slightly wrong. At least I seemed to be able to fix it. Let me know if you notice any Errors |
Thanks. I will try it again. This did work before (and works fine with ffmpeg decoder) but I can't remember whether I ever tried it with internal decoder. |
Interesting, I'll double check, but I'm guessing you just never tried with internal |
This will add support for decoding a VobSub subtitle stream directly
from an input Matroska file. This eliminates the need for a user to
create an intermediate file before using macSubtitleOCR