AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OCR to Read Sub-titles

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Mkbailey755



Joined: 20 Aug 2007
Posts: 178

PostPosted: Thu Apr 24, 2008 2:41 am    Post subject: OCR to Read Sub-titles Reply with quote

My girlfriend works for special needs kids one boy in her class is a big fan of a cartoon called naruto. the problem is he cannot read what so ever and the newer episodes are sub titled(Japaneses) so the idea came to me to take an OCR to read sub titles and import this into speech. so the real ? is this a reality or is OCR much to slow? how hard of a task is this?
thanks in advance
sorry if this is in the wrong section i didn't know if this should go in general chat
Back to top
View user's profile Send private message
Z Gecko
Guest





PostPosted: Thu Apr 24, 2008 3:14 am    Post subject: Reply with quote

I am no OCR expert, but from my knowlegde i have to say:
Itīs probably not possible.
You would need a combination of high speed OCR (for scanning 25 to 60 pictures per second) and
a very good engine to distinguish the text from the permanetly moving background.
If someone really made something capable of this, itīs probably comercial and expensive. For shure not possible with pure AHK commands.

But you got one chance: Movies often have seperate Subtitle files(like the dvd), i donīt know if they are plain-text or kind of a video-file. You could maybe extract them(if txt-file) or have an OCR-programm scan them, in both cases probably befor you watch the video, not meanwhile.
Back to top
SomeGuy



Joined: 21 Apr 2008
Posts: 96
Location: somewhere

PostPosted: Thu Apr 24, 2008 4:05 am    Post subject: Reply with quote

yeah extracting the subtitles would definitely be what i would look at.
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1494

PostPosted: Thu Apr 24, 2008 4:46 am    Post subject: Reply with quote

Hardsubs (the subtitles are directly edited into each frame) would be difficult for an OCR to catch, given that the video might be displayed with help directly from the video card and hence an OCR program might not see it.

Ideally, you could get the softsubs (an extra text file with the subtitles along with timing info), then use AHK to parse the softsub file and send the subtitle strings to Window's text-to-speech thingy at the proper times.

I believe some media players have an open API through which an AHK script can obtain timing information (i.e. SendMessage to get the current frame number) to sync the subs-to-speech with the video.
_________________
My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags !
Back to top
View user's profile Send private message
IsNull



Joined: 10 May 2007
Posts: 112
Location: .switzerland

PostPosted: Thu Apr 24, 2008 1:54 pm    Post subject: Reply with quote

Other suggestion:
If you can't extract the subtitles, you can try the following:

You make a screenshot from every frame. (I'v got written a wrapper for "ffmpeg", so you can use this to generate screenshots) Then, you only have to analyse the pictures. And this ist supportet from all OCR Tools.

regards
_________________
http://securityvision.ch
Back to top
View user's profile Send private message
Oberon



Joined: 18 Feb 2008
Posts: 453

PostPosted: Thu Apr 24, 2008 7:39 pm    Post subject: Reply with quote

Go to another fansub group for .srt's and Loop, Read them. Dattebayo can't be the only one, surely...
Back to top
View user's profile Send private message
Mkbailey755



Joined: 20 Aug 2007
Posts: 178

PostPosted: Fri Apr 25, 2008 12:47 pm    Post subject: Reply with quote

Thanks man I had to do a alittle research on srt's Question but I think that would work Im at work right now but I fool around with it this weekend Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group