View Full Version : rip subtiltles from an avi?


Duncan_07
21st June 2003, 16:03
the question is in the title.
I search for a soft which could do that.
i do not find one for now.
Anyone could help me?

Thinks.

Duncan_07
21st June 2003, 17:20
I precise that i'd like to do an OCR of subs on the screen.

oddyseus
21st June 2003, 17:32
afaik, u cant ocr the subs from an avi since they r burnt into the video.

Duncan_07
21st June 2003, 18:05
thinks for your answer.

So it's not possible to rip subbtitles from an avi.

Snif...

Kaiousama
22nd June 2003, 12:01
So it's not possible to rip subbtitles from an avi.

Don't be so pessimist :sly:
I've searched as you did an avi sub ripper, and yes.. nothing pretty good is on the way but there is a virtualdub plugin:

SubLog (http://www.xs4all.nl/~vielle/video/sublog.html)

This filter can save subs in vobsub format, and (more useful in my opinion) can save sub timing in txt format. It works good only for on-solid-color subs (like subs placed in letterboxed video's bands), in that cases it works great.

@ everybody: do you know if this filter's sources are avaible? i'd like to modify and make it work better :D

Duncan_07
22nd June 2003, 14:51
what a good news !!
Thinks.

Duncan_07
23rd June 2003, 11:03
So i trie it and it work well.
But it's difficult to use it with anims.

thinks a lot for this awfull filter :D

Kaiousama
23rd June 2003, 12:16
Yes, i also want to use it with anime, but the filter cannot burn out all that's behind the subs, and so there are some wrong acquired timings because of residue colors.... very annoying :rolleyes:

Duncan_07
24th June 2003, 11:35
it's difficult too because of the color of subs. On certain animes, that change too ofen.

I made some test with a filter to obscure the back and it works better.

But if the back is too clear, there some problemes.

Shalcker
27th June 2003, 09:36
Well, i created somewhat similar stand-alone program which allows you to extract timings from avi. Certainly it was aimed for processing anime too. :)

Works a bit better since it checks sum of absolute differences rather then color (by default) as well as some other subtitle properties.

It also has "Manual mode" in which it will stop on every bit it considers to be subtitle appearance or subtitle change and ask you to enter phrase you'll see on the screen (with timing added automatically)... No automatic OCR yet :)

Sometimes small subtitles like "I..." are skipped as "noise", and sometimes subtitle changes are not detected, but in general detection rate is good... and there is a lot of room for improvement.

It is downloadable at animeburg.boom.ru (http://animeburg.boom.ru) (as "AviSubDetector v0.4.7 (english version with manual detected Subtitle control)" - that's the only bit in english on that page).

It is still in beta stage but it should work...
If avi codec output is not RGB24 (for example, XviD), you'll have to make AviSynth script with AVISource and ConvertToRGB24(). :)

Kaiousama
28th June 2003, 14:16
Originally posted by Shalcker
Well, i created somewhat similar stand-alone program which allows you to extract timings from avi. Certainly it was aimed for processing anime too. :)
Works a bit better since it checks sum of absolute differences rather then color (by default) as well as some other subtitle properties.

Wooooooooooowww!! Shalcker, this program is very very promising, it aims to do exactly what i need, faboulous!

It is downloadable at animeburg.boom.ru (http://animeburg.boom.ru) (as "AviSubDetector v0.4.7 (english version with manual detected Subtitle control)" - that's the only bit in english on that page).

I've tested the program, and during the recognising it highlights the right subtitles' parts, but in the output script subs are not appearing in the right times... maybe i've setted something wrong; if you have the time, could you create a little tutorial in english (only for the essential) for using in the right way you application ? many thanks :D

Duncan_07
28th June 2003, 17:40
Originally posted by daynight
By the way, are you sure your subtitled avi hasn't been created with submux (included in vobsub package), a tool that muxes an avi with a subtitle file?
Check it with directVobsub installed. In this case you can extract the muxed subtitles from your avi using graphedit (read submux.txt in vobsub directories).
Have a happy time

No, Subs are incrusted... otherwise it's too easy ;)



Originally posted by Kaiousama
Wooooooooooowww!! Shalcker, this program is very very promising, it aims to do exactly what i need, faboulous!



I've tested the program, and during the recognising it highlights the right subtitles' parts, but in the output script subs are not appearing in the right times... maybe i've setted something wrong; if you have the time, could you create a little tutorial in english (only for the essential) for using in the right way you application ? many thanks :D

I have the same result.
I have modifie some options, but i do not see anything which could correct that.

Shalcker
28th June 2003, 21:04
Originally posted by Kaiousama
but in the output script subs are not appearing in the right times...

Hmm, can you please explain a bit more what do you mean by that?
They should be +2ms off compared to original, but that's all...

What should be "right" time and what is the time you get from my program?

Or do you have problems viewing saved subs?
If so, which format do you use?
...I recently discovered small mistake within my routine which creates SSA which can cause up to 9.99 seconds distortion for both start and end time when viewed with VobSub, for example...
If you'll use SRT or SAMI, there should be no problems.

I'll fix that today, error was really small.


if you have the time, could you create a little tutorial in english (only for the essential) for using in the right way you application ? many thanks :D
I created it and will post it below.

Shalcker
28th June 2003, 21:12
Simplified guide:
If too many non-subtitle frames are detected as subtitles, you should increase Block Value, Drop Values and decrease slider to leftmost position if it's not already there.

You can also increase Block Count and Line Count a bit (by 1-5), but that is not recommended - default values for them should be fine in most cases, and where they aren't, changing them to the point where they'll not detect subtitle where there is none but it is detected with default setting will most likely cause them to skip places with subtitles too.

If frames containing subtitles are not detected as such, you should decrease "Drop Values", Block Value and move slider to one of the positions to the right.

If subtitle change is detected wrongly, you should check values for MED, LBC and DLC in square brackets, note those above value set at "Tracking Changes", and change values accordingly.

If subtitle change is not detected, you can try decreasing MED and LBC... or maybe just live with that and fix that manually later.

It is generally recommended to skip opening sequences when processing anime - as credits there are often detected all too well...

In window appearing after checking "Show AVI" you can see which parts of picture are considered to contain subtitle, and also load picture from BMP to tune detection.
"Check BV", depeding on button "L", shows either "sharp" blocks in the picture or "sharp" lines in inverted colors.
"Influence" shows pixels not zeroed by "Drop Values".

Black vertical line on the graphic to the right corresponds to Block Count limit. If DLC shown after "Check BV" is above Line Count, then program will decide that this frame contains subtitle.

"Substraction", "[DOM]" and "<DOM>" will currently only work during avi playback.

"=DOM" sets current "dominating color" to the color of pixel on which you previouly clicked, and "+DOM" adds that pixel color as additional "dominating color".

Currenly all time values have 2ms added to them, which can
cause subtitles to appear one frame off compared to original.
This was added as workaround for certain programs,
and will most likely change to zero or configurable value later.


--------------------------
Complete Theory of Operation:

Each line the in picture is separated to 16-pixel blocks (with rightmost block ignored for simplicity). For each block progam calculates sum of absolute differences between pixels for each color component, and if that sum exceeds set threshold (Block Value), that block is considered to be "sharp" and possibly containing subtitle.

If absolute difference in color component for a given pixel is below one set at "Drop Values", that difference is considered to be zero and is ignored in Pixel Sum. If sum of all differences for a given pixel is below one set at "Drop Values" for sum (and Sum checkbox is set) that pixel difference is considered to be zero.

Slider above "Drop Values" sets distance between pixels checked
for absolute difference. Default is 1 (check pixels next to each over). You can set it to 2 or 3 if there is really strong blurring or antialiasing which inhibits subtitle detection, but you'll most likely also have to increase Block Value too to prevent noise aplification. Default Block Value of 200 is fairly optimistic and relies mostly on supression of medium color changes by "Drop Values".

RedDiff = Abs( Red[X, Y] - Red[X+Offset, Y] );
GreenDiff = Abs( Green[X, Y] - Green[X+Offset, Y] );
BlueDiff = Abs( Blue[X, Y] - Blue[X+Offset, Y] );
PixelValue = RedDiff + GreenDiff + BlueDiff;
BlockValue = Sum (PixelValues);

Once Block Value exceeds the threshold, that Block is considered to be "sharp". Once we got all Block Values for a line, they are counted in rather simple manner:
0111110 => BlockCount=4 (1 - sharp block, 0 - non-sharp block)
0110110 => BlockCount=2
0101010 => BlockCount=0
Hope you get an idea. Only consecutive blocks add to BlockCount.
Once line exceeds set BlockCount, it is considered to be "sharp" too.
Then we check lines in the same manner as blocks in previous example to obtain LineCount, and once that exceeds set value, we consider that
frame as containing subtitle.

As you see, everything is really simple... I implemented this after about six hours of programming and was truly amazed how good results were compared to what i expected...

Program detected appearing subtitles really well; but once there was no delay between subtitle change, that was insufficient.

So i added "Tracking Changes".
"MED" tracks difference between average number of blocks divided by number of lines (multiplied by 10 for precision), therefore reacting to change in subtitle horizontal length.

"DLC" track difference between count of detected lines, therefore reacting to transitions between one- and two-lined subtitles.

"LBC" track difference in number of lines with same block count, which should react to both width and height changes... but it's not really useful, and you might want to turn it off if there is too many false change detections. I should probably add another threshold there which will "join" lines with block count difference below set value.

MBC checks maximum number of blocks in detected lines, and in general produces too much noise at low settings and adds quite little at high settings.

For each of these values the number in square brackets shows value which caused program to detect change. If that change was wrong (and not once), you should set corresponding tracking value above wrong one.

Duncan_07
29th June 2003, 00:04
Thinks for your guide.
I do not understand all what you wrote, but it's late and at this time i better go to bed :p
So i'll read it again tomorow.

For the incorect timing of the generated file, in my case, subs are not place a the right time. They appeared 2 ou 3 secondes after the original (but it's not always the same shift) and then with ssa en srt output.

tommorow is an other day, i will see.

Shalcker
29th June 2003, 06:25
Originally posted by Duncan_07
For the incorect timing of the generated file, in my case, subs are not place a the right time. They appeared 2 ou 3 secondes after the original (but it's not always the same shift) and then with ssa en srt output.
It was possible for SSA, but not for SRT.

Example:
Program:
<SYNC Start=9075ms><P>! Frame=136 MBC=3/17 LBC=0 (0) [0] MED=100 DLC=16
<SYNC Start=15951ms><P>&nbsp;

SRT:
1
00:00:09,075 --> 00:00:15,951
! Frame=136 MBC=3/17 LBC=0 (0) [0] MED=100 DLC=16

SAMI:
<SYNC Start=9075ms><P class=CC0>! Frame=136 MBC=3/17 LBC=0 (0) [0] MED=100 DLC=16
<SYNC Start=15951ms><P class=CC0>&nbsp;

SSA:
Dialogue: Marked=0,0:00:09.07,0:00:15.95,Default,,0000,0000,0000,,! Frame=136 MBC=3/17 LBC=0 (0) [0] MED=100 DLC=16

I was using format 0:00:00.000 instead of 0:00:00.00 for SSA which caused VobSub to multiply last number by 10 (causing end time in this example to be 15+9.5=24.5), but that is already fixed (you can download new version 0.4.8 from my page).

There never was any problem with other formats.
As you can see, scripts are saved exactly as they appeared in program.

Clip used in this example has FPS of 14.985, so frame 136 is 136/14.985=9.0757424, exactly 9075 ms.

Duncan_07
29th June 2003, 09:35
So i'll download the new version and i try it again.
Thinks.

EDIT after a try:

So i retry it with the version 0.4.7 and the srt format and it work's very well !!
You made a very good job !!!

Duncan_07
29th June 2003, 14:08
Just to say that the ssa format works perfectly too in the 0.4.8 version.

Shalcker
1st July 2003, 15:44
Since few people seem to have problems with boom.ru (no surprise though), i mirrored my program here: http://web.etel.ru/~shalcker/AVISubDetector_english.rar
I hope this link will work a bit better.

Wizal
17th July 2003, 08:26
do you know if this filter's sources are avaible? i'd like to modify and make it work better :D

I just released the source code as I have not a lot of time to work on it and 10000000000000000 people are e-mailing me about it everyday... I hope you can modify it as you wish, but please credit me if you use my code :D

Duncan_07
22nd July 2003, 15:28
Shalcker.
I did no see any option to open a sub file in order to resume a rip.
Do you think it's possible to add?


Wizal
I read the source and did not understand anything :p

Shalcker
22nd July 2003, 17:21
Originally posted by Duncan_07
Shalcker.
I did no see any option to open a sub file in order to resume a rip.
Do you think it's possible to add?
It's quite easy, around ten minutes of programming.
Everything needed for this is already there. :)

I'll code that ASAP.

Edit: Version 0.4.9 with ability to load subtitles as well as ability to save and load detection settings (with exception for dominating color selection) is available here (http://web.etel.ru/~shalcker/AVISubDetector_english.rar)

Duncan_07
23rd July 2003, 10:02
Thinks a lot !!
You are marvelous :D
I test that :)

Kurtnoise
25th July 2003, 19:51
Hi !!

Great tool Shalcker...thanks.:)

I tried to use "Automatic Mode" but I've no detection for the characters. :mad: However, with "Manual Mode" it works like a charms...Anyone noticed that ??

A suggestion for the next release : add italic support for SRT format, because I tried this http://kurtnoise.free.fr/sub/avidetector04.gif but unfortunately I haven't recovered <i> and </i> in my output file. :D

Shalcker
25th July 2003, 20:31
Originally posted by Kurtnoise13
Hi !!

Great tool Shalcker...thanks.:)

Glad to hear that. :)


I tried to use "Automatic Mode" but I've no detection for the characters. :mad: However, with "Manual Mode" it works like a charms...Anyone noticed that ??
That's intended mode of operation for automatic mode so far, as i haven't even started building OCR routines. It should be only used to gather subtitle timing (and debug values), with everything else done in your favorite subtitle editor. :D
You can set it to run a whole anime season for a night for example (and if you check "Save subs to:" it'll create separate subtitle file for each avi processed) then edit them next day :)

Manual mode is more reliable though.

...or do you mean there is _no_ output in script window for automatic mode at all?

A suggestion for the next release : add italic support for SRT format, because I tried this http://kurtnoise.free.fr/sub/avidetector04.gif but unfortunately I haven't recovered <i> and </i> in my output file. :D
You need "basic" srt restrictions removed and usage of html tags allowed there? nothing can be easier, there is already procedure for that in my subtitle processing unit. I'll make this option available once I'll wake up next morning, got to sleep now.

Meanwhile you can use SAMI or SSA which shouldn't strip this tag... :)

Shalcker
26th July 2003, 05:54
AVISubDetector 0.4.9.1 with additional Save Subs option "SRT with tags" is available at the same URL here (http://web.etel.ru/~shalcker/AVISubDetector_english.rar)

Kurtnoise
26th July 2003, 16:33
Originally posted by Shalcker

That's intended mode of operation for automatic mode so far, as i haven't even started building OCR routines. It should be only used to gather subtitle timing (and debug values), with everything else done in your favorite subtitle editor. :D
You can set it to run a whole anime season for a night for example (and if you check "Save subs to:" it'll create separate subtitle file for each avi processed) then edit them next day :)

Ok...!!! Thanks for clarify that. I thought that Automatic Mode starting building OCR alone :D :o :o


Originally posted by Shalcker
...or do you mean there is _no_ output in script window for automatic mode at all?

No, no... ;) I obtain a correct script output file with Automatic Mode.




Well....thanks for the new release and tags support for SRT files. :p I'll test it this week-end :cool:

Cheers

dvd_master
27th July 2003, 17:47
Well, I just want to say your program is FANTASTIC. It did a flawless job with the AVI I tried (HikaGo).

Thanks a LOT!

Coroner
30th July 2003, 17:27
I have downloaded your program and I am having an issue. I think I've missed something or have something set up wrong. I get the following error message on some AVIs.

"ERROR IN FRAME OPEN"

Perhaps this is related to the format of them? Xvid seems to work fine but others play up. I noticed you mention using AVISynth to convert the colour format.

Has any one got a script written to prepare AVIs for this program?

Thanks

Oh and BTW the AVIs I have used it on have produced excellent results!
This program is a life saver.

Shalcker
30th July 2003, 19:44
Originally posted by Coroner
I have downloaded your program and I am having an issue. I think I've missed something or have something set up wrong. I get the following error message on some AVIs.

"ERROR IN FRAME OPEN"

Perhaps this is related to the format of them? Xvid seems to work fine but others play up. I noticed you mention using AVISynth to convert the colour format.

Has any one got a script written to prepare AVIs for this program?

Avisynth script for opening anything with my program should be rather simple - it's

AVISource("filename",audio=false)
#or any other video source
ConvertToRGB24()

Base algorithm should work fine in any colorspace, but RGB24 is the only one supported at the moment.

Maybe I should just set required colorspace in call to AVIStreamGetFrameOpen. It is currently called as pframe:=AVIStreamGetFrameOpen(PAviVideoStream,nil), and that can produce error in certain cases when decoding to "default" frame format (which should be returned when lpbiWanted is set to NULL) is "not supported" for some reason. "If the system cannot find a decompressor that can decompress the stream to the given format, or to any RGB format, the function returns NULL." And when function returns NULL you get "Error in FrameOpen" message...

I'll release next version with lpbiWanted fix tomorrow and we will check is pointing it to RGB24 settings solves your problem :)


Oh and BTW the AVIs I have used it on have produced excellent results!
This program is a life saver.
:)

Coroner
31st July 2003, 09:30
Thanks for the help.

Shalcker
1st August 2003, 15:45
Ok, i fixed AVIStreamGetFrameOpen call, now program should always get RGB24 if appropriate conversion is available. Tested it by feeding script with ConvertToYV12() at the end and it worked, so i guess it should be ok. If "forced" RGB24 fails it will attempt to get frame using NULL as in previous versions.

As usual, version 0.4.9.2 is available at
http://web.etel.ru/~shalcker/AVISubDetector_english.rar

So, try it and tell me if those problem files got any better ;)

