Log in

View Full Version : HD subtitle ripping (SUPread)


Pages : 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16

Taktaal
3rd September 2007, 13:41
I'm stupid :o

The program expects a folder "SupRip" to exist in %appdata%, if it doesn't already, then the program will crash. I fixed the bug in the new version 0.61

l3pyr
7th September 2007, 21:53
I'm stupid :o

The program expects a folder "SupRip" to exist in %appdata%, if it doesn't already, then the program will crash. I fixed the bug in the new version 0.61

Great work with Suprip, but there are a few bugs I've come across.

The first thing I noticed is that it didn't like line 4 in the following scn-sst file

St_Format 4
Display_Area (0 2 1919 1079)
TV_Type NTSC
SubTitle GitS - English.sup
##########################
SP_NUMBER START END FILE_NAME

It said it should only be two words, so I changed it to

St_Format 4
Display_Area (0 2 1919 1079)
TV_Type NTSC
SubTitle GitS-English.sup
##########################
SP_NUMBER START END FILE_NAME

and everything worked fine. You should probably fix it to support spaces in filenames.

Next, there is one subtitle that causes it to crash for me. Its my 501th line, but even if I put that one subtitle in its own scn-sst file it still causes a crash. My work around right now is simply removing that line and then adding that subtitle into the finished SRT file after all is said and done. Strange problem, no?

Update: the 644th line also screwed it up.. here's both lines. Need me to post the PNGs?

501 01:00:01:04 01:00:02:09 line0501.png
644 01:10:26:11 01:10:29:20 line0644.png

