You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@niksedk - regarding your comment here (SubtitleEdit/subtitleedit#3568 (comment)) that OCR library that SE uses is windows only but it could be replaced... is it possible to replace via a command line option from linux, or would i have to do that in C and rebuild the source? i'm trying to use subtitleedit-cli from command line in linux & tesseract is installed on my machiune...
I've added nOCR of BDSup to the command line version (as you saw in the post)
What are you trying to OCR?
It should be easier now to add Tesseract, as image handling are now somewhat updated to dot net 8 (from System.Drawing to Skia).
Depending on which subtitle format you're OCR'ing...
yes, i saw that. i'm looking to OCR hdmv_pgs_subtitle to srt. it completes without error, but has a lot of what i presume are OCR errors. I also tried in the full version with mono and it works without error. i just have a small sample file that i'm working from with a few lines.. but ultimately, i'd like to build it into a plugin for unmanic.
having a CLI tool vastly eases ones ability to make this stuff convert whole libraries, and eases portability, as you highlighted.
However, while I'm not entirely unfamiliar with C#, it isn't exactly my expertise, so I'll utilize LLM support to (try to, this will be my first shot at using these tools like that) make it work. Of course I won't submit stuff I don't understand (to a basic level) and the basic strategy will be coming from me.
I'll likely give this a shot whether you'd accept such code or not, however should I come across larger blockers, it might become be relevant whether you'd willing to merge such an effort at all.
Now some additional questions that might inform my approach.
My understanding is that libse is going to be largely shared code between this CLI and the GUI
However there seem to be some differences, one of them being that you appear to be using SkiaSharp even in the libse of this cli, while you don't currently do so in the GUI one (likely to make it work on other OSs at all?)
your current approach with tessaract seems to be to export temporary png files and process these with tessaract via CLI commands. Unless you've got different ideas I'll try to keep that approach.
this contains the current (tessaract specific) code for tessaract OCR in the GUI: src/ui/Logic/Ocr/Tesseract
Activity
niksedk commentedon Mar 22, 2025
I've added nOCR of BDSup to the command line version (as you saw in the post)
What are you trying to OCR?
It should be easier now to add Tesseract, as image handling are now somewhat updated to dot net 8 (from System.Drawing to Skia).
Depending on which subtitle format you're OCR'ing...
yajrendrag commentedon Mar 22, 2025
yes, i saw that. i'm looking to OCR hdmv_pgs_subtitle to srt. it completes without error, but has a lot of what i presume are OCR errors. I also tried in the full version with mono and it works without error. i just have a small sample file that i'm working from with a few lines.. but ultimately, i'd like to build it into a plugin for unmanic.
niksedk commentedon Mar 22, 2025
from .sup files?
yajrendrag commentedon Mar 22, 2025
yes, i extracted the subtitle track to a .sup file
9SMTM6 commentedon Aug 3, 2025
@niksedk I am currently looking into this.
having a CLI tool vastly eases ones ability to make this stuff convert whole libraries, and eases portability, as you highlighted.
However, while I'm not entirely unfamiliar with C#, it isn't exactly my expertise, so I'll utilize LLM support to (try to, this will be my first shot at using these tools like that) make it work. Of course I won't submit stuff I don't understand (to a basic level) and the basic strategy will be coming from me.
I'll likely give this a shot whether you'd accept such code or not, however should I come across larger blockers, it might become be relevant whether you'd willing to merge such an effort at all.
Now some additional questions that might inform my approach.
libseis going to be largely shared code between this CLI and the GUIsrc/ui/Logic/Ocr/Tesseract