Coroner
1st August 2003, 16:18
Yep work fine now. Thanks a lot!

Anaylson
21st August 2003, 14:38
hi friends,
sorry to bother u with my humble ignorance but...
what can i do to get some subs that the proggie skips?
i mean 99% of the entire subtitle is caught by your program but sometimes it jumps some of them...how can i get those?

and let me see if i got it straight...
1 - on auto mode i can only get the timings of the sub, right? ´cos it displays something like that '!frame mdl etc etc etc' besides the right time of the line;
2 - on manual mode i can write the right setence of the sub in the window that pop-up, right?

Another thing...how can i use the tons of bitmaps that the proggie writes if i check the bitmap option? ´cos in vandread anime, in ep07 for exemple, it wrote 200mb of bitmaps ;)
i thank u all in advance for any help and grtz u for that great proggie when i dominate it, it will be a wonderful tool for me, thx a lot!

Shalcker
22nd August 2003, 03:13
Originally posted by Anaylson
hi friends,
sorry to bother u with my humble ignorance but...
what can i do to get some subs that the proggie skips?
i mean 99% of the entire subtitle is caught by your program but sometimes it jumps some of them...how can i get those?

Find frame with skipped subtitle in VirtualDub, for example, and save it as BMP. Check "Show AVI Images" checkbox and load it as "Sample BMP". Press "Check BV" with "L" pushed down and look at graph to the right. Black vertical line there represents "BlockCount" setting, and black horizontal lines represent BlockCount for each line.
Lines with BlockCount > threshold are inverted, and only those lines participate in calculating LineCount. Check DLC (Detected Line Count) in the top right corner. When it's higher then LineCount setting then subtitle presence is "detected" for this frame.
Press "Check BV" with "L" pushed up to see individual "detected" blocks (those over BlockValue limit). Try to adjust settings in a way that subtitles are shown as solid lines of inverted blocks, without any gaps. See guide on the first page for explanations about settings.

In best case only subtitles are marked with inverted blocks. In a bit worse case some parts of image are also marked (edges) but they don't go over BlockCount limit. In a worst case some parts of image are marked and they also go over BlockCount limit, meaning that they are detected as "possible subtitle lines"; but having that can be ok too since you can skip "noise" frames manually fairly fast.

If there is only a few subtitle colors you can also set them as "Dominating" colors. Press left mouse button on subtitle image and notice that colored rectangle in the top-right changed to subtitle color. Press "=Dom" to change "current" dominating color to selected color or "+Dom" to add it as additional dominating color. Adjust "Deviation" to higher value (subtitles are generally antialiased and require up to 50-150 deviation to be detected properly), then try checking "Ignore blocks without color" (blocks without dominating color are ignored by assigning them BlockValue of 0) and "Assign maximum value"... Dominating colors are fairly recent addition and you can only see their influence at "playback" time (that's when "Subtraction", "[Dom]" and "<Dom>" buttons start working).

and let me see if i got it straight...
1 - on auto mode i can only get the timings of the sub, right? ´cos it displays something like that '!frame mdl etc etc etc' besides the right time of the line;
2 - on manual mode i can write the right setence of the sub in the window that pop-up, right?

Yes, you got it right :)

Another thing...how can i use the tons of bitmaps that the proggie writes if i check the bitmap option? ´cos in vandread anime, in ep07 for exemple, it wrote 200mb of bitmaps ;)
For 640x480 it's around 1Mb per frame/bitmap, so having anly around 200 BMPs is quite good result :) You can use them in any way you like.

For example, you can check "Show AVI Images" and load them as "Sample BMP" to adjust detection settings :)

Anaylson
22nd August 2003, 04:48
thx a lot friend!
i´ll check the advise later when i get home
keep up the good work!:)

simdavid
6th September 2003, 23:38
Thanks to you in the first place for this wonderful program. I really need what I need to do for a show. However, just 1 small problem. The same line of words appear 5 times at a duration of2-3 frames difference. I believe that the program is tracking background changes in program and therefore output it in 2-3 frames interval. However, the end result in the srt file is what is shown below. This is just an example. I have catch 10 lines of the same line 10 times. 99% of the subtitle repear itself.

The problem using this Srt file is that the line ficker in split sec. Thus making the subtitle play fickering. End result, not a smooth play for subtitle.

Inorder to solve this problem. I use the first line timing and the last line time of where it appears and combine it. Thus making it 1 line with start time of First line and End time of the last line which can be the no.8 or 10 line.

This make editing very time consuming.

Thank you shalcker for this program. I wonder is there anything you can do to solve this problem?

Or did I use the program incorrectly?

The same subtitle that appears 8-10 times. After I enter the sentence. I press accept text. And if the next frame shows the same subtitle, I press accept text again till the subtitle changed and I key in the changes.

Can I also suggest the following features.
.1 Saving srt file halfway even though not yet finish. This is just for a preview of the sub.

2. Adding a stop button to finish the operation halfway.

3. One problem, is that If I make a mistakes halfway. How do I undo or correct the mistakes?

86
00:01:04,264 --> 00:01:04,566
Then I will cut off your tongue

87
00:01:04,566 --> 00:01:05,333
Then I will cut off your tongue

88
00:01:05,333 --> 00:01:05,767
Then I will cut off your tongue

89
00:01:05,767 --> 00:01:06,401
Then I will cut off your tongue

90
00:01:06,401 --> 00:01:06,735
Then I will cut off your tongue

91
00:01:06,735 --> 00:01:06,768
Then I will cut off your tongue

Edit myself
Using the first line timing and last line timing
86
00:01:04,264 --> 00:01:06,768
Then I will cut off your tongue

I sincerely thank you for your time in writing this program and helping to solve the problem of your user.

Shalcker
7th September 2003, 04:21
Originally posted by simdavid
The same subtitle that appears 8-10 times. After I enter the sentence. I press accept text. And if the next frame shows the same subtitle, I press accept text again till the subtitle changed and I key in the changes.

When you see that subtitle is not changed yet program asks for your input you should press Alt-C (Subtitle Not Changed) instead of Alt-A (Accept Text). This will cause program to "skip" this subtitle change without adding new timing and retain current text until it encounters another subtitle change or subtitle disappearance.


Can I also suggest the following features.
1. Saving srt file halfway even though not yet finish. This is just for a preview of the sub.
Well, press "Pause" then "Save Script" and save it.
Or do you want that to be done automatically with each new subtitle added? That can be done.

2. Adding a stop button to finish the operation halfway.
Pause does that. Do you want "Stop" to act like "End Frame of File Reached" activating automatic save/clear? That can be done too.

3. One problem, is that If I make a mistakes halfway. How do I undo or correct the mistakes?
You can find mistake and fix it in script window. :)
I can also add "Find" dialogue to script window if you need that.

simdavid
7th September 2003, 11:21
Thanks for the quick reply Shalcker,

The (Subtitle Not Changed) Button is grey out when I try to use it. Meaning not usable, try to press Alt-C but nothing happen. It that any setting I must set to activate it? I'm using 0.4.9.2 Beta. I believe this will solve my problem then!

I thank you again for the generousity of your program and listening to our request. I think the 3 little minor features will perhaps overall improve the usabililty experience on your program.

I think feature 1 is unnecessary. When I was using the program the first time. I didn't know what's the capability of it and I wanted to make a short part of the sub to try it out. However, I couldn't save the part and I have to let automatic control to finish till the end of movie. But now, I understand that you can pause then save script. It's actually my ignorance anyway!

Feature 2 and 3 will be nice.


Pause does that. Do you want "Stop" to act like "End Frame of File Reached" activating automatic save/clear? That can be done too.

Yes, that will be a nice feature. And 1 more thing is that when the movie is completed, is it possible to add "Movie Completed". Hahaha, When I was exploring the program yesterday. I didn't even know that the movie has been completed till I looked at the numbers of frames/total frames.

You can find mistake and fix it in script window. I can also add "Find" dialogue to script window if you need that.

Yes that will speed up searching for words much more easily. And is it possible to a a scroll Up/Down bar in the Script window. Currently, I have to use the Up,Down button key to maneuvore in the script window. I think a scroll Up/Down will be much more easier to control!

I thanks you for your time to hear us out!

simdavid
8th September 2003, 01:34
Dear Shalcker,

Is it possible that the program open Mpeg 1 and 2 files (SVCD) not VOB files?

Afeter many hours of trying, the 'Subtitle not changed' button is still grey out.

Shalcker
8th September 2003, 03:17
Originally posted by simdavid
The (Subtitle Not Changed) Button is grey out when I try to use it. Meaning not usable, try to press Alt-C but nothing happen. It that any setting I must set to activate it? I'm using 0.4.9.2 Beta. I believe this will solve my problem then!It is only activated when there is subtitle change detected. In that case there is no "gap" between subtitles like in script you quoted. It is never enabled when subtitle appears for a first time after any number of non-subtitle frames to prevent accidential skipping - it is equal to "No Subtitle" button in that case anyway.

Feature 2 and 3 will be nice.Thanks for feedback :)
It is close to impossible to improve it without feedback :)

I'll try to code that in a next few days. Do you want program to ask you to save script (bringing up "Save" dialogue) on "STOP" if automatic saving ("Save Subs to:") is not checked?

Yes, that will be a nice feature. And 1 more thing is that when the movie is completed, is it possible to add "Movie Completed". Hahaha, When I was exploring the program yesterday. I didn't even know that the movie has been completed till I looked at the numbers of frames/total frames.Hmm, something like "status" can be useful, you're right.
Will lowering "queue" a bit and adding something with "STOPPED/PAUSED/NO SUBTITLE/DETECTED/CHANGED/FINISHED" depending on current status suffice? :)

Yes that will speed up searching for words much more easily. And is it possible to a a scroll Up/Down bar in the Script window. Currently, I have to use the Up,Down button key to maneuvore in the script window. I think a scroll Up/Down will be much more easier to control!That's really easy to add too. I'll do that.

Is it possible that the program open Mpeg 1 and 2 files (SVCD) not VOB files?AVISynth and MPEGDecoder.dll (MPEGSource) should allow you to do that. Just create appropriate AVS and open it in my program.

I thanks you for your time to hear us out!
Thank you for your suggestions too :)

Duncan_07
8th September 2003, 14:16
A think an other improvement could be cool.

I would like to set the aproximation to the upper or lower value.
For exemple the start time of a sub is 0:02:29.24, but in fact it's
better to be 0:02:29.23

I think your programme approximate only to the upper value and it makes a little shift that's noticeable.

PS: excuse me for my poor english :p

Shalcker
8th September 2003, 15:25
Originally posted by Duncan_07
A think an other improvement could be cool.

I would like to set the aproximation to the upper or lower value.
For exemple the start time of a sub is 0:02:29.24, but in fact it's
better to be 0:02:29.23
Check and set "Time Offset" to -10 or whatever value you like then ;)

I think your programme approximate only to the upper value and it makes a little shift that's noticeable.
Exactly opposite of that. Program creates frame-accurate timing (as long as subtitle frame detection is accurate) and only truncates time below millisecond resolution (or 1/100 of second in case of SSA), never rounds.

simdavid
9th September 2003, 00:55
Thanks again Shalcker;) for your work:p

Will lowering "queue" a bit and adding something with "STOPPED/PAUSED/NO SUBTITLE/DETECTED/CHANGED/FINISHED" depending on current status suffice?

That is infact wonderful as it add more functionality and usability to the program, we would have more choices during the course of subtitling.:p


Do you want program to ask you to save script (bringing up "Save" dialogue) on "STOP" if automatic saving ("Save Subs to:") is not checked?

Yes, that will ensure a user to save their work incase a person might be busy on the computer on 2-3 things. Like I do:D

It is only activated when there is subtitle change detected. In that case there is no "gap" between subtitles like in script you quoted. It is never enabled when subtitle appears for a first time after any number of non-subtitle frames to prevent accidential skipping - it is equal to "No Subtitle" button in that case anyway.

What would be a nice solution to solve my problem:confused:

Is there a work around for the function of (Subtitle not changed):D

Thanks for your time again, I bet you're a busy man yourself :p

Shalcker
9th September 2003, 02:09
Originally posted by simdavid
What would be a nice solution to solve my problem:confused:

Is there a work around for the function of (Subtitle not changed):D
There is no need for workaround, really.
It is only active when it is applicable. And it is only applicable when:
- subtitle change is detected <=> there is something other then & nbsp; at the end of the script

It is inactive for the most of the time, but just reach your problem point and you'll see that "Not Changed" button is active at that moment.

Duncan_07
9th September 2003, 10:27
Originally posted by Shalcker
Check and set "Time Offset" to -10 or whatever value you like then ;)


Not all subs are in this case, so i cannot had an offset for all my ssa.



Originally posted by Shalcker
Exactly opposite of that. Program creates frame-accurate timing (as long as subtitle frame detection is accurate) and only truncates time below millisecond resolution (or 1/100 of second in case of SSA), never rounds. [/B]

So there a pissiblité to not truncate the time but around it?
ex: 0:02:29.235 --> 0:02:29.23 or 0:02:29.24 a choice?

Shalcker
9th September 2003, 16:09
Originally posted by Duncan_07
Not all subs are in this case, so i cannot had an offset for all my ssa.Then how do you expect rounding to behave better then truncating?
Rounding can only produce higher results, and you need lower in your case... so problem lies elsewhere.

So there a possibility to not truncate the time but around it?
ex: 0:02:29.235 --> 0:02:29.23 or 0:02:29.24 a choice? Look at this simple equations then:
TruncToSecond(0:02:29.235) = 0:02:29.23 (last digit truncated)
RoundToSecond(0:02:29.235) = 0:02:29.24 (last digit rounded)
TruncToSecond(0:02:29.235 + 0:00:00.005) = 0:02:29.24 (exactly the same as last digit rounded)

No need for separate option really.

If you need some of them truncated and some of them rounded... you'll need to provide criteria for that first :)