Again, great work on this program and I (along with everyone else I'm sure) look forward to its development.

Taktaal
8th September 2007, 14:22
Probably there's a problem with the PNGs, can you post them? I'll fix the line 4 problem.

Also I posted version 0.70 that can directly open SUP files
http://x0r.ch/suprip/

hristoff2
10th September 2007, 15:29
Probably there's a problem with the PNGs, can you post them? I'll fix the line 4 problem.

Also I posted version 0.70 that can directly open SUP files
http://x0r.ch/suprip/


Thanks! I'll check it out on Underworld's german subs (HDDVD).

killa_kid
11th September 2007, 15:28
The OCR is working great now. I was wondering if it would be possible to add an option (checkbox, dropdown, whatever works best) for bold, italic & underlined. I like my subtitles to look the same as the images...but a lot smaller in size :P

Rectal Prolapse
11th September 2007, 18:31
Taktaal, does subrip support Blu-ray .sup files (as created by the new xport)? The format is very different from HD-DVD.

aqualung99
11th September 2007, 19:58
I definitely have better luck with Taktaal's SupRip. By the time I'm 25-50% of the way through the movie it's "learned" pretty much all the characters and doesn't require any more user interaction (even with italics mixed-in.)
Unfortunately, I do still have the capital-I vs. lowercase-l problem -- a dictionary would most certainly help that (and frankly, it still does better in this department than SUPread did for me :( ) Also, it can't handle single-word italics (treats the whole line as italic or not based on the first word.) But that's pretty minor.
All in all, a (say) 3-hour task is still reduced to about 1 and a half. And that's a god-send!

:thanks:

Edit: Oops, I found another bug. In "Letters of Iwo Jima" EVODemux doesn't compensate for a really high, uhh, PTS I think it's called? Anyway the timecodes stored in the subtitle are all really big (like the very first one is after more than 5 hours.) SupRip chokes about 2/3 of the way into the subtitles and starts to negate all the time values! Observe:


615
06:37:23,507 --> 06:37:25,714
fight for your fallen brethren...

616
06:37:27,545 --> 06:37:29,251
until the end.

617
-06:-37:-30,-089 --> -06:-37:-28,-610
Get up!

618
-06:-37:-24,-350 --> -06:-37:-22,-280
Major General Hayashi
is leading an attack.

Taktaal
12th September 2007, 10:29
6 hours 37 minutes is 2.15 billion ticks so yeah that's my error, I'll fix it and add a PTS correction option. Can you post the EVODemux text that appears after decoding the main evobs? I'm especially interested in the PTS values there.

As for underlined and bold, I haven't yet seen any HD-DVD subtitles that use those styles.

And no, I don't support BluRay subtitles. I'll have to look if I find some format documentation about it somewhere. Maybe we'll luck out and Sony will give up its newest format experiment though soon.

aqualung99
12th September 2007, 11:47
6 hours 37 minutes is 2.15 billion ticks so yeah that's my error, I'll fix it and add a PTS correction option. Can you post the EVODemux text that appears after decoding the main evobs? I'm especially interested in the PTS values there.


Cool! :)

Here's the EVODemux dump:


Opening file feature_IWOJIMADOMNVC1_HD.EVO
Reading...
File size: 11268 Mbytes.
VOB number 0 contains 1 video , 2 audio and 4 subpicture streams.
PTM of first video frame = 6736B4B1
PTM of last video frame = 80002801
Duration = 1:17:00.616
VC-1 video stream 0 found!
First PTS = 2736B4B1 (+35791394ms)
Substream id = 55
Profile = Advanced
Level = 3
Chroma Format = 4:2:0
Size = 1920x1080
Display size = 1920x1080
Aspect ratio = 1:1 (square samples)
Frame Rate = 23.976 (24000/1001)
Dolby TrueHD audio stream 1 found!
First PTS = 2736B4B1 (+35791394ms)
Substream id = B1
TrueHD stream (up to 8 channels)
Sampling frequency = 48 kHz
2 ch. decoder
channel modifier = Lt/Rt
6 ch. decoder
channel modifier = Lt/Rt
channel arrangement = Main (Left,Right), Centre, LFE, Surrounds (Ls/Rs)
8 ch. decoder
channel modifier = Lt/Rt
channel arrangement = Main (Left,Right), Centre, LFE, Surrounds (Ls/Rs)
Dynamic range control = -10.6371 dB .. 8.4282 dB
Dolby Digital Plus audio stream 0 found!
First PTS = 6736B4B1
Substream id = C0
Stream 0 is Dolby Digital Plus
frame size = 1280 bytes, number of blocks per frame = 3
Sampling frequency = 48 kHz
Transmission bitrate = 640 kbit/s
Channel arrangement = L + R + C + Ls + Rs, bsid = 16
LFE channel = present
Subpicture stream 3 found!
First PTS = 676F7ABE (+41341ms)
Substream id = 23
Format = 8bitRLE
Subpicture stream 2 found!
First PTS = 676F7ABE (+41341ms)
Substream id = 22
Format = 8bitRLE
Subpicture stream 1 found!
First PTS = 67E033B2 (+123423ms)
Substream id = 21
Format = 8bitRLE
Subpicture stream 0 found!
First PTS = 67E9D318 (+130430ms)
Substream id = 20
Format = 8bitRLE
.
Opening file feature_IWOJIMADOMNVC1_HD_Divide.EVO
Reading...
File size: 8588 Mbytes.
VOB number 0 contains 1 video , 2 audio and 4 subpicture streams.
PTM of first video frame = 80002801
PTM of last video frame = 9479CC0E
Duration = 1:03:36.846
VC-1 video stream 0 found!
First PTS = 00002801 (+28481545ms)
Substream id = 55
Profile = Advanced
Level = 3
Chroma Format = 4:2:0
Size = 1920x1080
Display size = 1920x1080
Aspect ratio = 1:1 (square samples)
Frame Rate = 23.976 (24000/1001)
Dolby Digital Plus audio stream 0 found!
First PTS = 80000EB1 (+4620544ms)
Substream id = C0
Stream 0 is Dolby Digital Plus
frame size = 1280 bytes, number of blocks per frame = 3
Sampling frequency = 48 kHz
Transmission bitrate = 640 kbit/s
Channel arrangement = L + R + C + Ls + Rs, bsid = 16
LFE channel = present
Dolby TrueHD audio stream 1 found!
First PTS = 00001DB1 (+28481516ms)
Substream id = B1
TrueHD stream (up to 8 channels)
Sampling frequency = 48 kHz
2 ch. decoder
channel modifier = Lt/Rt
6 ch. decoder
channel modifier = Lt/Rt
channel arrangement = Main (Left,Right), Centre, LFE, Surrounds (Ls/Rs)
8 ch. decoder
channel modifier = Lt/Rt
channel arrangement = Main (Left,Right), Centre, LFE, Surrounds (Ls/Rs)
Dynamic range control = -10.6371 dB .. 8.4282 dB
Subpicture stream 3 found!
First PTS = 800F00AD (+4631426ms)
Substream id = 23
Format = 8bitRLE
Subpicture stream 1 found!
First PTS = 800F00AD (+4631426ms)
Substream id = 21
Format = 8bitRLE
Subpicture stream 0 found!
First PTS = 800F00AD (+4631426ms)
Substream id = 20
Format = 8bitRLE
Subpicture stream 2 found!
First PTS = 800F3B54 (+4631593ms)
Substream id = 22
Format = 8bitRLE
Done.

Taktaal
24th September 2007, 00:22
Ok I tried for a good week to try to get a reliable single word italic detection going, but couldn't do it without getting an unacceptable number of false positives :(

Anyway, I uploaded a new version which fixed a few other bugs, but single italic words not getting detected is probably going to stay unless i get an idea I haven't thought of yet.

Also, I started adding Bluray support, but that's going slow since I don't have a Bluray drive or movies to test my code on.

http://x0r.ch/suprip/

hristoff2
25th September 2007, 17:07
Ok I tried for a good week to try to get a reliable single word italic detection going, but couldn't do it without getting an unacceptable number of false positives :(

Anyway, I uploaded a new version which fixed a few other bugs, but single italic words not getting detected is probably going to stay unless i get an idea I haven't thought of yet.

Also, I started adding Bluray support, but that's going slow since I don't have a Bluray drive or movies to test my code on.

http://x0r.ch/suprip/

Some feedback:

- There seems to be an OCR error when a small 'L' follows a small 'L' ('don't tell..) -> you get like "don't tel 'I or l' (capital 'i' I suppose) - see .sup below, it's in one of the first 10 lines
- Crashes @ line #27 for me without any further information, winxp pro sp2

Here's the sup file if you wanna check it: http://rapidshare.com/files/58185467/Subpicture.sup.html

thanks for your work :)

