View Full Version : Is it possible to extract hardsubtitles from AVI?
dinci5
8th September 2005, 14:21
HI
Is it possible to extract subtitles that are 'burened' into an AVI?
Thanks for help
mic
8th September 2005, 15:40
no...
unskinnyboy
8th September 2005, 16:56
Yes!
SubRip starting v1.2b has been able to do that. Current version is 1.30b11.
For more details including binaries, check the SubRip thread - http://forum.doom9.org/showthread.php?t=93680
mic
8th September 2005, 18:05
You're right :), does use the word extract, though I'd think [painfully] derived would be more accurate describing OCR off a video frame :)
To do that your patience has got to greatly exceed mine, and well, I'll gladly edit a 1200 line srt file word by word, then go watch the sidewalk dry after a rain for excitement :D
unskinnyboy
8th September 2005, 18:11
Sorry, I didn't understand a word you said.
mic
8th September 2005, 18:41
Sorry, I didn't understand a word you said.
My fault...
You are right, subrip gives you a way to get text off video. Otherwise, I was just trying to express my, well, almost horror :) at the thought of going through all that. :D
Just one of those things I guess, where I personally don't particularly like OCR, not just for subs, but any time.
unskinnyboy
8th September 2005, 19:22
If you have a good character matrix to start with, OCRing subs is not a big deal. You can't get the subs off the AVI in picture format since that would mean using VobSub and VobSub needs an IFO to work with.
ai4spam
12th September 2005, 03:57
Otherwise, I was just trying to express my, well, almost horror :) at the thought of going through all that. :D
Well, one man's horror is another man's pleasure :p. I was myself surprised at how much time people invest extracting sbtitles from videos. It made me feel better about all the time I spent programming that ability in SubRip ;).
mic
12th September 2005, 04:28
Well, one man's horror is another man's pleasure :p. I was myself surprised at how much time people invest extracting sbtitles from videos. It made me feel better about all the time I spent programming that ability in SubRip ;).
Thanks for taking my comments (& horror :)) in stride!
I actually was very excited by OCR when Xerox first came out with Textbridge years ago (there I go dating myself again :(). I guess I just don't have the patience it requires to search through and repair errors.
You'll probably be amused (I truly hope not offended) that I've used subrip for a while now, Thank You again and again, but I've only once tried/used the OCR it was intended for. :rolleyes:
movax
12th September 2005, 05:25
The leet SubRip plus a new (I think) program called avisubdetector (iirc again :) ) can do hardsub OCR, though SubRip seems to function better for me. :)
ai4spam
13th September 2005, 01:36
@mic: There are other ways to do OCR, including a Delphi component that I thought of using, which does it using neural networks. This is the way it should be done, not like in SubRip, where you have to tell it each character. I did make two steps in this direction, though: the "Best guess" and "Fill matrix" options. The latter allows you to select a font, match it to the font used in the subtitles, then fill the char matrix with selected characters from that font. I don't know whether SubRip will ever use "true" (neural-networks-based) OCR, it depends on what time I get and how useful it proves to be.
@movax: AviSubDetector is newer than the classic SubRip, but older than my addition to it that does OCR on videos. I even borrowed a couple of ideas from it (fill open and large areas), but implemented them on my own and added new things (like the lines between subtitles and filling the sides).
ai4spam
13th September 2005, 01:39
You can't get the subs off the AVI in picture format since that would mean using VobSub and VobSub needs an IFO to work with.
Well, I'm thinking of adding the option to save the recognized subtitles from videos as "regular" .idx/.sub files, just like PodPis. If only I had the time to do it...
movax
13th September 2005, 04:06
If you want some help (and want to teach some Delphi), I'd be happy to help with that coding. :)
mic
13th September 2005, 04:51
... "Fill matrix" options. The latter allows you to select a font, match it to the font used in the subtitles, then fill the char matrix with selected characters from that font.
Hmmm... Would Font Matcher be a good match, I mean use it to choose font?
http://www.terra.es/personal/infern0/
ai4spam
13th September 2005, 05:01
@movax: Wow, thanks for the offer. I can answer some questions, but I draw the line where it'd take me more time to explain it than to do it myself ;). Tell you what: look at the source code (which is in bad need of a clean-up job) and see what you think. Pick something you want to work on and let me know.
@mic: Hmm, that's an idea. I'll see how I can get something like this working for SubRip (too bad the author doesn't give his source code). Meanwhile, by all means, you can use it. Save a bitmap of the subtitle (take a screenshot and crop a couple of letters in separate bitmaps), feed it to FontMatcher, and then use SubRip to generate the matrix for you.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.