Duncan_07
10th September 2003, 14:29
Originally posted by Shalcker
Then how do you expect rounding to behave better then truncating?
Rounding can only produce higher results, and you need lower in your case... so problem lies elsewhere.

Look at this simple equations then:
TruncToSecond(0:02:29.235) = 0:02:29.23 (last digit truncated)
RoundToSecond(0:02:29.235) = 0:02:29.24 (last digit rounded)
TruncToSecond(0:02:29.235 + 0:00:00.005) = 0:02:29.24 (exactly the same as last digit rounded)

No need for separate option really.

If you need some of them truncated and some of them rounded... you'll need to provide criteria for that first :)

I understand all that, and that's why a do not understant why some (30-40%) of the subs have 1ms forward shift.

Shalcker
14th September 2003, 08:20
A new version with requested features is available at the same URL - http://web.etel.ru/~shalcker/AVISubDetector_english.rar.

Features added: Status panel
"STOP" button
a few "PAUSE" bugfixes (no longer skips frames when you pause from detected position)
Automatic "Save Subtitles" dialogue popup upon reaching end of file or pressing "STOP" button if "Save subs To:" is not checked (automatic save is performed otherwise)
"Find" button/dialogue for script window

I hope no new bugs are introduced :)

simdavid
14th September 2003, 14:30
Hi Shalcker,

I just downloaded the program today. It's much more cool and getting user friendly:) Maybe adding the status panel make a difference. At least that's how I feel:p

Can I suggest another idea to you? I hope I'm not getting too far by stealing your time:p . In the Manual Subtitle Control, "Accept text" is the start point to enter a new time and text in the script window. How about adding another function call "End current line". "End current line" will end the last frame where subtitle appears for that line and input the timing, plus input the line in the script window. This way, user have more control over the start frame and end frame of subtitle during subtitling. At the same time, the function "Not change" can be on at all times. When pressed, it does not edit or add anything to the script except just hold on/maintain the duration of the first line and its timing till "End subtitle line" is pressed. Thus ending the last frame/whole duration where the line appear and save it timing. It's function is to enable the program to know that the user is still on this same line controlling the duration of the line.

I understand that "Not changed" is activate only when it hit a lines that activate it. Can it be on all times?

I understand that "Accept text" gives a new time and line. Thus if subtitle is detected correctly.Simply pressing "Accept text" to proceed on next line:)

The purpose is to give user more manual controllability in the subtitling process since different shows and movies can give false detection. In my case, 1 subtitle line can span for 4 secs. Thus giving me many headaches in editing the correct end time :D. Of course, there are the easy one to do and difficult one that pulls the hair out :mad: On the other hand..one of the Anime shows I try out went smooth sailing! So I guess, versatility is a good attribute in the program!

I hope I'm not complicating things:p

Thanks again for your time:)

Shalcker
15th September 2003, 13:04
Originally posted by simdavid
In the Manual Subtitle Control, "Accept text" is the start point to enter a new time and text in the script window. How about adding another function call "End current line". "End current line" will end the last frame where subtitle appears for that line and input the timing, plus input the line in the script window. This way, user have more control over the start frame and end frame of subtitle during subtitling. At the same time, the function "Not change" can be on at all times. When pressed, it does not edit or add anything to the script except just hold on/maintain the duration of the first line and its timing till "End subtitle line" is pressed. Thus ending the last frame/whole duration where the line appear and save it timing. It's function is to enable the program to know that the user is still on this same line controlling the duration of the line.
I cannot understand this, sorry :confused: So let me guess..

You're talking about (optional) manual control of "automatic" & nbsp; ("empty" subtitles) added by program in the same manner as subtitle appearance/change? I don't think it'll be useful but it's rather easy to add (and certainly "Not changed" should be active at such points).

When program automatically adds & nbsp; into script it is supposed to be true subtitle disappearance in 99.999%. When it doesn't that means that subtitle is detected "weakly" (sometimes "disappearing" for my program but still remaining on screen - you can see that in "Show Avi/Check BV" as disappearing or rather thin inverted lines), and you really should tweak detection settings in this case, by at least moving slider to second position. "Weak" subtitle detection should be avoided, and whenever possible subtitles should remain on screen as "strong" detected areas even if more detection "noise" is created by that.

I understand that "Not changed" is activate only when it hit a lines that activate it. Can it be on all times?
I really think it should not. Since all it does is preserving current status without any actions, using it with "DETECTED" status will cause that subtitle to be skipped - there is always & nbsp; behind, and if you do not input new timing and line text into script this "empty" subtitle will remain. This is equal to "No subtitle" button (though "No subtitle" also adds another & nbsp; just in case). Do you really think this is how "Not changed" should behave when subtitle appears? :) I'd rather think of it as "Accept Text" duplicate in that case but why do we need any duplicates? :)

The purpose is to give user more manual controllability in the subtitling process since different shows and movies can give false detection. In my case, 1 subtitle line can span for 4 secs. Thus giving me many headaches in editing the correct end time :D.
Of course, there are the easy one to do and difficult one that pulls the hair out :mad: On the other hand..one of the Anime shows I try out went smooth sailing! So I guess, versatility is a good attribute in the program!
You mean you actually use it for non-anime sources and it works? :)
...i don't have any non-anime subtitled material here to test it :)

Maybe you can cut that problematic fragment (if it is not too big) and send it to me? Then i hope i'll be able to give a few better suggestions :)

efvb
25th December 2003, 18:19
Great Work :cool:

thanks a lot

efvb
25th December 2003, 18:47
well, I'm using the 0.4.9.4 release and
in the text box that shows the sub need a scroll bar :)
and a automatic scroll to view the current sub.

well, if that options already exist it would be default...

Shalcker
26th December 2003, 06:00
Originally posted by efvb
well, I'm using the 0.4.9.4 release and in the text box that shows the sub need a scroll bar :)

Oh, it doesn't? Guess I just forgotten to set that. Two-second change.

and a automatic scroll to view the current sub.
"Current sub" is always added as last one. Text box automatically scrolls down on every new line added... when that text box has "focus". I can set focus there automatically on "Start", that should do the trick :)

I'm planning to release new version with big changes real soon (hopefully this year) :)

gircobain
26th December 2003, 06:45
Man what an amazing program
I didn't think something like this could be accomplished
Code some OCR routines and you'll be officially declared god :D
Congrats Shalcker!

Shalcker
26th December 2003, 07:53
Originally posted by efvb
in the text box that shows the sub need a scroll bar :)
and a automatic scroll to view the current sub.
Done.
As usual, available at http://web.etel.ru/~shalcker/AVISubDetector_english.rar

dead
1st January 2004, 02:44
um, i have an avi movie file, i would like to somehow make subtitles for the avi file, anyway i can do this?

dvd_master
2nd January 2004, 02:18
I have a few problems with this otherwise perfect software.

If I'm trying to rip the subtitles from an AVI that has a black bottom (widescreen) and the subtitles cross between them, it causes some problems. Like the subtitles in the Detective Conan movie cross the border, so while the subtitles don't change, the scene does, it detects it as a new subtitle and disables the 'not changed' option. I second the idea of a 'force not changed' box for those few times. One of my scripts had the same line 10 times.

A feature I would like is a setting for such widescreen movies, where we can identify the black bar at the bottom. So if there's any change AT ALL in that defined area, it's a subtitle. This would work for one lines (which are in the bar) and two+ lines (which are partly in the bar). I understand that's a lot of work, but it would really help make the program ideal.

Another quick problem is in the widescreen movie (still Detective Conan), that really quick lines aren't detected. Also, I can't put it at 1/4 because that cuts off too much, so I have to put it at 1/3 so even in just scenes with lots of motion it thinks is a subtitle.

Oh, if the widescreen-definition is too tough, a great workaround would be allowing you to see the whole screen even when it's at 1/4, so that way it's only detecting on the black border but I can still read all of the subtitles.

Thanks a TON!!

Shalcker
2nd January 2004, 09:24
Originally posted by dvd_master
I have a few problems with this otherwise perfect software.

If I'm trying to rip the subtitles from an AVI that has a black bottom (widescreen) and the subtitles cross between them, it causes some problems. Like the subtitles in the Detective Conan movie cross the border, so while the subtitles don't change, the scene does, it detects it as a new subtitle and disables the 'not changed' option. I second the idea of a 'force not changed' box for those few times. One of my scripts had the same line 10 times.
Hmm, it shouldn't disable "Not Changed" when there is a "change" detected - unless there is some point where subtitles "disappear". I added 'Controlled "Empty"' option (when checked it will pop up "selection" window in Manual Mode for subtitle disappearance event), maybe it will help a bit.

A feature I would like is a setting for such widescreen movies, where we can identify the black bar at the bottom. So if there's any change AT ALL in that defined area, it's a subtitle. This would work for one lines (which are in the bar) and two+ lines (which are partly in the bar). I understand that's a lot of work, but it would really help make the program ideal.
Not too much work i think... You can just set that area for processing and use a lot lower "drop"/"block" thresholds.

Another quick problem is in the widescreen movie (still Detective Conan), that really quick lines aren't detected. Also, I can't put it at 1/4 because that cuts off too much, so I have to put it at 1/3 so even in just scenes with lots of motion it thinks is a subtitle.

Oh, if the widescreen-definition is too tough, a great workaround would be allowing you to see the whole screen even when it's at 1/4, so that way it's only detecting on the black border but I can still read all of the subtitles.

As a quick fix I added "crop-percent" settings for top and bottom lines (so now you can set any part of image for processing with 1% precision) and "Show Full Frame" checkbox that will show full frame in manual processing window instead of cropped part.

For quick lines you should probably just disable "Skip Frame" option... problem might be that they are too small to be detected by "two 16x1 block at center, several lines in row" criteria.
You may try using AVISynth to crop and resize part with subtitles to higher resolution (in most cases upsizing will also require moving "slider" to second position for x2, third for x3 etc).

As usual, last version (0.4.9.6) is available at
http://web.etel.ru/~shalcker/AVISubDetector_english.rar

dvd_master
2nd January 2004, 21:24
I appreciate the changes, however when trying to resume where I lost patience :D (Frame 131086) without changing any of the default settings except switching it to Manual mode, it goes to 131354 / 183564 and says finished without detecting anything at all.

Shalcker
2nd January 2004, 22:42
dvd_master
Sorry, I can't reproduce that... I created AVS script which produced 2M of frames and started from 1st million - everything was working as expected...

Maybe there is some kind of problem with that particular frame though?
Since from the look on the code the only way it can finish and display "FINISHED" status is by either reaching last frame _or_ failing to get requested frame (resulting in NULL frame pointer)... guess i should add additional "ERROR" status for this case though... :)

LB
9th January 2004, 02:54
Hey Shalcker,

First, A+ on your program. It was really great. I found a bug in the latest one though. On manual when I click "NO SUBTITLE" it still tags it as a subtitle in the txt window, and a jpg is still captured. Do you experience this too?

I also thought up two suggestions, that might hopefully make this wicked program even cooler.

1. A previous line button.
Like, say you are doing the manual, and you notice a sub missed. It's somewhat a pain (and costs time) to stop it, then do the jump to frame and try to hit the missed frame exactly. Is there a way you could get some kinda "previous line" button where you simply hit it and go to the previous line. I suppose you could make it go back upon each press, so if the line was missed 3 subs ago, you could just hit the button three times.

2. Numbered output
Can you let us choose if we want to put a number as the output image filename? Example: 00001, 00002, 00003, 00004, 00005, etc?

Thanks again,
LB

Shalcker
10th January 2004, 13:34
0.4.9.7 is available at the same URL :D
http://web.etel.ru/~shalcker/AVISubDetector_english.rar :)

Added "Adjust Settings" form where you can see how much "Drop" settings and BlockValue/BlockCount are affecting subtitle detection - and adjust them accordingly using sliders with immediate visual feedback :)

I'll move other settings there too next week :)
Originally posted by LB
On manual when I click "NO SUBTITLE" it still tags it as a subtitle in the txt window, and a jpg is still captured. Do you experience this too?
Hmm... Yes, capture was bug. Should only happen now with "ignore empty" unchecked.

If you press "No Subtitle" at "subtitle change" then it should add '& nbsp;' at current time-position (marking it as begginning of empty space interval and end of previous subtitle). It should do nothing at "Detected"...

hmmm.... unless you're using "controlled empty" option when you can mark "presumably empty" frame as subtitle and then it can be followed by detected frame containing no actual subtitle... you might also need to use "Not changed" if same subtitle is suddenly "detected" for some reason.

Fixed that - now you can use "Not Changed" with "DETECTED" if you're using "Controlled Empty", and '& nbsp;' is added for "No Subtitle" (there is nothing wrong with a few more redudant & nbsp; since they are automatically skipped when saving to srt) :)

1. A previous line button.
Like, say you are doing the manual, and you notice a sub missed. It's somewhat a pain (and costs time) to stop it, then do the jump to frame and try to hit the missed frame exactly. Is there a way you could get some kinda "previous line" button where you simply hit it and go to the previous line. I suppose you could make it go back upon each press, so if the line was missed 3 subs ago, you could just hit the button three times.
That requires some changes in internal subtitle presentation used... SAMI is good format only as long as you use it without "interruption" - once you'll need to "insert" something you'll often have to change one of the following subtitles (especially in case of overlaps) :)
Maybe next week :)


2. Numbered output
Can you let us choose if we want to put a number as the output image filename? Example: 00001, 00002, 00003, 00004, 00005, etc?

Done (turned on by default). Also fixed frame numbering there to be zero-padded. :D

dvd_master
18th January 2004, 21:29
It's working great for all my files, but the one thing I really don't like is that you only get the option to Save when you press 'Stop'. Sometimes I press Pause, and then check to make sure I'm done, then I have to start again and stop just to save it.

Can you add a 'Save Script' box somewhere in the main prog. ??

Thanks.

Shalcker
18th January 2004, 22:16
Originally posted by dvd_master
It's working great for all my files, but the one thing I really don't like is that you only get the option to Save when you press 'Stop'. Sometimes I press Pause, and then check to make sure I'm done, then I have to start again and stop just to save it.

Can you add a 'Save Script' box somewhere in the main prog. ??

Thanks.
It is there from the very beginning of this program... :D

http://animeburg.omake.ru/ASD/interfacex.png

I'm planning to change interface in a next version though... hopefully that will make it a bit more user-friendly :)

Subtitles, "processed files/directories list" and detection settings will be on different pages since you don't usually need to see them all at once (and each of them starts to take a lot of space once you try to make them easier to understand) :)

dvd_master
20th January 2004, 03:39
Ah, I'm an idiot! Sorry for bothering you. It's working real great on R.O.D. The TV.

LB
20th January 2004, 05:27
w00t! Thanks man! You're the freaking best, and so is this program!

By the way, I'm confused on what you said about a previous line button. At the moment this is how I solve it.

1. I hit stop
2. I delete in the txt window the lines up to the line BEFORE the skipped line
3. I type in the frame # from the output jpg filename
4. I press start, and it starts at that frame and continues on

So, I guess I'm confused on why this wouldn't be easy to do with a button? (Btw, forgive my ignorance if I'm totally missing something :p ).

Thanks,
LB

EDIT:

I found a bug in the adjust setting part. When I try to open an AVI file I get a "CLASS NOT REGISTERED" message. I can open the avi fine in the program normally, but I just can't open any avi in the adjust setting part.

I also have a question about "Ignore blocks without color". I set my colors for the subtitles. Then I check this box. But, it seems the accuracy drops a lot when this box is checked. I detect the subtitles a lot better when it's left unchecked... Ideas?

Shalcker
20th January 2004, 15:52
Originally posted by LB
w00t! Thanks man! You're the freaking best, and so is this program!

By the way, I'm confused on what you said about a previous line button. At the moment this is how I solve it.

1. I hit stop
2. I delete in the txt window the lines up to the line BEFORE the skipped line
3. I type in the frame # from the output jpg filename
4. I press start, and it starts at that frame and continues on

So, I guess I'm confused on why this wouldn't be easy to do with a button?
The thing is... progam doesn't track subtitle window. It just "adds-and-forgets" lines there, and has absolutely no clue about it's content other then "there is text, and it will be parsed as SAMI-like subtitles before saving". :)
So to obtain frame number of certain line i have to parse all script in that window, find that line (hardest part), extract time for that line, and then calculate appropriate frame... too much work (and my sami parser is rather slow too - it has too many workarounds) :D