A_C_ONE
26th September 2007, 04:04
I need a great deal of help from an expert. I am a developer and created a small programm to convert SUB to SRT subtitles and perform a lot of operation with SUB (text) subtitles. Now my goal is to "teach" my applet to recognize BMPs in a VOB SUB file. The one whis goes in pair with IDX.
IDX a pretty straightforward textual file, to read it - there is no problem.
The format of SUB file - which contains bitmaps of subtitles - is a problem, I tried to find out any information on the internet - to no avail. There are no description or specifications of a SUB format. SUB format remains a black box for me. I 'm talking not about general description of a SUB format, or what is it for etc.etc.etc, but a description of SUB format - exactly.
I am not talking about OCR program, I didn't go that far. For the start I would want to "chop" the SUB, according to data i IDX file -positions.
And then display those chops in a BMP control, like image control or so. Or t save them (decode probably and save) as BMP files.

I deeply appreciate any help in this matter.

with regards
a developer

Rectal Prolapse
26th September 2007, 04:52
A_C_ONE, this thread is about subtitles from HD-DVD and Blu-ray movies. I think you are referring to VOBSUB files from DVDs? If so, you may be better off starting a new thread, or find a more relevant thread to post your question in.

Good luck!

Zelos
29th September 2007, 11:12
Taktaal good job , ocr works fine !

I have a problem when i ocr all.
The soft crashes , even if i try to do it manually , after some pictures , it crashes.

Deckard2019
29th September 2007, 15:37
Same problem for me. French language, XP SP2. Always on the same picture :

http://deckstuff.free.fr/temp/SupRipCrash.png

Taktaal
29th September 2007, 20:32
Looks like I accidentially introduced a bug while searching for an algorithm that reliably detects italic words. I fixed it in the new version 0.81.

Deckard2019
29th September 2007, 23:06
Works better now ! Thank you !

But where are timings ??? Just after opening subtitles.scn-sst, SRT tab looks like this :

http://deckstuff.free.fr/temp/srt.png

Same results when OCR ends.

Taktaal
30th September 2007, 01:27
Strange. Is it a Bluray or HDDVD subtitle? Does the problem happen too when you open the .sup directly? Can you upload the .sup somewhere?

Deckard2019
30th September 2007, 07:52
Is it a Bluray or HDDVD subtitle?BluRay.

Does the problem happen too when you open the .sup directly?No.

Can you upload the .sup somewhere?http://deckstuff.free.fr/temp/hb.sup

madshi
30th September 2007, 14:12
Hmmmm... Just beginning to look into subtitles stuff. @Taktaal, thanks for investing work here! I've one crazy idea. Maybe you'll like it, or maybe not. But I thought I'd just post it, just in case:

Couldn't you create one monstrous bitmap (e.g. 800x100000 pixels) and draw all subtitles to that one large bitmap? Additionally you could manually add the timestamps (as written text) to that bitmap, too. We could then feed such a monster bitmap to a good OCR software and the result should be a full SRT subtitle text file. Maybe we'd need a little helper tool which cleans up the final text file to make it fully SRT compatible, but that should be no big problem. What do you think?

Taktaal
30th September 2007, 14:46
BluRay.
http://deckstuff.free.fr/temp/hb.sup

Thanks. I was able to fix two more bugs that led to your problems. The new 0.82 doesn't have that anymore.
http://x0r.ch/suprip/

Hmmmm... Just beginning to look into subtitles stuff. @Taktaal, thanks for investing work here! I've one crazy idea. Maybe you'll like it, or maybe not. But I thought I'd just post it, just in case:

Couldn't you create one monstrous bitmap (e.g. 800x100000 pixels) and draw all subtitles to that one large bitmap? Additionally you could manually add the timestamps (as written text) to that bitmap, too. We could then feed such a monster bitmap to a good OCR software and the result should be a full SRT subtitle text file. Maybe we'd need a little helper tool which cleans up the final text file to make it fully SRT compatible, but that should be no big problem. What do you think?

Did you have any OCR software in mind that can produce an output that's easily postprocessed? Anyway, making such a bitmap isn't very hard, I'll add an option to the next version, maybe it'll lead somewhere.

Deckard2019
30th September 2007, 20:37
Thanks. I was able to fix two more bugs that led to your problems. The new 0.82 doesn't have that anymore.

It's ok now. Thank you !

Rectal Prolapse
30th September 2007, 20:47
madshi - I wrote a tool that can take supread .srt output and mix it in with ABBYY's FineReader HTML output and create a perfectly usable SRT file.

The technique is this: Load the .sup file in SupRead. Save the SRT file WITHOUT using OCR. Then save the subtitles as PNG files.

Close supread. Open photoshop and batch process the subs to maximize the contrast for each PNG file and lower the brightness (to force subtitle outlines to be same color as the black background for easier OCR).

After photoshop is done, open ABBYY FineReader and load in all the PNGs.

OCR them. Save as HTML (some options are needed - like include horizontal lines to signify the end of each subtitle group) - you will get an HTML file.

I wrote a little tool to merge the subtitles from the SRT and the HTML into one SRT file.

That's it. :)

To give you an idea of how reliable this is: There are occasional problems with the letter I being confused for the number one (when the line begins with a dash). OCR accuracy appears to be 99% using FineReader.

The most important step is the contrast and brightness adjustment - the black outline around the white letters on a transparent background is VERY BAD for OCR.

Zelos
30th September 2007, 21:02
thanks Taktaal , your soft works great now !
apart the way that there is confusion between "I" and "1" the accurancy goes for 99%

madshi
30th September 2007, 22:01
Did you have any OCR software in mind that can produce an output that's easily postprocessed?
Haven't checked yet. I think I'd try FineReader first.

Anyway, making such a bitmap isn't very hard, I'll add an option to the next version, maybe it'll lead somewhere.
Great, thank you... :)

madshi
30th September 2007, 22:07
madshi - I wrote a tool that can take supread .srt output and mix it in with ABBYY's FineReader HTML output and create a perfectly usable SRT file.

The technique is this: Load the .sup file in SupRead. Save the SRT file WITHOUT using OCR. Then save the subtitles as PNG files.

Close supread. Open photoshop and batch process the subs to maximize the contrast for each PNG file and lower the brightness (to force subtitle outlines to be same color as the black background for easier OCR).

After photoshop is done, open ABBYY FineReader and load in all the PNGs.

OCR them. Save as HTML (some options are needed - like include horizontal lines to signify the end of each subtitle group) - you will get an HTML file.

I wrote a little tool to merge the subtitles from the SRT and the HTML into one SRT file.

That's it. :)

To give you an idea of how reliable this is: There are occasional problems with the letter I being confused for the number one (when the line begins with a dash). OCR accuracy appears to be 99% using FineReader.