I'll just use string grid for subtitle representation starting from next version, that will be a lot easier.

And i think i'll post link to next version today, once i'll finish polishing some features (hopefully it will only take a few hours). ;)

I found a bug in the adjust setting part. When I try to open an AVI file I get a "CLASS NOT REGISTERED" message. I can open the avi fine in the program normally, but I just can't open any avi in the adjust setting part.
Yes, there is bug. It also had a bit "different" line-detector calculations and one major crash-bug after opening avi. :)

I've already fixed this locally while moving to next version of interface (and some other bugs too). :)

also have a question about "Ignore blocks without color". I set my colors for the subtitles. Then I check this box. But, it seems the accuracy drops a lot when this box is checked. I detect the subtitles a lot better when it's left unchecked... Ideas?
They are probably too "weak". I think you'll be able to see that in next version. I'm trying to improve visualisation. :)

Maybe you can link a little bit of subtitles using [ img ] link or send it to me via e-mail?
Then i can offer you some suggestion about appropriate settings. ;)

I think I should also add "subtitle-outline-other" frame post/pre-processing option (where subtitle color will be replaced with pure white, outline will be replaced with black, and everything else will be replaced with dark-gray so it will not be "too different" from outline). That will probably work a lot better then current implementation of "dominating colors" :D

Shalcker
21st January 2004, 00:39
Since there are some interface changes, i guess it should be next "base" version :)

so, a few quick notes about this version...
- Settings, Subtitles and Avi List/Directories are moved to separate tabs.
- Improved visualisation of settings (they are still not entirely "transparent", but at least now i can describe how desired results should "look"). You can also make preview window there "floating" and see program detection on-fly (like Show Avi before, just a bit better :) )
- String Grid for subtitles (Right mouse button moves you to selected frame when program is paused, Ctrl-Del deletes current row). Find temporarily disabled (i'm too tired at the moment).
... there are also some other changes, but i don't remember them (04:43 here, need to rest a bit) :)

Hopefully there aren't too many new bugs introduced :)

as usual, available at http://web.etel.ru/~shalcker/AVISubDetector_english.rar

dvd_master
24th January 2004, 03:06
The new interface looks great! Everything is less crowded. :D

Great!!

Nimo
24th January 2004, 14:51
First, I want to say Thanks you very much.
Your program is right on target of my problem. While i'm try to write subtitle. one thing that very very painful for me is Timing subtitle. And thanks to your program, now I'm no longer have to set start-stop time manually anymore.

You program is very impress. When I first using it. It's shown a perfect result. Not even one of subtitle escape from your program. Only 1% (about 2-3 dialogue of 300 dialogue) of these subtitle's timing are wrong. Because of a few change of subtitle's dialogue make program recognize it as the same.(Like "Yes" and "Yep") And set the wrong time line. But that's not a problem because I can fix it easily with subtitle workshop.

Thanks again. For your wonderful program

chipzoller
30th January 2004, 14:52
Is this thread still in operation?


I was wondering if you have done a guide in "Doom 9 style" for complete use of this program?



Chip

Shalcker
30th January 2004, 17:18
Originally posted by chipzoller
Is this thread still in operation?
Yes. ;)

I was wondering if you have done a guide in "Doom 9 style" for complete use of this program?
Can you please post some questions that arise when you run current version of my program? Since i'm not sure which questions you want to get answered... :)

Or do you need step-by-step guide with screenshots? :)
To create such guide I think I should first stop adding various features and improve interface a little bit more... Things are finally starting to make sense to me now once I started to _use_ this program for my own fan translation project... So in next version there will be few good additions and changes - like stat-files and "fast" stat-passes (make them once in "automatic" batch mode and get almost instant decisions for manual mode later), PreOCR processing (gathering "subpictures" and color reduction, maybe a bit of image stabilization too), saving of directory settings into registry, LBC/MBC/MED disabled by default (since from looking on graphs LBC is quite weird with low block sizes and makes little sense... and MED tracks scene changes 95% of time and only something around 5% is "true" subtitle change), another "change" threshold added (which tracks subtitle width and horizontal positioning with quite low error rate), and more. :)

chipzoller
30th January 2004, 18:53
Ok, first your program is REALLY promising. I would just like to see it developed a LOT further by starting to improve the UI.

This is my problem:

The AVI has subtitles burned in it. I wish to extract those and preserve the time codes etc. and stick them into the same video but encoded by me. This is necessary because the source that contains the subtitles I wish to rip is not of high enough quality, therefore having the DVD but no worthy subs is a problem which can be remedied by extracting known good subtitles (translations) and putting them in known good video source.

So, I have the DVD of the same video and the correct time codes. But I want to take the English subs out of the AVI and substitute them into the poorly translated DVD to encode an AVI with DVD quality and the good subs.

It just seems your program records the time codes, which is good too, but what if I already have the time codes? I simply need a way to get the subs and put them in the correct time codes so I can feed it into an AVS script and/or fool with it in VobSub.


Chip

aghus
30th January 2004, 19:13
First of all, I'm Spanish and my English isn't very good.

Your program is fabulous, but I want to say something.

1. Why is the need to have an "OPEN AVI" button if we already have de AVI/Project list??? I'm a little confused with this. I think that it would be easier to add them to the list and select the video to work with a double clic o somthing similar.


2. Another thing, how to use correctly the section "separate by subtitle color" and what it do? By the way, in this last version I can't add colors. I only can change the current color.

3. If I start to subtitle(in manual mode or automatic mode), and I press the "STOP/CLOSE" buttons appears de "save to" dialog, but after to close this dialog, the porgram begins again to START automatically or appears an error if I press the Close Program button


Thanks again.

PD. Time to write the post: 1 hour:eek: --> Conlcusion: I don't know English

LB
31st January 2004, 05:57
Just d/led and tested out your latest version. Wanted to mention a couple bugs/etc I noticed.

First, A+ on the new interface and everything. I really love it.

1. If you press "stop", it stops and asks you to save it, but then once you save it, it starts up again. So there is no way to actually get the program to "stop" playing. You are probably already aware of that by now. :p

2. With all the clicking around on the program, it's really easy to dislodge a menu (i.e., make it floating). Can you like make that floating check box be like an on/off feature? I personally don't like to use floating mode, and find that every few clicks I'm making a menu float :D So like, a the box would now like either lock the current scheme, or unlock it to float mode.

3. You have a duplicate crop checkbox. I was also thinking, maybe some of those aren't really necessary. Like, XYZ + XYZ preview. Just my opinion, but I don't think I'd ever run the tool with simply in "preview" mode - I'd always want the tools visible. And yeah, I know that's possible, but it's a hassle to re-set it each time to the way I like it. Maybe a "save as default scheme" option?

4. Finally, you probably have already considered this, but I'll mention it anyway. It sure would be handy to be able to grab the subtitle color from the video, instead of a jpg file. Ya know?



Anyway, thanks a million. With each new config. it's easier and easier to catch subtitles. :D

Shalcker
31st January 2004, 23:19
version 0.5.2.5 available.
http://web.etel.ru/~shalcker/AVISubDetector_english.rar

quick list of some changes
- Stat-Graphs improved
- Block settings visualization improved a bit
- stat-files and stat-passes, both manual and automatic. Basically, idea is that you set up some settings and then run program in automatic mode to gather stats. Then you can "tweak" change thresholds to get best detection settings by looking at stat graphs,
use manual mode using the same stat-files with almost instand "jumps" to subtitle appearance/change point... and a lot of other things without having to analyze video again.
- Optional autoloading/autosaving of settings and stat-files for each processed avi. It is recommended to have both autosaving and autoloading turned on.
- one "base" directory for all autosaved files
- PreOCR subpicture gathering based on video stats (quite good with "full" frame processing) - basically it should cut only part of image that contains subtitle.
- Tray icon (clicking on it either hides or restores program window)
- most settings on project tab are saved to registry now
- R/LMB change threshold added, tracking rightmost and leftmost "average" "subtitle" pixel position in detected lines - sometimes seems to be fairly good in tracking subtitle "shape" too :)

...guess that's all i can remember :)

Originally posted by LB
1. If you press "stop", it stops and asks you to save it, but then once you save it, it starts up again. So there is no way to actually get the program to "stop" playing. You are probably already aware of that by now. :p

Yes. I think it's fixed... :)


2. With all the clicking around on the program, it's really easy to dislodge a menu (i.e., make it floating). Can you like make that floating check box be like an on/off feature? I personally don't like to use floating mode, and find that every few clicks I'm making a menu float :D So like, a the box would now like either lock the current scheme, or unlock it to float mode.
Yes, this is done too. :)

3. You have a duplicate crop checkbox.
One of them disables/enables "crop-frame" in preview and another "hides" crop settings groupbox.

I was also thinking, maybe some of those aren't really necessary. Like, XYZ + XYZ preview. Just my opinion, but I don't think I'd ever run the tool with simply in "preview" mode - I'd always want the tools visible. And yeah, I know that's possible, but it's a hassle to re-set it each time to the way I like it. Maybe a "save as default scheme" option?
I think i don't quite get what do you want here... probably too tired at the moment... :)

I'm planning to add "default" settings file in next version.

4. Finally, you probably have already considered this, but I'll mention it anyway. It sure would be handy to be able to grab the subtitle color from the video, instead of a jpg file.
At present moment you can add dominating colors by (Shift)-clicking on either "main" preview or "crop" preview. They are also finally saved into _and_ loaded from settings files (though there is a minor bug with last "dominating" color having deviation reset to default value on load - that will be fixed in next version)...

Originally posted by aghus
1. Why is the need to have an "OPEN AVI" button if we already have de AVI/Project list??? I'm a little confused with this. I think that it would be easier to add them to the list and select the video to work with a double clic o somthing similar.
Now program automatically adds avi into project list when you use "open avi" with empty project list.

LB
1st February 2004, 03:47
OMG is all I can say. Holy hell man. This current release. My jaw is on the floor... I need to look through it. And the OCR module. I'm gonna flipping drive to your house and hug you. That solves multi-color ocr issues now. WOW... (heh, I'll update later)

EDIT:

Shalcker, you are a GOD. Seems you cleaned up some of the math because the analysis is flawless now. I was going to post some questions I had on the last release, but I don't need to anymore because this one works great! Hah. Anyway, few things I noticed, which you'll probably clean up.

1. Amazing OCR mode. I can't wait to see what the three greyed options do when you get them working. ;) I'm curious though. Is there a way you can make a check-box option, to save this gray matte image, instead of the color image? Doing that would be great! Also, your auto-crop feature in this latest release works soooo well. Can you impliment that with the gray area, so if we save the gray image, it will be auto-cropped too?

2. Noticed slight stability issues in this release. Sometimes the program would hang on reading a divx file. Wouldn't crash, but just stop reading it. I also noticed some selection boxes dissappearing in one of the uses of it.

3. Y-Diff feature. What is this, and why doesn't it work in processing mode? Is it just not working "yet" and soon to be, or you don't want to use it? Because, it appears to highlight the edges of the subtitles flawlessly.

4. Oh, and I noticed the OCR area is a simple matte effect. Do you think basing the block-value analysis off of that, would be better? (not that I'm complaining because the current release is really really good at detecting the subs).

5. And finally, it still doesn't stop when I press stop. :p If I press stop, it asks me to save it, then just restarts playing from frame 0.

6. The "goto" frame button is missing (

7. And, this new auto-crop is really great. But, I like to use scansoft omnipage for my ocr. And, when I pre-process the image in a video editing program to remove colors, it needs a stack of images the same size (x,y). So, is there a way you can still auto-crop the image so that most of the unnecessary parts are erased, but then place a black border around each image so they all come out the same size (maybe the size set by manual-crop)?

Anyway, nothing major. And I must congratulate you. This application just glows with potential, and every release is so much better than the previous. Esp. this past release, such an overhaul, and so worth the wait. Haha, you've given me a reason to check doom every day now.:

chipzoller
1st February 2004, 06:31
I agree...much better. Do you think it is still possible to have the settings and UI a little less complicated?

And are you thinking about implementing saving subs as BMP style? (i.e. VobSub)


Keep up the good work!

LB
1st February 2004, 07:26
Originally posted by chipzoller
And are you thinking about implementing saving subs as BMP style? (i.e. VobSub)

It's already implemented. That's the way you can save images now in the program.

chipzoller
1st February 2004, 15:12
Oh sorry. I haven't used it enough to find that feature. I'll see if I can try it out!

Chip

Shalcker
1st February 2004, 17:16
Originally posted by LB
1. Amazing OCR mode. I can't wait to see what the three greyed options do when you get them working. ;)
Well, the first one is supposed to "preprocess" image into that black-gray-white thing you can see before any tracking algorithm comes into place - and therefore removing most noise and motion in general, though similar colors in actual video are likely to be the problem :D
Second checkbox replaces all colors into white-gray-black (program keeps colors marked as X (ignore) otherwise). Hope you noticed that you can change color "type" by clicking on "T"/"O"/"X" at "color dominators" settings. :)
Third should remove "stray" gray pixels coming between outline and subtitle colors due to antialiasing by replacing them with either black or white :)

I'm curious though. Is there a way you can make a check-box option, to save this gray matte image, instead of the color image? Doing that would be great! Also, your auto-crop feature in this latest release works soooo well. Can you implement that with the gray area, so if we save the gray image, it will be auto-cropped too?

Yes, certainly. That is planned for next version, which i hope to release next week. Since as you can see most of the functions are already there, i just need to move them around a bit and place a few checkboxes as well as maybe adding color information into .lst :)

2. Noticed slight stability issues in this release. Sometimes the program would hang on reading a divx file. Wouldn't crash, but just stop reading it. I also noticed some selection boxes dissappearing in one of the uses of it.
I think i fixed "freeze" problem... still not sure why it appeared in the first place... seems to be quite random and hard to reproduce.

As for checkboxes disappearing i have no clue :D
maybe it's just Windows running out of resources...

3. Y-Diff feature. What is this, and why doesn't it work in processing mode? Is it just not working "yet" and soon to be, or you don't want to use it? Because, it appears to highlight the edges of the subtitles flawlessly.
It also catches a lot more non-subtitle "edges" then necessary (at least in animation), so it does more harm then good in subtitle detection :)
Also to make it useful i need to switch processing from "horizontal-blocks-only" decision to horizontal block processing followed by vertical block processing... and benefits of that are questionable - since you have a lot of edges in horizontal direction for most subtitles and a lot less for each line in vertical direction. Maybe i'll add that, but not in next version... so now "Y-Diff" is there only for reference :)

I may use that for further PreOCR processing though :)

4. Oh, and I noticed the OCR area is a simple matte effect. Do you think basing the block-value analysis off of that, would be better?
You mean tracking those rectangles produced for PreOCR? Maybe.
Or something else? :)

5. And finally, it still doesn't stop when I press stop. :p If I press stop, it asks me to save it, then just restarts playing from frame 0.
Oh... fixed now. :D
The only difference between STOP and PAUSE now should be that STOP performs autosaving and PAUSE just stops.

6. The "goto" frame button is missing
Added.

7. And, this new auto-crop is really great. But, I like to use scansoft omnipage for my ocr. And, when I pre-process the image in a video editing program to remove colors, it needs a stack of images the same size (x,y). So, is there a way you can still auto-crop the image so that most of the unnecessary parts are erased, but then place a black border around each image so they all come out the same size (maybe the size set by manual-crop)?
Yes, sure. :) Added "Use Crop Dimensions" checkbox.
Hopefully you don't mind that they are filled with white instead of black and image is aligned to top-left corner? :)

so... version 0.5.2.6 with these fixes is available at usual location - http://web.etel.ru/~shalcker/AVISubDetector_english.rar