The most important step is the contrast and brightness adjustment - the black outline around the white letters on a transparent background is VERY BAD for OCR.
Sounds good. But I think there's still a lot of workflow optimization possible. I think e.g. having a tool which saves all subtitles in one big bitmap (as I suggested) would help a lot to reduce the time needed to do all the steps you described. Maybe it would also be possible for Taktaal's tool to remove the letter outlines without having to use photoshop. Basically I'm looking for as much automation as possible. If Taktaal can implement some of the needed stuff into his tool, and if you throw your FineReader HTML parsing tool into the mix, maybe we can achieve something nice? :)

Rectal Prolapse
30th September 2007, 22:36
Madshi - yeah - a good optimization would be using a bitmap tool that can do the contrast/brightness adjustment without the bloat of Photoshop!

I'm not so sure about a massive bitmap though - that could break a lot of programs because I can imagine a bitmap too large crashing a lot of them! And processing time could increase exponentially as well. (although to be fair, finereader is really horribly slow processing each file...) :)

Including is a Visual Studio 2005 project for my little tool, written in C++. It is called SRTMaker. It's very rough though - it doesn't properly check command-line arguments, for example, but hopefully will help you if you decide to make a better tool. No restrictions, do whatever you like with it. :)

Rectal Prolapse
30th September 2007, 22:37
Here are the notes I wrote on my Blu-ray subtitle conversion workflow:

Tools needed:

• Xport
• Supread
• Adobe Photoshop
• ABBYY Finereader

Extract the subtitle with xport.
Load the SUP file with Supread:
○ Save the subtitles in PNG format using Save Bitmaps.
○ Save an SRT file (do not OCR the subtitles within Supread)
Open Photoshop:
1. Use an action that modifies the images:
i. Brightness to -100, Contrast to +100
ii. Overwrites the PNG.
This forces the background color to pure black and should eliminate any dropshadows in the subs. This makes OCRing much more reliable.
2. Select File->Batch from Photoshop's menu.
i. Select the folder container all the PNGs.
ii. Select the action. Execute.
This should convert all PNGs to have a black background and removes dropshadows.
Launch Finereader:
1. Press the Open Image button, and select all the PNGs.
2. Select all the images (press CTRL-A), then select Image->Correct Resolution from the menu.
3. Choose a resolution of 300 DPI, and apply to All images in the batch.
A dialog box with progress of the DPI assignment should appear.
4. Go to Image->Load Block Template.
The template should be a Text Block that is the size of the whole image (roughly 1920x1080 or a bit less). It will be applied to all the images.
5. Click the Read All button (dropdown button next to the Read All button).
6. After everything is OCR, you can go through each page, making sure things look ok.
7. Click on Save Pages button.
i. Formatting options should be set for HTML:
1) Retain Layout: Retain font and font size.
2) Save mode: Simple.
3) Text settings: Keep Line breaks checked, Use Solid Line as Page break checked, uncheck Retain text color.
ii. Save as type Unicode HTML (UTF-8).
iii. Save Pages: All pages.
iv. Create a single file for all pages.
8. Click Okay to save the OCR'd pages to one file.
9. Use SRTMaker, giving it the SRT and HTML file on the command-line to generate a new SRT that is piped to standard output.

Taktaal
1st October 2007, 00:05
Ok I made a sample PNG how such a combined subtitle image would look.

http://x0r.ch/suprip/serenity-50.png

That Finereader looks decent, but it's 130€, and to be honest, I'd rather have less, not more commercial software that people have to "acquire" one way or another to rip HD movies.

Rectal Prolapse
1st October 2007, 03:12
I'm sure there are a lot of opensource/free OCR apps that work well with PNGs too! At least I hope so!

My method is just one way of getting reliable OCR - for those who cannot wait for the proper tools to come out. :)

One problem with the steps I outlined above - you may not want to use unicode output - I had issues on some titles because of it (usually accented characters). They will be recognized easily by FineReader, but they don't work well with the SRT format.

madshi
1st October 2007, 07:47
Ok I made a sample PNG how such a combined subtitle image would look.

http://x0r.ch/suprip/serenity-50.png
That looks nice! However, the timecodes are missing. I'd suggest to use TextOut to add the timecodes (in SRT format) to that png file. Thank you... :)

That Finereader looks decent, but it's 130€, and to be honest, I'd rather have less, not more commercial software that people have to "acquire" one way or another to rip HD movies.
Sure, I agree. But once we have a good PNG we can use for OCRing, maybe we can dig out a good freeware OCR tool or programming component to do the rest of the work. Or those of us who already own a professional OCR software can of course use that.