LB
2nd February 2004, 00:52
Hope you noticed that you can change color "type" by clicking on "T"/"O"/"X" at "color dominators" settings. :)
Yes! That’s a very good idea because some subtitles have a slight black outline or what not, and this can be handy to capture.

Yes, certainly. That is planned for next version, which i hope to release next week. Since as you can see most of the functions are already there, i just need to move them around a bit and place a few checkboxes as well as maybe adding color information into .lst :)
And can you save the image as black instead of gray? Because I think that gray would have an impact on the eventual ocr.

You mean tracking those rectangles produced for PreOCR? Maybe.
Or something else? :)
Hmm, I might have answered my own question, but I developed another question in the process. At the moment the Color Domination window is our pre-process view, and its output is 100% based off a subtitle color you chose correct? (i.e., choose the colors, and then the program eliminates any colors not chosen beyond the deviation value). This means, that white/gray image we see is not generated using any tracking or line/block data, right? Well, is there a way you can use the data to eliminate Stray Gray? You probably already have this planned, or maybe it’s already in use. :p I’m not totally sure, but I wanted to ask.

Yes, sure. :) Added "Use Crop Dimensions" checkbox.
Hopefully you don't mind that they are filled with white instead of black and image is aligned to top-left corner? :)
White is fine because during a pre-process in a NLE program to generate a good matte, it will change the white to black anyway. As for image position, let me get back to you on that. I’ll do some tests and see what the results are with the OCR’s ability to handle various locations. Who knows, maybe the upper corner works better. :p

As always, thanks so much for the fixes, and don’t work yourself too hard (although I’m not complaining). And one more thing. I did a little programming in the past, not much though so my skills need a lot of work. What languages were used in making this program because I’m really interested in this area of work, and if I have some free time would like to learn to code these types of analysis programs.

EDIT:

Oh, and by the way. I found a really nice program awhile ago which does exactly what this program does, but it's a vdub filter. I don't need vdub functionality, but I wanted to point it out because the source code is also available at this link, and you might find something useful in it. As for how well it worked, well if I got a good matte, then it would work alright. Not nearly as well as yours, but it was decent. It also has some vobsub functionality in it, so that code can probably be useful to you too. (but, maybe you already knew about it :p )

http://www.xs4all.nl/~vielle/video/sublog.html

chipzoller
4th February 2004, 13:50
I am anxious for you (or LB) to write an idiots guide to AVI subtitle ripping so I can take full advantage of the program! I am not a programmer so using your utility at this stage is a little too difficult for me.

Keep up the good work!

dvd_master
5th February 2004, 05:20
Originally posted by chipzoller
I am anxious for you (or LB) to write an idiots guide to AVI subtitle ripping so I can take full advantage of the program! I am not a programmer so using your utility at this stage is a little too difficult for me.

Keep up the good work!

I thought the Readme file was pretty basic... that a nice layout would be cool.

Anyway, Shlacker.. I think you should start a seperate thread for your great program... this one's getting a little flooded.

LB
5th February 2004, 17:27
Don't update the readme file. Only hardcore users should apply ;p j/king. It's not too hard if you sit down for an hour or two and play with it. Lotta stuff works, some doesn't, and it changes all the time. :p But, you don't need to be a programmer to use the program. You just need some time alone, with a coke or coffee and the program.

LB
7th February 2004, 08:50
Hmm... I'm running into the math problem I had before.

Frame 254 DLC=044 [044] MED=246 [246] RMB=452 [452] LMB=150 [150] MBC=011/041 [041] LBC=000 (000) [000]
Frame 312 DLC=047 [013] MED=257 [040] RMB=451 [040] LMB=152 [008] MBC=012/041 [000] LBC=000 (000) [000]

The first line is the original, and the second is a change falsely detected.

Few questions.

1. DLC (My DLC = 7)
If 1st DLC=44 and 2nd DLC=47, why did it consider this a change since my DLC setting is set to 7? Also, what does the [44] and [13] after them mean?

2. For the rest of the values, what does the [246] vs. [46], [452] vs. [40], etc. mean?

Shalcker
7th February 2004, 09:16
Originally posted by LB
Hmm... I'm running into the math problem I had before.

Frame 254 DLC=044 [044] MED=246 [246] RMB=452 [452] LMB=150 [150] MBC=011/041 [041] LBC=000 (000) [000]
Frame 312 DLC=047 [013] MED=257 [040] RMB=451 [040] LMB=152 [008] MBC=012/041 [000] LBC=000 (000) [000]

The first line is the original, and the second is a change falsely detected.

Few questions.

1. DLC (My DLC = 7)
If 1st DLC=44 and 2nd DLC=47, why did it consider this a change since my DLC setting is set to 7? Also, what does the [44] and [13] after them mean?

2. For the rest of the values, what does the [246] vs. [46], [452] vs. [40], etc. mean?
[xxx] is absolute parameter difference vs previous frame (not the last "accepted" detect/change frame). In first frame it is equal to parameter value since while no subtitle is detected most values remain zero.
Program checks that difference for all "checked" change settings. If any of them is above set limit (just checked code - yes, exactly above, not equal) change is considered detected.

You can probably see noise "spike" there in the stat graph :)

Maybe i should reduce "noise spikes" by applying some kind of lowpass filter to stat data... it's fairly easy, though precision may suffer a bit.

LB
7th February 2004, 09:40
Ahh... I understand... Hmm, is there a way to get the previous frame value too in the stats? It doesn't help much if it's not easily viewable. :(

Shalcker
7th February 2004, 10:02
Originally posted by LB
Ahh... I understand... Hmm, is there a way to get the previous frame value too in the stats? It doesn't help much if it's not easily viewable. :(
There is a separate difference graph, showing exactly that difference vs threshold.
Obviously if you have absolute difference of 40 previous frame had either 40 more or 40 less. Check the graph to see which is the case :)

And i don't think i should write them in stat-files... they are rather huge as it is.

LB
7th February 2004, 10:08
Originally posted by Shalcker
There is a separate difference graph, showing exactly that difference vs threshold.
Obviously if you have absolute difference of 40 previous frame had either 40 more or 40 less. Check the graph to see which is the case :)

And i don't think i should write them in stat-files... they are rather huge as it is.

Ahh, I gotcha. I haven't been using the stats graph as much as I should. :D

I was also thinking, what do you think about a crop-preview on the pre OCR page? It's sometimes hard to determine if the chosen settings are detecting the correct changes, so to be able to view the screen caps side-by-side the crop view, would really help. What do you think?

And by the way, the Left and Right most block tracking is AMAZING. Thanks so much for it.

Shalcker
7th February 2004, 10:25
Originally posted by LB
I was also thinking, what do you think about a crop-preview on the pre OCR page? It's sometimes hard to determine if the chosen settings are detecting the correct changes, so to be able to view the screen caps side-by-side the crop view, would really help. What do you think?
Check main program menu - "Preview -> Fixed" (it's slow though... perhaps i should turn off that "color dominator" picture creation - takes too big hit on perfomance) :)

LB
7th February 2004, 10:42
All these hidden undocumented features lol. Great stuff. As for the color domination, maybe just have it selectable? It doesn't really do anything at the moment, but I presume once you get it working, people that want to use it (like me!) will want it selected :D

Also, going back to the basics for a little bit, since the new GUI change I guess we really haven't got an explanation for a few of the features. In the settings tab, in the "blocks" window, my size is set to 16. What does that mean though? Because, as I change it, the vertical lines increase and decrease, yet I don't have 16 of them, nor 32 (which was my other guess). I'm trying to read your old readme file and can't determine in this new interface what a green bar in-between two lines is. See, I had a false subtitle detection (not change, but merely a detection). And, the DLC=10 for that frame. Yet, I only had 1 stack of green, in-between two lines. So, I'm trying to find out what setting I need to change so that the program looks for connected green bars "across" the lines, not merely vertically in-between the lines.

Ex., (G=Green)

What setting requires a relationship between them like:

|G|G|

so stuff like:

|G|
|G|
|G|

isn't flagged as a subtitle? (Hehe, I thought I had understood the program and the settings, until I got this detection. :p ) And if you want a screencap of the detection + settings, I can email it to you.

Shalcker
7th February 2004, 10:55
Originally posted by LB
As for the color domination, maybe just have it selectable?Sure.

Also, going back to the basics for a little bit, since the new GUI change I guess we really haven't got an explanation for a few of the features. In the settings tab, in the "blocks" window, my size is set to 16. What does that mean though? Because, as I change it, the vertical lines increase and decrease, yet I don't have 16 of them, nor 32 (which was my other guess).That is block size (horizontal). 16x1 pixels by default.

I'm trying to read your old readme file and can't determine in this new interface what a green bar in-between two lines is. See, I had a false subtitle detection (not change, but merely a detection). And, the DLC=10 for that frame. Yet, I only had 1 stack of green, in-between two lines. So, I'm trying to find out what setting I need to change so that the program looks for connected green bars "across" the lines, not merely vertically in-between the lines.

Ex., (G=Green)
|G|G|

What setting requires a relationship between them, so stuff like

|G|
|G|
|G|

isn't flagged as a subtitle?
If it's green it means this line passed blocklimit.
Basically, once it starts getting "yellow" (from left to right) it starts gaining "Block Count". Once it reaches limit it turns green and that line is considered "detected" at that point. So to prevent detection you should change settings in a way that will prevent these lines from turning green... Changing block size should probably help :)

Vertical relation between blocks has no influence - once any line gets even a single green block it is "detected", and then only this line "status" is considered when counting DLC.

LB
7th February 2004, 11:20
Hey, (I swear this is the last post tonight, haha, you've been so nice in responding tonight it's great!)

I finally understand you about the 16x1. It's what's between every two lines. But let me see if I understand how linecount is computed.

Line count does not care about this the horizontal correlation between this: |G|G| and counts it as two lines, right?

And linecount sees this:
|G|G| as four lines right?
|G|G|

So, is there a way we can have a setting to require like a percentage vertical lines and percentage horizontal lines to be connected, for subtitle detection? Because as I see it now, when the program sees enough "lines" then it detects a subtitle, yet no correlation between the vertical and horizontal lines is used... (hope I'm not totally wrong here). And the below picture is just a cheap representation of how (If I'm right about this) you could have a subtitle detected here, when in reality there is none.

| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G| | | | | | | | | | | | | | | | |G| | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |G| | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |G| | | | | | |

-----------------------------------------------------------------

Second and final question. For change detection, can you create a % change box? Let me paste an example of a skipped change below:

Settings: DLC=10; L/RMB=10; MED=10; MBC=1

DLC=15 [14]
MED=404 [16]
RMB=480 [6]
LMB=116 [13]
MBC=2/50 [4]

Now, it didn't detect the change at this part, but this was all due to the RMB being 4 shy. Every other value exceeded the required amount. So that got me thinking, it really stinks to have a change skipped because one tiny value kept it down. So, maybe if we can look at how much the overall "selected" values were met, and if the "met" percentage exceeds the percentage in the box, then we get a valid change. Example:

DLC -> 14/10 = 1.4
LMB -> 13/10 = 1.3
RMB -> 6/10 = .6
MBC -> 4/1 = 4

[1 + 1 + .6 + 1] / 4 * 100 = 90%

Now, I was debating on whether or not to use the true numbers, or have a cutoff at 100% (i.e., 1). I thought that having the cutoff would be better because in this case MBC alone would be at 400%, whereas the others are in the 120% range. I dunno, you decide if a cutoff at 1 or using the true value is better. But do you see what it does? It says, okay, 90% of chosen values were met - compare that to the input percentage (lets pretend I chose 85%) - and thus a change is detected.

So what do you think? I just believe that looking at all the values together, instead of merely requiring a "pass" for each one, can sometimes detect a change that slips through, like the one in this case, due to a value that didn't quite make it :p

Shalcker
7th February 2004, 12:13
Originally posted by LB
Hey, (I swear this is the last post tonight, haha, you've been so nice in responding tonight it's great!)

I finally understand you about the 16x1. It's what's between every two lines. But let me see if I understand how linecount is computed.

Line count does not care about this the horizontal correlation between this:
|G|G|
and counts it as two lines, right?

Line count also sees this:
|G|G|
|G|G|
as four lines right?

no, that's one and two lines respectively.
Amount of green blocks in a single line doesn't matter. As long as there is one or more, it is detected, but it is still single line which must get another detected line above to be "counted".

EDIT: actually... examples are one and two detected lines and zero and one "line count" (since to get +1 in linecount you must have two detected lines in a row) :)

So, is there a way we can have a setting to require like a percentage vertical lines and percentage horizontal lines to be connected, for subtitle detection?
Can you give an example of such decision? :)

Btw, there is no vertical lines in current implementation :)
Adding them is equal to adding that Y-diff you noted before :)

Because as I see it now, when the program sees enough "lines" then it detects a subtitle, yet no correlation between the vertical and horizontal lines is used... (hope I'm not totally wrong here). And the below picture is just a cheap representation of how (If I'm right about this) you could have a subtitle detected here, when in reality there is none.

| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | |G|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|G| | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |G| | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |G| | | | | | |

Correct, though unlikely. This example is image with DLC=4 (note that two Greens in the middle are in the same line, and top line is not counted since there is no detected line above) :)

Also remember that you have to get at least "Count - 1" yellow blocks to get first green one (unless "yellow" block happens to hit CenterWeight) :)
This example will also get equal values for RMB/LMB (quite unusual thing for most subtitles) :)

Second question, and last for today, I swear ;p
I got a detection on this line:

Frame 7851 DLC=023 [021] MED=120 [010] RMB=486 [158] LMB=096 [080] MBC=006/009 [001] LBC=000 (000) [000]

Yet, I have enabled MBC, and set at 15. So...?

And the original line had 0's in all the [xx] but I went to the stat window and filled in the correct values. Maybe for each detected line you could have the "OTHER" column insert change according to the previous frame? Because at the moment each initial detection is [00].
When checking if any subtitle is present it checks only DLC (with limit named as "Line Count"). Everything else is checked only for subtitle change tracking (and DLC has separate threshold there), and any difference value above threshold triggers as subtitle change. Did you had any other trackers checked? :)

and... i don't understand that sentence before last one :)
Which "OTHER" column? Where? What should be there? :)

LBC/MBC also has a little lag coming from older implementation (and i don't think they are of any use so i didn't fixed that yet) :)

LB
7th February 2004, 12:20
Originally posted by Shalcker
Did you had any other trackers checked? :)

and... i don't understand that sentence before last one :)
Which "OTHER" column? Where? What should be there? :)

LBC/MBC also has a little lag coming from older implementation (and i don't think they are of any use so i didn't fixed that yet) :)

Seems you replied, while I was editing my post :p
I mis-stated "detection" and should have said "changed" in the second question. My bad. I had other change selections enabled, and I found that one of them was simply 1 shy of my threshold. :( So, I re-edited my post for question #2, and it's a lot cleaner now and fully illustrates the issue (on a different frame). But it proposes what I think is a good solution. Check it out and tell me what yout think... But check it out later because you've answered to many questions tonight :D

And as for your reply to Question 1 - your reply about the graph REALLY answered some of my questions. Maybe I'm going to have to create a .faq out of all the answered questions in this thread for you, so that new people will be able to use this progam well. But some of your responses to Question 1 were really interesting... and simply left me with more questions (ex., why |g|g|g|g| should only equal 1, instead of giving it more weight in the calculation)... but, I'll save that for tomorrow. :D

Shalcker
8th February 2004, 05:54
Originally posted by LB
Second and final question. For change detection, can you create a % change box? Let me paste an example of a skipped change below:

Settings: DLC=10; L/RMB=10; MED=10; MBC=1

DLC=15 [14]
MED=404 [16]
RMB=480 [6]
LMB=116 [13]
MBC=2/50 [4]

Now, it didn't detect the change at this part, but this was all due to the RMB being 4 shy. Every other value exceeded the required amount.
I'll repeat - any value exceeding threshold counts as change. You don't need all of them exceeding threshold, any one will do. R/LMB have common threshold but they are still separate values. This frame will be detected as change unless there was "detected" or "changed" frame within "skip change" range before this frame (marked as CHANGE SKIPPED in status). BTW at the moment in stat mode that range is increased each time any change hits that range - so if you had a detected subtitle then "change" 4 frames later then another change 4 frames later it will skip it while in "full" mode it will mark second one (8 frames after detection) as change. Guess i should make it optional behavior for both modes.

As for having "weights" for each change tracker... i've seen too many cases where only one parameter changed at certain subtitle change, so i don't think that will help much :)

LB
8th February 2004, 07:09
Hmm, okay, I guess I missed the fact that it only takes (1) to go over the threshold for a change to be detected. Sorry :( But, I don't use "Skip Change if Distance is..." I always have it unchecked. I re-ran the program and here is the frame layout:

Settings: DLC=10; L/RMB=10; MED=10; MBC=1; Skip Change = Unchecked

Frame 4165 (Nothing)
DLC=000 [000]
MED=000 [000]
RMB=000 [000]
LMB=000 [000]
MBC=000 [000]

Frame 4166 (Detection)
DLC=014 [014]
MED=363 [363]
RMB=466 [466]
LMB=144 [144]
MBC=010/046 [046]

Frame 4167 (Change)
DLC=029 [015]
MED=384 [021]
RMB=475 [009]
LMB=129 [015]
MBC=011/046 [000]

It sees the change at 4167 I think, because I see *'s on each side of the CHANGED, but it doesn't accept it as a CHANGE. Any ideas? And again, this is with the Skip unchecked. :confused:

Shalcker
8th February 2004, 07:15
Originally posted by LB
It sees the change at 4167 I think, because I see *'s on each side of the CHANGED, but it doesn't accept it as a CHANGE. Any ideas? And again, this is with the Skip unchecked. :confused:
That's bug - skip checkbox state is ignored at the moment (fixing that right now) :)
Just set skip range to 0 if you want it to be ignored.

LB
8th February 2004, 09:19
Haha, I thought I was going crazy for a minute. Cool. No hurry or what not. And 0 doesn't work either, even when it is checked. :( But again, no hurry, just wanted to point it out.

Anyway, thanks again for everything as everyone here I know loves your work!

mitsurugi
23rd February 2004, 03:52
Is it just me or is the latest version EXTREMELY slow? .4.9.7 i think is the last version I used and I got better than realtime speed on it. With the .5.2.7 its 5 or 10fps it seems.

A few other questions I have:


It seems to save the timing but won't rip the subtitles directly. It puts them into .bmp's. What do you do with them from there?

Ideally I want to end up with a script that has the right times and text.

Can anyone make a tutorial of sorts for this program? Perhaps a few screenshots detailing the process from avisubdetector>OCR program>whatever is next>authoring the finished product into a dvd.

Shalcker
23rd February 2004, 04:49
Originally posted by mitsurugi
Is it just me or is the latest version EXTREMELY slow? .4.9.7 i think is the last version I used and I got better than realtime speed on it. With the .5.2.7 its 5 or 10fps it seems.

Wasn't last version released 0.5.2.6.5? :D
I don't think i uploaded .5.2.7 yet...

Turn off preview and switch to any "non-graphic" tabsheet (like Project, Subs or PreOCR) and you'll have your speed back. :)

It seems to save the timing but won't rip the subtitles directly. It puts them into .bmp's. What do you do with them from there?
I actually use Manual mode and type subs on my own :D

Next version will have an option of saving them as 4-color bitmaps too.

LB
23rd February 2004, 05:00
You're alive. :D :D


Can't wait for the next version! (Esp. with the skip change box fixed, hehe)

mitsurugi
23rd February 2004, 05:57
What I mean is have a built in OCR so when it says "sub detected" it not only logs the time but recognizes the text aswell. Automating the whole process.

Or if you don't want to write a OCR engine into the program, which would probably be alot of work. how about some sort of scripting so it would dump bmp's and then a OCR program would batch process them.

I ask this not because i'm lazy, but the way things are now its just time consuming. To do 1 episode takes 2x as long or more than its running length. Ideally you want to be able to set it to auto.

Maybe have the process something like this:

load say a 26episode series as projects.

process ep #1, write timings to script, and dump detected subs as bmp's while writing a batch file for them to be exported to omnipage or something like it.

process dumped bmp batch file in OCR program. Then import the OCR'd text into the already timed script.

Then it moves onto ep #2.

Either way doing something like that would streamline the whole process. Having the program able to function on its own to just get the timings. But also having a system like dvd2svcd where it rely's on outside programs and automates the process.

If this were to happen I can see avisubdetector becoming a VERY useful tool:)

LB
23rd February 2004, 07:10
What I mean is have a built in OCR so when it says "sub detected" it not only logs the time but recognizes the text aswell. Automating the whole process.

Or if you don't want to write a OCR engine into the program, which would probably be alot of work. how about some sort of scripting so it would dump bmp's and then a OCR program would batch process them.

I ask this not because i'm lazy, but the way things are now its just time consuming. To do 1 episode takes 2x as long or more than its running length. Ideally you want to be able to set it to auto.

Maybe have the process something like this:

load say a 26episode series as projects.

process ep #1, write timings to script, and dump detected subs as bmp's while writing a batch file for them to be exported to omnipage or something like it.

process dumped bmp batch file in OCR program. Then import the OCR'd text into the already timed script.

Then it moves onto ep #2.

Either way doing something like that would streamline the whole process. Having the program able to function on its own to just get the timings. But also having a system like dvd2svcd where it rely's on outside programs and automates the process.

If this were to happen I can see avisubdetector becoming a VERY useful tool.

1. I think you underestimate how hard it is to script an OCR program. And even if he did write a "good" one... well no, he probably couldn't (no offense shalcker). Quick compare of ABBY and Omipage: ABBY is pure crap when it comes to OCR'ing subtitles with even a perfect matte. Downright horrible. As for Omnipage, it's pretty decent. But the thing is, consider who makes them? They are professional products, which go for about $500+ each; and there aren't a lot of OCR programs, those are basically it. So that alone should help explain the difficulty in creating an "intelligent" OCR program, something which SubRip is not. Comparing some more, have you ever tried to OCR something like this with an external OCR program? Give it a shot. The program doesn't recognize basically anything because of all the crap on the screen. Yes, and I am talking about after applying a Matte to the text. A good matte is something which companies pay thousands of dollars for, and which is not something easily codeable. Now, even with the simple color drop routine he has working, you still get a lot of garbage. So give ocr'ing those bmp's a shot.

2. Problem with a batch program is that, again, this program will never be able to go from "SubtitleDetector ---straight---> OCR". The matte just is not good enough, and it's not something easily codeable. Maybe for REALLY easily detectable subtitles (i.e., bright neon blue), but other than that, I wouldn't get your hopes up on any batch process giving you the results in your OCR program you desire.

But as it stands now, all you ask for is easily done already.
a. Export the bmps and the ssa using SubDetector
b. Import the bmps and apply a matte in NLE
c. Export to a saved jpg sequence in NLE
d. Import jpgs into OCR program
e. Save OCR results to TXT file
f. Import SSA in MS Excell
g. Paste OCR results into MS Excell
f. Export to SSA

That's all there is to it. Oh, and as for the whole batch idea again, another reason it won't work is that even with the BEST matte you can find, resulting in what looks like the most ocr'able jpg images, you will still get crap that the OCR program can't recognize, and will be prompted to "fix" the subs. It's much faster to "fix" them inside the OCR program then attempt to find which stuff the OCR program had "trouble" with outside of the OCR program. So, even as it stands, using the best-of-the-best tools (assuming you can/got your hands on them) you can easily type (in manual mode) the entire show, resulting in perfect subtitles, quite a lot faster than you can do the OCR process.

EDIT: I'll edit this thread and say that his matte algorithm is really coming along nicely. I don't know if he will be able to write an OCR program for it because of the complexity of an intelligent one, but at least I can see that down the road, the use of an external NLE program to apply a matte may be unnecessary. :D

LB
1st March 2004, 03:26
I don't want to sound impatient, but any eta on the next release? I'm so looking forward to a working "skip change if distance is" option, since all I want to do is be able to disable it, which can't be done now :(

Shalcker
1st March 2004, 04:32
Originally posted by LB
I don't want to sound impatient, but any eta on the next release? I'm so looking forward to a working "skip change if distance is" option, since all I want to do is be able to disable it, which can't be done now :(
This week. Sorry for delay - i was planning to release it sooner, but barely had any time to code due to some problems at work. :(

Shalcker
7th March 2004, 08:14
Uploaded 0.5.2.7 to usual location (http://web.etel.ru/~shalcker/AVISubDetector_english.rar)...

some features are still missing (like different pre/postprocessing modes and saving of postprocessed output), hopefully i'll be able to add them in a next few days...

Color replacement preprocessing mode was changed a bit to make it easier to visualise settings (on separate "Color" tab). Now there are three separate thresholds (Red, Green and Blue).

LB
7th March 2004, 09:44
Can't wait to wake up and test it out! Thanks again!! :D :D

LB
8th March 2004, 05:56
Few questions about this superb release :D

1. I found that you linked the colors in the pre-process window to the colors in the "seperation by subtitle color" window. Nice stuff! Only question about this is I think there is a bug in the deviation boxes. If I try to "change" the deviation from say 100 to 40, on an "existing" color, it doesn't affect (or update) the pre-process window.

2. Also can you implement a feature to have different Def. Deviations for each color?

3. The "use crop-dimensions" box that I requested a long time ago. Can you change it to use a black background instead of a white one?

4. Your pre-processing is really superb for elimination of background noise. I would like to use it as a "base" for my external pre-processing in a NLE program. But to do that, I need an identical non-preprocessed frame. So, can you create an option to save two bmps simultaneously for each preOCR frame - [i] pre-processed bmp; and [ii] non-preprocessed bmp?

5. What does the "Show Postprocessed" button do?

Other than that, I'll keep using it and report what I find. :D

Shalcker
8th March 2004, 17:19
Originally posted by LB
Few questions about this superb release :D

1. I found that you linked the colors in the pre-process window to the colors in the "seperation by subtitle color" window. Nice stuff! Only question about this is I think there is a bug in the deviation boxes. If I try to "change" the deviation from say 100 to 40, on an "existing" color, it doesn't affect (or update) the pre-process window.
That's because they are using another R/G/B thresholds only seen at "Color" tab. I will add them to "Settings" page in text form too :)

2. Also can you implement a feature to have different Def. Deviations for each color?
Each color has separate thresholds. "Def. Deviation" is only used for new colors as their starting deviation and for "Ignore/Assign/Multiply". Actually i'm thinking about removing "Def. Deviation" entirely and using R/G/B thresholds (separate for each color) everywhere to make it more consistent...

I also think "color-in-block" processing (used for "Ignore/Assign/Multiply") has too many flaws and it is better to preprocess picture replacing "bad" colors (something like dark-green with black outline) and then use generic algorithm on result :)

3. The "use crop-dimensions" box that I requested a long time ago. Can you change it to use a black background instead of a white one?
Sure. I'll make it selectable :)

4. Your pre-processing is really superb for elimination of background noise. I would like to use it as a "base" for my external pre-processing in a NLE program. But to do that, I need an identical non-preprocessed frame. So, can you create an option to save two bmps simultaneously for each preOCR frame - [i] pre-processed bmp; and [ii] non-preprocessed bmp?
Yes, that's intended mode of operation for future :)

5. What does the "Show Postprocessed" button do?
You should set colors then turn off preprocessing and capture a few subtitles then press that button to see a result :)

Current Postprocessing eliminates every non-subtitle color, then eliminates single-pixel dots of subtitle color, and then "grows" antialiasing and outline around remaining pixels. :)

LB
9th March 2004, 00:23
Originally posted by Shalcker
Current Postprocessing eliminates every non-subtitle color, then eliminates single-pixel dots of subtitle color, and then "grows" antialiasing and outline around remaining pixels. :)

Wow. I can see where you are going with that. That's going to be some good "noise" removal. :D

Only other thing I could come up with was, why does the ouput bmp when pre-processing is enabled look "lighter" (i.e., different) than what appears in the lines preview box? Kind of hard to determine what the result is going to look like, but this is probably just because it's still beta. Anyway, keep up the great work!

EDIT: Two issues I found.

FIRST
Settings: Trackin -> DLC=5; L/RMB=30; Skip Change = Unchecked

Frame 6281 (Subtitle)
DLC=024 [000]
RMB=473 [000]
LMB=142 [000]

Frame 6282 (Change)
DLC=017 [007]
RMB=511 [038]
LMB=061 [081]

Subtitle is detected, but the change is not. What do you think?


SECOND
Settings -> BV=200; BS=16; BC=3; LC=5; CW=2
Tracking -> DLC=5; L/RMB=40; MED=40; Skip Change = Unchecked

Frame 2963 (Subtitle)
DLC=020 [020]
MED=270 [270]
RMB=495 [495]
LMB=120 [120]

Frame 3052 (Change)
DLC=027 [003]
MED=188 [048]
RMB=443 [027]
LMB=163 [046]

So here too it's not seeing a change... I also tried enabling Skip and setting it to 0, but that didn't detect it either. Thoughts?

THIRD
(just for kicks I went to the extreme and tried this).

Settings -> BV=200; BS=16; BC=3; LC=5; CW=2
Tracking -> DLC=1; L/RMB=1; MED=1; Skip Change = 0

Frame 3177 (Subtitle)
DLC=019 [019]
MED=204 [204]
RMB=459 [459]
LMB=164 [164]

Frame 3259 (Change)
DLC=022 [003]
MED=295 [080]
RMB=536 [074]
LMB=072 [088]

Hehe, with the trackings all set to 1... I dunno :p But still no change caught.

EDIT, EDIT:
Found another issue, this one is somewhat bigger :p
The number of lines output in the SSA file, is not equal to the number of .bmps generated. In one instance, I had a total of 236 SSA lines, whereas I only got 224 BMPs generated... It's a pretty consistant issue, so I don't think you'll need any samples from me. But if you do, I can post some.

Shalcker
9th March 2004, 15:29
Originally posted by LB
Only other thing I could come up with was, why does the ouput bmp when pre-processing is enabled look "lighter" (i.e., different) than what appears in the lines preview box? Kind of hard to determine what the result is going to look like
Hmmm... forgotten to switch "PreProcessing" proc for saved bitmaps. Should be identical in next version. :)


EDIT: Two issues I found.
FIRST
Settings: Trackin -> DLC=5; L/RMB=30; Skip Change = Unchecked
Frame 6281 (Subtitle)
Frame 6282 (Change)
Subtitle is detected, but the change is not. What do you think?
SECOND
Settings -> BV=200; BS=16; BC=3; LC=5; CW=2
Tracking -> DLC=5; L/RMB=40; MED=40; Skip Change = Unchecked
Frame 2963 (Subtitle)
Frame 3052 (Change)
So here too it's not seeing a change... I also tried enabling Skip and setting it to 0, but that didn't detect it either. Thoughts?
THIRD
(just for kicks I went to the extreme and tried this).
Settings -> BV=200; BS=16; BC=3; LC=5; CW=2
Tracking -> DLC=1; L/RMB=1; MED=1; Skip Change = 0
Frame 3177 (Subtitle)
Frame 3259 (Change)
Hehe, with the trackings all set to 1... I dunno :p But still no change caught.[/b]
Can't reproduce this... tried extreme settings, disabled "Skip Change", and used a rather bad clip - it got me around 1600 "hits" with lots of one-frame changes for 3000 frames, each skip completely true to setting. BTW, lowest tracking value is 0, not 1 :)

Did program skipped these points in both "stat" and "full" modes or only in one of them?

Can you send me resulting stat and settings files? :)

EDIT, EDIT:Found another issue, this one is somewhat bigger :p
The number of lines output in the SSA file, is not equal to the number of .bmps generated. In one instance, I had a total of 236 SSA lines, whereas I only got 224 BMPs generated... It's a pretty consistant issue, so I don't think you'll need any samples from me. But if you do, I can post some.
Well, that's one of undocumented effects... When program gathers "bounding rects" for further processing it "skips" all rects with height below "Line Count". And it may happen that subtitle is "detected" by summing up several 2-3-liners, for example, yet there is no bounding rect and therefore no bitmap to save... :)
Guess I should make it optional.