@Rectal Prolapse, thanks for the code!

bagge1
5th October 2007, 21:11
@Pelican9

I have a similar problem as Musky5790 described here
http://forum.doom9.org/showthread.php?p=1036754#post1036754

I´m trying to add subtitles from a .srt file into Scenarist ACA (HDDVD)
I converted a´the .srt file to .sup with SubtitleCreator. Then I imported the .sup into SUPread and exported it to .PNG: s and scn-sst.

I get the same error from Scenarist as Musky5790:

internal software error:.\core\AUs\Advmux_timeGrip.ccp. line 94 -2
Advmuxmux::TimeGrid::addgrippointfill -- time not on field boundary.

Is this because the .sup file I get from SubtitleCreator is not a hd-sup but just a SDDVD sup? Is there any other way around it?

Thanks for the great effort you put in developing this!

manusse
5th October 2007, 21:19
time not on field boundary

I don't know if Scenarist ACA (HDDVD) can accept SD Sup. However the message seems to mean that the times of your subtitles are not a multiple of the frame duration. Depending if your DVD is 50Hz or 60Hz, you should try to align the timings of your subtitles with an integer number of the field duration:

1/50 or 1/60 seconds.

Cheers
Manusse

bagge1
5th October 2007, 23:53
I don't know if Scenarist ACA (HDDVD) can accept SD Sup. However the message seems to mean that the times of your subtitles are not a multiple of the frame duration. Depending if your DVD is 50Hz or 60Hz, you should try to align the timings of your subtitles with an integer number of the field duration:

1/50 or 1/60 seconds.

Cheers
Manusse

The video is NTSC 1280x720@29.97, so I guess that should be 60Hz. The .srt file was only 23.98. This time, I converted the .srt to 29.97 before converting it to .sup. I get the exact same error in Scenarist though.

I´m not sure if Scenarist accepts SD Sup. Wouldn´t the position of the subtitles be messed up if the resolution is wrong?

Another solution might be to add a text-based subtitle (eg. .srt) as an "advanced subtitle track" directly into Scenarist. But I have to convert it to XML first somehow.

woah!
6th October 2007, 01:27
i believe its a supread/evodemux issue as to how it makes/outputs the hd sups. as i get the same error from all hd-dvd extracted sups when ripped from the source evo files with evodemux. but i have had success with blu-ray subs extracted using xport, and authored to a hd-dvd using ACA, it is a bitch tho huh..

manusse
6th October 2007, 10:10
and exported it to .PNG: s and scn-sst.
but i have had success with blu-ray subs extracted using xport
I believe the timings are in the .scn-sst file. You could have a look at this text file to see what is the difference between BD and HD Sups. I suspect the time frame is different.

Cheers
Manusse

Taktaal
9th October 2007, 17:56
The problem I see here is that .scn-sst files are supposed to use frame numbers and not timecodes. Misaligned frames can't happen with those..,

tribble222
12th October 2007, 09:57
In regard to open source OCR software, the current best appears to be tesseract (http://code.google.com/p/tesseract-ocr). It seems to accept tiff's.

The best open source command line image editing program that I've found is ImageMagick (http://www.imagemagick.org)

One request I have for SUPRead is to have an "auto save images" option to make it save all the subtitles as images on load. Or better yet let it operate from the command line.

I'm working in Linux on making a completely automated "rip HD DVD to mkv" script and it'd be nice not to have to spawn the window in the right spot and simulate a mouse click :-P

Taktaal
14th October 2007, 18:31
I posted a new version that pretty much does BluRay perfectly now, as well as has a command line option to output the subtitles to a PNG image.

http://x0r.ch/suprip/

Now it's just the dictionary feature that's still missing for a 1.0 release :)

madshi
15th October 2007, 09:01
I posted a new version that pretty much does BluRay perfectly now, as well as has a command line option to output the subtitles to a PNG image.

http://x0r.ch/suprip/

Now it's just the dictionary feature that's still missing for a 1.0 release :)
Sounds good, will test later! Thanks!!

If you've fun and time, maybe you can check out this one?

http://de.wikipedia.org/wiki/OCRopus

It's an open source command line OCR tool (found through tribble222's link). Maybe it would work on that PNG image you're outputting?