LB
9th March 2004, 18:27
About the SSA issue, well I don't know if I'd even make it optional, because I'd assume a user would always want the ssa to equal the bmps, otherwise the SSA is pretty useless, right? I dunno, but having an option for it would make me just as happy, as I can't do much with it at the moment. :p

As for the other issue, I just found something very interesting out. Seems that I get different TOTALLY different results (generated bmp files) when the preview{crop} is open compared to when preview is turned off. Using a setting of all 1's like described, the upper-right status indicator would always say "changed" but never capture a bmp as often as we would think, when preview{crop} is enabled. But when I disable it, man o man, hundreds of shots are captured at those settings. So, let me do some more tests to find out what's going on, but try enabling preview{crop} and view it while the bmps are being captured, I think you'll see some interesting results :p And it looks like this may be the reason for the aforementioned bug.

EDIT: I just checked, and this is exactly the cause of those changes being skipped. So I guess for the time being I'll close the preview box whenever I run it. Tell me if you can experience the same thing.

veverica
29th March 2004, 13:01
hi,
I saw a strong debate going on about OCR from AVI. I came onto this idea about two years ago but as not a c++ specialist I've sent a post onto some forums about it, but nobody replyed. So I started to dig into the problem myself and quickly realised how difficoult it is to perform an OCR. So i've focuesd mainly on subtitles detection within avi.

After discovering VirtualDub filters and Standard Filter Developing kit I didn't have any other option that to start chewing this c++ routines etc. After almoast a year of slow work (you know family, lack of time, work, leisure he,he,) first results came out, namely, I could detect the subtitle and frame it. The principle is to detect a string of letters on the same height on the screen and frame them (if no subs is detected, the frame gets black)

Soon after that the SubLog filter appeared that captures subs into vob file. Combining mine filter detecting subs and SubLog I already could get first resulst ripping several tv-rips and producings VOBs. I ripped VOBs with SubRip and got quite decent results; the main tweak was timing. The subs were either too late or too short, so manual correction in Subtitles Translator had to be applied. The whole movie therefore took around 6+ hours to get the subs.

But in late 2003 the source code for SubLog has been released (thanks Alain) and I incorporated it into my filter now producing perfect timings. The bigger part now is work in SubRip. I still have to make some little codings and testing. If somebody is interested, warmly wellcome.

How does it operate:
1.) Virtual dub
- threshold filter to get b/w screen (for subs with black box around them) or levels filter (for subs with no black box)
- PodPis filter (mine)

and run (the result is file.idx and file.sub), estimated time: movie lenght

2.) Due to an unknow bug in Vob-format coding routine the file.idx has to be opened and saved with Subresync
estimated time: 15 sec

3.) Rip with SubRip, estimated time: movie lenght+*1.5, OCR sensibilty 970, this is the most time consuming part

4.) Spelling with your favorite spelling checker, estimated time: 10 min

5.) Checking against original to see if all subs are there :) (I use Subtitle Translator with tripple speed)

and the sub is here, huh

well, I had to put that down on the paper, it lay to hard on my heart, he, he

if someone interested just send some reply or pm

have a nice day

p.s. Today I'm gonna test this AviSubDetector how does it perform

LB
31st March 2004, 01:10
Well, I'll give you the lowdown on Avisubdetector.

1. There is basically no documentation, and what documentation there is, is very outdated, so you must simply "play" with stuff to figure out what it does, or read these forums

2. With the "correct" settings, you can rip flawless "timings" for each subtitle in ANY avi file; so in under 5 minutes, the program detects 99% of every subtitle in a file, and saves the start+end time to a format of your choosing - ex., ssa

3. Great option for auto-bmp generation of cropped detected subtitles. These bmps can be used for external OCR (but at the moment there is a pretty big bug which makes the # of bmps != # of captured timecodes; hopefully a release will happen soon which fixes this)

4. Matte generation is somewhat functional, but it will be a few more releases until we see something that is truly beneficial

That's about it ;) Lotta cool features in this ever expanding program. And just to compare sublog, I've tried that a good bit, but this does everything that does, plus a whole lot more. I might add too that the accuracy of this program v. sublog is a lot greater. If you pick the right settings, then 99% of all subs can be captured along with dead-accurate start+end times. (sublog was more like 75% for me). :D :D

Shalcker
1st April 2004, 05:33
Uploaded to usual location (was planning to do that yesterday but forgotten to copy changed sources from work) :)

http://web.etel.ru/~shalcker/AVISubDetector_english.rar
http://web.etel.ru/~shalcker/AVISubDetector_english.zip
Added zip archive for those having troubles downloading rar
(zip should not get downloaded as plain/text) :)

Also added help.htm pointing to this thread (hopefully this will provide more feedback) :D

veverica
2nd April 2004, 21:27
Hey Shalcker, have you think about saving bmps into idx/vob structure. The code is rather simple and availiable (part of SubLog filter, Alain Vielle). Perhaps you could integrate it, and then ocr is just a step away using SubRip. What you should do is to convert it to b/w.

Shalcker
3rd April 2004, 13:28
Originally posted by veverica
Hey Shalcker, have you think about saving bmps into idx/vob structure. The code is rather simple and availiable (part of SubLog filter, Alain Vielle). Perhaps you could integrate it, and then ocr is just a step away using SubRip. What you should do is to convert it to b/w.
Conversion to B/W is unecessary since there are four available colors for each subtitle in sub/idx... colorspace reduction to that four colors will be sufficient i think (and easy) :)

Yes, certainly I was thinking about that... and even started porting that routine to Delphi (language used to create AviSubDetector), but got distracted and didn't finished yet :D ..and it was kind of "tied" into internal structure of that plugin, was a bit hard to understand and didn't even compiled at my PC for some reason :)

Still, i think it will be there somewhere around 0.5.3 ... hopefully soon :)

LB
4th April 2004, 07:05
Sorry I haven't had time to review your latest release :( I'm going to be pretty slammed with work for the next month (until second week in may) but after that, I'll pick it apart as usualy hehe. As always, keep up the great work!

LB
5th April 2004, 08:07
I couldn't resist trying it out this weekend :p

Regarding the implementation of the new BMP = # SSA lines. It's probably not a bug, but just a result of the early beta, but it seems no "changes" are implemented for that option, and also the timecode in the resulting SSA has each line running-together. So line2 starts at the same time line1 ends, line3 starts the same time line2 ends, etc etc. For the entire script.

Also a suggestion which goes to increasing the accuracy of "change" detection. When I look at the pre-process window, if I tweak the settings correctly, I can get a fairly good matte. With a good matte using the pre-process option, we can highlight the subs in black pretty accurately, and the rest of the image is set to white.

So, I was wondering, what would happen if we added a "change" setting which a user would input a percentage value, say 4%. The program would then calculate the percentage white v. black on the image (resulting from pre-processing) and then compare it to the next frame's white v. black percentage. And if the to percentages differed by more than our user defined value (i.e., 4%) then a change would be detected.

Example:

Frame 5001 - Using Pre-Process, results in:
13% of image black
Frame 5002 - Using Pre-Process, results in:
18% of image black

Difference = 5% so change detected since larger than our set 4%

Also, maybe to increase accuracy, you know that Y-DIFF option you have that outlines the subtitles, maybe it would be possible to use the features of that to generate "outlines" around the subs, and then use the outlines to apply a form of a "paint-bucket" fill to the subs, so the black of the subs could be increased (thus increasing accuracy) of this black % detection method, without having to increase the deviation value.

Well these were just some random thoughts I had that I wanted to pass by you and see what you though. Thanks again!

veverica
6th May 2004, 10:09
Originally posted by Shalcker
Conversion to B/W is unecessary since there are four available colors for each subtitle in sub/idx... colorspace reduction to that four colors will be sufficient i think (and easy) :)

Yes, certainly I was thinking about that... and even started porting that routine to Delphi (language used to create AviSubDetector), but got distracted and didn't finished yet :D ..and it was kind of "tied" into internal structure of that plugin, was a bit hard to understand and didn't even compiled at my PC for some reason :)

Still, i think it will be there somewhere around 0.5.3 ... hopefully soon :)

Hey, if you need some help with this internal structure just say. I incorporated this source code into VirtualDub filter and know a bit about this branching.
Oh, and a small fix has been discovered, I have the source.

promitheas
15th May 2004, 09:18
Ok guys,
How are you everyone?
It's been a long time i am doing the same job with you, i mean extract subs from movies to implement them in a Dvd but i use tricks of my own since i am not still able to use the Software (refering to AviSubDetector).
Don't you think that we are in desperate need of a good "How to" guide?
Shalker, do something pls if the program is going to be useful for the community and not for some guys who have a master in Video-Picture stuff.
Take care.

LB
16th May 2004, 05:57
Originally posted by promitheas
Ok guys,
How are you everyone?
It's been a long time i am doing the same job with you, i mean extract subs from movies to implement them in a Dvd but i use tricks of my own since i am not still able to use the Software (refering to AviSubDetector).
Don't you think that we are in desperate need of a good "How to" guide?
Shalker, do something pls if the program is going to be useful for the community and not for some guys who have a master in Video-Picture stuff.
Take care.

The program is to complicated to slap one together. Just read through this thread and play with the program and you'll figure it out. Nothing in life is easy remember. (I'd rather have him work on new versions of the program than a guide).

promitheas
16th May 2004, 08:55
Ok, then.
Go on and have fun but the program will still remain innacecible for most users.

Shalcker
16th May 2004, 10:27
I'm currently working on OCR module - and it seems to recognise subtitles fairly nice in some cases... fails in a some other - but making a perfect OCR program in a few months from the scratch is impossible anyway... :)
I still have a few ideas how to make it better so i'll probably implement them first before releasing new version :)

As for guide... it's hard to create, really. Or maybe I'm just bad at explaining things.

Basic concept behind detection algo is easy (and explained in this thread) - but it is hard to "translate" to "if you have such picture, you turn such and such things on/off and set such and such thresholds"... there are too many variations of background pictures and subtitles around, and there are sometimes quite subtle differences between what gets detected and what not... In general, if defaults fail you need to make sure that subtitle gets recognized (even at cost of more "false" entries) by reducing drop-settings or maybe setting specific subtitle colors for "preprocessing". If subtitle is detected, but you get too many "false" changes, you need to look at Stats tab and make sure that your change-thresholds exceed "noise" peaks you see there.

LB
21st May 2004, 01:52
Originally posted by promitheas
Ok, then.
Go on and have fun but the program will still remain innacecible for most users.

No. It is accessible for people that read this thread in its entirety. For people that aren't able to do that, they aren't intelligent enough to run the program anyway. I'm not bashing, but currently, the program changes to often to have a guide. If you've followed each beta, each new beta brings so many changes that an extensive guide would need to be re-written for each new beta. That is simply infeasible. So until the program comes along and further betas bring merely subtle changes, a guide is worthless. Don't be lazy, read the thread.

Shalcker: I dunno. I still believe it's better to let a professional program like Omnipage handle the OCR because it's just to hard for most subtitles. Most fansubs have weird fonts that even omnipage probably can't detect. Well anyway, toss us some form of an updated release soon hehe, I'm getting ancy :p

Sakuya
21st May 2004, 04:42
I have an AVI with soft subs in SSA and SRT formats. I use Vobsub so when I play the AVI in Windows Media Player, I can either turn on or off the subtitles. But I want to make a DVD using this AVI and make the subtitles selectable. First of all, how do I rip the subtitles so they're on their own as an SSA/SRT file? I didn't know whether or not the tools mentioned so far can do this since they are for use on hard subs... :(

LB
22nd May 2004, 04:16
Originally posted by Sakuya
I have an AVI with soft subs in SSA and SRT formats. I use Vobsub so when I play the AVI in Windows Media Player, I can either turn on or off the subtitles. But I want to make a DVD using this AVI and make the subtitles selectable. First of all, how do I rip the subtitles so they're on their own as an SSA/SRT file? I didn't know whether or not the tools mentioned so far can do this since they are for use on hard subs... :(

Hey. This isn't the correct forum. This forum is for ripping subtitles from a AVI where the subs are NOT selectable. Sounds like you have something like an .mkv or .ogg file. Try posting your general question as a thread of it's own in this forum.

Sakuya
22nd May 2004, 06:50
No, it's not MKV nor OGG. It's an AVI. Anywho, I solved my problem so nevermind. :o I do have audio problems though so if you can help me with that in the other part of the forum...

Shalcker
22nd May 2004, 14:10
Originally posted by LB
Shalcker: I dunno. I still believe it's better to let a professional program like Omnipage handle the OCR because it's just to hard for most subtitles. Most fansubs have weird fonts that even omnipage probably can't detect.
It is still artificial font with fixed characters. So if we OCR them in SubRip style and succesfully separate subtitles from background picture, we can suceed in many cases... ;)
And not everyone uses fancy fonts too ;)

I just lack ideas now on how to improve detection without "recognizing" characters in one way or another... so i decided to try creating OCR and it turned that a few old ideas actually worked :)

Well anyway, toss us some form of an updated release soon hehe, I'm getting ancy :p
I'll probably release it as "separate" tool accepting cropped bitmaps from AviSubDetector (or any other program) and release "bugfix" version of AviSubDetector :)

Right now my OCR program is really slow... somewhat buggy... but works in a few test cases. :)

promitheas
22nd May 2004, 16:04
Hey, Shalker,
I wonder if there is a button that brings the program to default values.
I found it necessary while playing with progs values i could see that no more subs could be detected anymore, even if it was working fine before applying the new values.
2)Don't you think that it could be more user friendly if we could choose the keys for some basic functions? (e.g the NoSubtitle function)
What do you say?

promitheas
22nd May 2004, 16:08
I'd rather have him work on new versions of the program than a guide

Maybe someone else who knows the program could help in that.What about you pal?

Shalcker
22nd May 2004, 19:45
Originally posted by promitheas
Hey, Shalker,
I wonder if there is a button that brings the program to default values.
Easiest way is to save them after starting program then load when needed ;)

2)Don't you think that it could be more user friendly if we could choose the keys for some basic functions? (e.g the NoSubtitle function)
You mean "Manual" decision window or something else? Changing hotkeys for one window or making them selectable via some sort of ini-file is relatively easy...

promitheas
23rd May 2004, 09:27
To Shalker:
Check Mdvd v.1.2 in the configuration panel (control area), how user can fix player's fuction under his needs and you'll understand what i mean.

To LB:
I was reffering to you for making a guide.

Shalcker
24th May 2004, 16:34
Originally posted by LB
I ran across a page not to long ago with some killer software on it. The source code is available on the site and it's geared towards text segmentation (seperating text from video) and very advanced. Check it out:http://www.informatik.uni-mannheim.de/informatik/pi4/projects/MoCA/Project-textSegmentationAndRecognition.html
Looks mostly similar in "text-cleaning" part to my current OCR... :)

And check out this COOL site: HERE (http://www.videoanalysis.org/Research_Topics/Text_Localization__Text_Segmen/text_localization__text_segmen.html)

I'm sure i read some of PDFs mentioned there.. and one of them explained many other approaches so i didn't bothered to read them all myself :)

promitheas
24th May 2004, 18:06
easiest way is to save them after starting program then load when needed

To Shalker:
And what if someone like me loses his default values?
Hangs himself?;)

Shalcker
25th May 2004, 03:11
Originally posted by promitheas
And what if someone like me loses his default values?
Hangs himself?;)
Program reverts to defaults on start. So you can always start another instance of the program and save defaults there ;)

LB
25th May 2004, 04:29
Originally posted by Shalcker
Looks mostly similar in "text-cleaning" part to my current OCR... :)


Yeah, but I meant to post it because they might use different routines in text clearing, so your techniques + theirs = OMG
Worth a look at least.

Shalcker
2nd July 2004, 07:44
Next version released.

Minor speedups in preview and
experimental text recognition module.
Sometimes it works... and sometimes it doesn't :)

I think it's time to finally concentrate on writing some guides on both detector and OCR, and tuning existing routines for more speed with assembler optimizations :D

Coroner
2nd July 2004, 08:52
Good stuff!

I haven't used it for 6 months or so, it's so much better now. I have one problem though. I have some avis which have wmv9 encoded video, how do I get AVISUBDetector to work with them? I can play them back in MPC so I guess the wmv9 codec is working.

Thanks

Shalcker
2nd July 2004, 10:23
Originally posted by Coroner
I haven't used it for 6 months or so, it's so much better now. I have one problem though. I have some avis which have wmv9 encoded video, how do I get AVISUBDetector to work with them? I can play them back in MPC so I guess the wmv9 codec is working.

Easy! All you need is to install AviSynth (2.54 or later) and use this script instead of loading AVI (WMV, OGM and MKV will also work fine in most cases :D )
DirectShowSource("C:\TEMP\your.avi",FPS=23.97)
ConvertToRGB24()
Script is a simple text file with .avs extension. AviSubDetector opens them like any avi if you have AviSynth installed. Change FPS to match frame rate of your source. Sometimes you can also use DirectShowSource without setting FPS.

Coroner
2nd July 2004, 11:04
Thanks Shackler.

I used the code you provided as my file is 23.97fps (although gspot says 23.976 - but it's probably off.) The file loads, but when I click start nothing happens. I can step through the video frame by frame, but I can't get it to play and search for subtitles. The start button becomes greyed out. I press stop then start again and still it won't go.

Xvid/Divx avis work fine though, not using an avs script with them.

Any ideas?

Thanks

Shalcker
2nd July 2004, 12:48
Originally posted by Coroner
The file loads, but when I click start nothing happens. I can step through the video frame by frame, but I can't get it to play and search for subtitles. The start button becomes greyed out. I press stop then start again and still it won't go.
Hmmm... are you sure that .avs is present and "checked" in avi list on "Project" tabsheet? It wouldn't "start" if it's either not there or unchecked....
hmmm... yes. looks like i forgotten something and it no longer adds them to avi list on "Open AVI"... and it only processes 1 frame for avs then stops... but if you open AVI, start it, then add avs to list, uncheck avi and start avs, it will sometimes work fine... Hopefully I'll be able to fix it shortly :)

Coroner
2nd July 2004, 12:58
Ok. I added the avs and the avi with wmv9 in it to the project list and a xvid encoded avi. I unchecked avs and wmv9 avi, then started the xvid avi. Worked, so then I unchecked xvid avi then checked avs and start - bingo it works.

Thanks for the work around.

Had a play with OCR, I used it on an xvid avi which was nice and clean - dvdrip, works surprisingly well. The use whole rectangle option is extremely useful for orphaned dots off of i etc. Has a little trouble detecting spaces between some words, but I don't mind reading through it to check. It's a lot better than having to type it all out manually. Having used subrip an awful lot I prefer your interface. The OCR works very well, going to try it on some lower qual tv ripped stuff see how that goes.

I've been putting off sub ripping for quite a few months now, all that typing kills my hands. Finally I can finish doing subtitles for some R2 DVDs I have. The OCR shows real promise thank you very very much for adding it! :D

Cheers

Edit: Hmm, seems to have "not play" problem I described previously not just on avs. The workaround works with these too. They are older encodes. Gspot reports the following

4CC: DIVX/xvid
Name: DivX 4(OpenDivX)
FPS is 23.976

FFDshow says
DIVX
OUTPUT: RGB32

Hope that is of some use

Sometimes the workaround works, others not. I just keep mucking until it works.

With the OCR letters which hang such as y,p,g are sometimes being coloured purple and missed. What does this mean? How do you fix it?

Sorry for all the questions.

Shalcker
2nd July 2004, 14:47
Originally posted by Coroner

With the OCR letters which hang such as y,p,g are sometimes being coloured purple and missed. What does this mean? How do you fix it?

Sorry for all the questions.
Questions are welcome ;)

Purple means that it had proper color but was "eliminated" as "open" area on later stages. With default settings it means that it either:

had too large distance from outline in any point within (unlikely for y/p/g, but you can set it a bit higher if you have a large font - it's "Match text mask to outline mask" on "Clearing Settings")
or had some point that didn't matched to "grown" "Diff-Mask". Increase number of passes for "Grow Diff Mask" in this case.

You can disable all "Remove open areas from Text Mask" (that's a function that fills them with purple - others just place purple dots inside marking that region as "eliminated"), and then enable them one-by-one (each time pressing "Build Masks") to see which step is responsible for elimination of this letter. Then you can either tweak it or disable it entirely :)

There is also another problem when outline isn't "enclosed" around letter, and therefore letter gets removed when outline is filled from edges and substracted from text. In this case it'll be "blue" instead of purple, and it helps to set a bit higher multiplier for Outline on Auto-Color tab (assuming that you're using Auto-Color) - change it, press Analyze (to get new colors), then "build masks" to see effect. :)

Shalcker
2nd July 2004, 18:50
Ok, found and fixed that bug. It was caused by "silent" overflow when program was trying to get FPS value for opened avi with big framerate/framescale value (for example, AviSynth uses 10000000/333667 for 29.970). I changed program to show only first 3 digits after dot (purely cosmetic change to allow more text in program title) and didn't noticed possible overflow in my sequence :)

Replaced version 0.6.0.0 with version 0.6.0.1 :)

Coroner
2nd July 2004, 23:56
Absoloutely legendary stuff!

New ver works a treat. The problem of not starting has totally gone. The older xvid/dvix encodes work fine now too.

Thanks very much :D

Cheers

talechaser
5th July 2004, 04:59
Good to see you're still improving this software, Shalcker. Thank you for this wonderful software. I am truly impressed by how well designed it is and how well it does work (despite the fact that I am always wrestling with it).I am currently working on two good sized projects with it.

My biggest problem is in tweaking the detection settings just right so that subs aren't skipped, or sub changes (with no time between subs) ignored while at the same time avoiding false sub detections. There doesn't seem to be much of a middle ground for me. It's either not sensitive enough to catch the shorter sentences or too sensitive and stopping frequently with "sub detected" when there are no subs.

I have already probably spent somewhere between 50 and 100 hours using this program, but I still haven't figured out what everything does and is supposed to do etc. Once I find detection settings that work most of the time I tend to leave them of course. If I am having this much trouble in manual mode I have to wonder how practical auto mode could be.

I'd like to see you spending more time improving the detection algorithms than the new OCR functions. I am wondering if I can help at all. I am going to be spending a lot more hours using your program over the next few months and would be happy to try to help with giving you some feedback on the detection settings. But some more detailed documentation (than exists only in this thread) would I think help a lot to make the detection adjustments more usable.

I think it would be helpful if people could post the settings that seem to work for them at various times and what kinds of strategies they are using to keep the detection purring along nicely. I tend to err on the side of over-sensitivity since I hate missing a sub and always have to be hovering over the "force subs" button, which btw would be great to have as a keyboard shortcut. In fact mapping the accept and ignore buttons to the keyboard without having to hold down the ALT key would also be wonderful. The only thing I use the mouse for now is the "force subs" and changing the settings (which I have to do probably every 20 minutes or so).

I will post a more detailed account of my experience with this program and my strategies for getting it to detect more accurately etc. Maybe some of us should be helping with the documentation by posting our own experience about how to use the program in this thread, like our own sort of How-To guides.

Update: this program is not working very well at all for me. The "ignore blocks without color" checkbox seems to be grayed out for me in this new version, and I absolutely need that. Without that, it is actually faster for me to just use subtitle workshop and stop and type whenever I see a subtitle.

Shalcker please work on improving your detection algorithms before bothering with adding OCR. If you cannot detect subtitles or changes in subtitles there isn't much point in OCR. It would either miss the subs half the time or record a bunch of bitmaps without subs.

promitheas
11th July 2004, 11:08
After the cogratulations of the excelent job i have some feedback to give:
- OCR is the most important part after the detection and it is something that all of us waited for ages now. It's a great work!! Without OCR you need mupltiple time to type the detected subtitles. As for the detection i rarely loose subtitles since i prefer the manual mode and i can detect lost subtitles by myself it the program looses them. The problem in the new version is how someone can turn the mode while OCRing and warn for/add the lost subtitle?Have you thought about it Shalker?
- In the OCR mode, sometimes the "USE FULL RECT" button is grayed out even the fact that the letter is easily recognisable by human eye.Can you do something for it Shalker?
-If someone gives by mistake wrong letter to the regognition routine, it is impossible to turn the process back- even if your are in the middle of the regognition process-and the letter will be regogniced with a wrong symbol. Is it possible to put an "UNDO" or "GO BACK" button? (Subrip has not thought of this fuction, too).

Promitheas

promitheas
11th July 2004, 22:28
Have you thought about saving and reusing recognised symbol matrices?
Promitheas

Shalcker
12th July 2004, 02:40
Originally posted by promitheas
Have you thought about saving and reusing recognised symbol matrices?
You already can save and load them (See OCR/Symbols) :)
In next version they will be saved automatically.

- In the OCR mode, sometimes the "USE FULL RECT" button is grayed out even the fact that the letter is easily recognisable by human eye.Can you do something for it Shalcker?
"Use Full Rect" is grayed out when there is only one "region" inside rectangle, and enabled when several regions intersect vertically. If, for example, dot above i fails to be included, then it was most likely eliminated from rectangle as "too small" - with default settings it is either smaller then 8 in either width or height (if it is yellow but not included) or has area with less then 60 pixels (in which case it'll be dark grey).

As for manual mode, i'll try to enable it for OCR in next version :)

-If someone gives by mistake wrong letter to the regognition routine, it is impossible to turn the process back- even if your are in the middle of the regognition process-and the letter will be regogniced with a wrong symbol. Is it possible to put an "UNDO" or "GO BACK" button?
Certainly possible. I'll need to use OCR symbol numbers instead of letters in this case - then they can be changed "on fly" and only converted to real letters when saved as script :)

For now you can press "Pause", change wrong letter on "Symbols" Tab, and repeat OCR :)

promitheas
20th August 2004, 08:34
What is the best resolution you suggest for capturing our subdetected video, Shalker, so the program works as better as possible?

Shalcker
20th August 2004, 13:13
Originally posted by promitheas
What is the best resolution you suggest for capturing our subdetected video, Shalker, so the program works as better as possible?
I think default settings are tuned for something around 640x480 since that's the most common avi resolution. 720x480 (or 720x576 if it's PAL) should work as well.

promitheas
5th October 2004, 18:39
Shalker no news since August for the OCRing?

LB
7th October 2004, 15:26
I got a message from him awhile ago. He said that RL work is just eating up his time so his proggie is on hold for a bit. Though I tried his latest version and it's really good so there shouldn't be any issues in using that for the time being.

promitheas
11th October 2004, 19:07
thanks LB for the answer.
It seems that i am not able to work out the OCR machine for some reason even that the movie has got subtitles in black backround and it should be easy (attached picture).
Is is possible to tell me how to save the detected bmps if i use the automatic mode?I used to do that with older versions but i can't do it now.
Thanks very much.

promitheas
11th October 2004, 19:21
sorry, here is the url for the snapshot
http://agrino.org/basiliad/pics/snapshot.jpg

Shalcker
12th October 2004, 04:03
Originally posted by promitheas
here is the url for the snapshot
http://agrino.org/basiliad/pics/snapshot.jpg
Looks fine to me with default OCR settings...

Originally posted by promitheas
Is is possible to tell me how to save the detected bmps if i use the automatic mode?I used to do that with older versions but i can't do it now.
That part didn't changed at all... You need to enable checkboxes on Project page ("Automatically Extract and Save SubPictures" and a few other depending on what kind of pictures you want to get saved).

promitheas
12th October 2004, 05:56
ok Shalker, thanks for answering.
Extracting subs pics was ok, thanks.

Now, for the OCR stuff.
I start OCRing the very first of the subtitles.After changing a little the drop values settings, subs are being detected. OCR works fine for the first subtitle, but after that the same subtitle is detected again and the OCR starts asking me for every letter of the line again from the begining and again and again.Finally i am not moving from the same line after 20 minutes.What do you suggest?

And there is another question:
The program detects characters in the space between the real two lines of the sub.How can i discard this region and tell the program not to OCR it?
You can check the picture in:
http://agrino.org/basiliad/pics/snapshot1.jpg
The 2 red regions are the real subs and the blue region shouldn't be calculated but still i have to tell the program each time to IGNORE every single of those dots and lines.(i hope IGNORE) is the right choise, isn't it?)

Shalcker
12th October 2004, 15:57
Originally posted by promitheas

Now, for the OCR stuff.
I start OCRing the very first of the subtitles.After changing a little the drop values settings, subs are being detected. OCR works fine for the first subtitle, but after that the same subtitle is detected again and the OCR starts asking me for every letter of the line again from the begining and again and again.Finally i am not moving from the same line after 20 minutes.What do you suggest?If they fall below required similarity threshold (otherwise they will not be asked again in most cases) then reduce "Required Similarity", and/or increase "Compare 'Enhancement'" (OCR/Main/OCR Settings).


And there is another question:
The program detects characters in the space between the real two lines of the sub.How can i discard this region and tell the program not to OCR it?Use "Remove". It will discard selected region by marking it as "eliminated" (if you "ignore" region you may be asked to "ignore" it again in certain "multipass" cases, while eliminated region stays eliminated no matter how many passes are done). "Ignore" is mostly for cases where lines are linked into one due to "noise".

You can also use "Pause" and eliminate these regions by simply clicking on them.

You can check the picture in:
http://agrino.org/basiliad/pics/snapshot1.jpg
The 2 red regions are the real subs and the blue region shouldn't be calculated but still i have to tell the program each time to IGNORE every single of those dots and lines.(i hope IGNORE) is the right choise, isn't it?)
Once you set enough letters and punctuation marks into symbol set, you can press "Remove Unknown". "Small" will not ask for new entry for all regions with height below "Minimum Text Height" (they will be eliminated automatically). "All" will not ask for ANY region which failed to match to any already entered symbol.

promitheas
12th October 2004, 16:59
You can also use "Pause" and eliminate these regions by simply clicking on them.

But how can i do that? There isn't any "select area" button or something like this.

promitheas
12th October 2004, 18:23
f they fall below required similarity threshold (otherwise they will not be asked again in most cases) then reduce "Required Similarity", and/or increase "Compare 'Enhancement'" (OCR/Main/OCR Settings).

i tried it but it didn't worked out. I came up with values as:
Reguired similarity: 10%-20%
Compare enhansmentQ 8,10
and dozens of other combinations but still the program detects the same sub after 4-5 frames and start to regognize again. Plus after regognition usually kind of freeze.
I am desperate.
Can i send you a 15 sec. video part to test it?

ukendt
18th October 2004, 22:18
closing this thread simply 'cause it became too big..
Is this ok ?

LB
19th October 2004, 02:12
Originally posted by ukendt
closing this thread simply 'cause it became too big..
Is this ok ?

What's wrong with a big thread if it's still relevant? :confused: I mean, if Shalcker posts new updated versions of his script we'll want to talk about it somewhere, so starting a new thread to talk about new versions seems kind of silly.

Shalcker
19th October 2004, 04:56
Originally posted by LB
What's wrong with a big thread if it's still relevant? :confused: I mean, if Shalcker posts new updated versions of his script we'll want to talk about it somewhere, so starting a new thread to talk about new versions seems kind of silly.
Creating new thread with better title and with link to this thread in the first message as well as links to my program is better way of handling changing versions :)
Then i can also simply change version in header of first message when program updates and write a few relevant changes there, so that new people don't have to dig this big thread to find all the links and changes :)
A lot changed from the first version, so some info here might be no longer relevant too.

ukendt
19th October 2004, 14:38
Good!
Start a new thread (I'll make it sticky and I'll close the old one).
U decide name and so on.....PM me if U wanna talk about anything...

LB
20th October 2004, 23:39
Hmm... How about we call it:

"How Women, Booze, and Ripping Subs from Avi's" ?