Taktaal
15th October 2007, 13:39
It seems like OCRopus is just a wrap-around for Tesseract. I tried that and it worked pretty good, but it had a few issues:
- It didn't detect text styles
- It completely ignored foreign letters, or misdetected them as the closest ASCII one
- Fantasy words usually come out garbled.

In the end, I had more misdetected text with Tesseract than with my own OCR code. It seems to me that real OCR software was designed for a different purpose than what movie subtitle scanning needs. We don't need fuzzy logic that can detect warped letters and stuff like that. Subtitle letters always look exactly the same. That leaves room to do fancy stuff that would be impractical in real OCR software.

madshi
15th October 2007, 13:47
In the end, I had more misdetected text with Tesseract than with my own OCR code. It seems to me that real OCR software was designed for a different purpose than what movie subtitle scanning needs. We don't need fuzzy logic that can detect warped letters and stuff like that. Subtitle letters always look exactly the same. That leaves room to do fancy stuff that would be impractical in real OCR software.
That's quite true. The big problem with the subtitle specific OCR is that often there are characters which look 100% the same, but are not (e.g. capital "i" and small "L"). So often it's necessary to run the results through a word processor with syntax check to see if there are any detection errors. I think a good external OCR program with a good word database could solve this problem.

Another problem I sometimes have with DVD subtitles is that they're not really using a specific font, but the texts are really rendered. That means almost every character looks ever so slightly different. There are e.g. 20 variations of how "e" looks etc. But this is rather rare.

Rectal Prolapse
15th October 2007, 21:32
Taktaal: Nice! Is there an option to only extract *forced* subtitles from blu-ray sup files? Thanks!

tribble222
16th October 2007, 22:54
I posted a new version that pretty much does BluRay perfectly now, as well as has a command line option to output the subtitles to a PNG image.

http://x0r.ch/suprip/

Now it's just the dictionary feature that's still missing for a 1.0 release :)

Great! I'll try this out.

I tried the tesseract software and while it seems to work for the included test file, it outputs gibberish when I try it on subtitles. Same with another project called gocr.

Edit: I got gocr to work at least. Increasing the ppi to 400 worked. In the sample png posted here earlier it recognized all italics "l" as "/" (easy to replace). But, it also changed all "..." into ", , ," and there were weird spaces in a good number of words. So not the greatest.

Rectal Prolapse
16th October 2007, 23:09
tribble, it is possible that the PNGs output by subrip need to be process again to make it easier to OCR - most subs have a black outline around every letter, while the background is transparent and may be set to a different color by subrip or tesseract is not interpreting the (transparent) background as black.

berndy2001
17th October 2007, 13:24
Including is a Visual Studio 2005 project for my little tool, written in C++. It is called SRTMaker. It's very rough though - it doesn't properly check command-line arguments, for example, but hopefully will help you if you decide to make a better tool. No restrictions, do whatever you like with it. :)

hello,

is their a way to get a compiled exe? i have no compiler ;)

extracing the images, edit them in photshop and read them in finereader is a lot of work, but it works...

i also tried SupRip before, the handling was not bad, but it crashed after 50% (after half an hour entering letters...)

Taktaal
17th October 2007, 19:34
i also tried SupRip before, the handling was not bad, but it crashed after 50% (after half an hour entering letters...)

Sorry about that but it's still a beta :P

If it happened in a recent version (0.81 or later) could you upload the .sup file somewhere as it may help me debug the program.

berndy2001
17th October 2007, 20:10
where can i see the version? ;) (i downloaded it today, so its lastest version)

--> pm

may somebody can compile srtmaker on page 12? i already have the subs in a html file.

Rectal Prolapse
18th October 2007, 02:29
Berndy, I hope this exe works - I added the msvcrt71.dll file and I *hope* this is sufficient to make it work for you!

It may take a while to get approved by the mods.

berndy2001
18th October 2007, 08:48
sorry, it doesn't work.

Computer 1:
In Shell it says: The Programm can't be started.

Doubleclick:
http://img155.imageshack.us/img155/5066/errorqi2.th.png (http://img155.imageshack.us/my.php?image=errorqi2.png)
this means: the application cant start, because the configuration isn't correct.Please reinstall the application.

Computer 2:
In Shell it says: "Could not open" and crashes. With and without a fileparamter

btw: you can also upload your files on a filehosting service like xirror.com and post the link here.