Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th May 2005, 21:48   #41  |  Link
roux
Registered User
 
Join Date: Nov 2004
Posts: 93
I’m trying to rip subs as bmp so i can import them into scenarist. Only the sst file doesn’t contain the whole header. It’s shows me only the color and contrast entry and the file names.

Code:
Color		(4 1 2 3)
Contrast	(15 0 15 15)
1		00:00:57:01	00:01:03:09	1.1.bmp
This results in an error importing into scenarist. Do i need to create a header myself instead?
roux is offline   Reply With Quote
Old 11th May 2005, 21:54   #42  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
I have no idea, but I could I look into it if you give me more details. Are you trying to export hard-subbed subtitles from a video file? That functionality is not currently supported, only avi2txt works now. If not, did it work before, with DVD subs? If it worked before, you may want to consider the possibility that Scenarist has changed, because I didn't change that part of SubRip . If not, what does the output format header look like (give an example)?

Last edited by ai4spam; 12th May 2005 at 00:25.
ai4spam is offline   Reply With Quote
Old 12th May 2005, 00:53   #43  |  Link
roux
Registered User
 
Join Date: Nov 2004
Posts: 93
Thanks for the reply,

I'm trying to rip selectable subs from a dvd as bitmaps and save the sst file. Then i want to insert the ripped subs into scenarist. Normally i use dvdmaestro, ripping the subs and save the .son file and importing them in maestro, gives me no problems.

I have an example .sst file created with maestrosbt, which imports like it should into scenarist:

Code:
st_format	2
Display_Start	non_forced
TV_Type		NTSC
Tape_Type	NON_DROP
Pixel_Area	(0 477)
Directory	.
Subtitle	test
Display_Area	(0 2 719 479)
Contrast	(15 15 15 0)

#
# Palette entries:
#
# 01 : RGB(255,255,255)
# 02 : RGB(127,127,127)
# 03 : RGB(  0,  0,  0)
#

PA	(0 0 255 - - - )
E1	(255 0 0 - - - )
E2	(0 0 0 - - - )
BG	(255 255 255 - - - )


SP_NUMBER	START	END	FILE_NAME
Color	(3 2 1 1)
0001	00:00:07:05	00:00:32:15	test_0001.bmp

As you can see there's more information in de .sst file, which subrip don't save.


[edit]
I think i've found the answer, in this thread Oddyseus says you have to change the header. I'm going to try that.
http://forum.doom9.org/showthread.php?s=&threadid=35450
[/edit]

Last edited by roux; 12th May 2005 at 00:59.
roux is offline   Reply With Quote
Old 12th May 2005, 01:05   #44  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Cool, it wasn't my area anyway. Maybe Zuggy can help you further.
ai4spam is offline   Reply With Quote
Old 12th May 2005, 01:41   #45  |  Link
roux
Registered User
 
Join Date: Nov 2004
Posts: 93
I figured it out, just had to create the same header like maestrosbt does.

Last edited by roux; 12th May 2005 at 01:49.
roux is offline   Reply With Quote
Old 12th May 2005, 07:42   #46  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Ok, so there seems to be no competent video player for Delphi that does what I want. However, there is hope: AviSynth http://www.avisynth.org/ seems to work great. I will implement automatic script generation soon, but in the meantime just create a .avs file with contents like:
Code:
DirectShowSource("D:\Rip\Vts_01_1.vob" fps=25.00)
Remember, you still need to have all the filters properly installed (i.e., the file should play in MediaPlayer). For DVDs, you probably need http://sourceforge.net/projects/gplmpgdec Apparently, DirectShow does not require filters to provide accurate frame seeking, but most of them do, and when they do, AviSynth takes advantage of it, so most files should work.
OGM files also seem to work, although it seems that seeking backwards is only done until the last keyframe. After setting the color settings though, since now SubRip only goes forward, it shouldn't be a problem.

Last edited by ai4spam; 12th May 2005 at 09:16.
ai4spam is offline   Reply With Quote
Old 12th May 2005, 12:15   #47  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
better use DGMPGDec
it's made for dvd/mpeg2 n avisynth
E-Male is offline   Reply With Quote
Old 13th May 2005, 01:54   #48  |  Link
GrofLuigi
Member of a Library
 
Join Date: Oct 2002
Posts: 463
a bug: the rectangle "drawn" with right mouse button doesn't stay in place. As soon as I click on something else (mostly the buttons-gadgets for thresholds), it returns to the previous position. (maybe this has to do something with the source, avisynth'd and cropped)

a feature request: Also, the rectangle cannot be drawn by dragging in bottom-right to top-left direction (message: range check error). This is sometimes needed when the bottom-right corner has better visual indication.

another feature request (low priority): inter-line height to be able to be bigger than 40.

a community "please": some good values for thresholds (or tutorial, as mentioned). No matter what I do, I end up with subrip recognizing only parts of letters (too thinned) or ugly big areas (the two fill options don't help). The source is very clean, BTW.

thankyous: to the authors of the program.

GL
GrofLuigi is offline   Reply With Quote
Old 13th May 2005, 04:38   #49  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Quote:
a bug: the rectangle "drawn" with right mouse button doesn't stay in place. As soon as I click on something else (mostly the buttons-gadgets for thresholds), it returns to the previous position. (maybe this has to do something with the source, avisynth'd and cropped)
I can't reproduce this. Hopefully, it will all go away once I start supporting AviSynth and not MediaPlayer.

Quote:
a feature request: Also, the rectangle cannot be drawn by dragging in bottom-right to top-left direction (message: range check error). This is sometimes needed when the bottom-right corner has better visual indication.

another feature request (low priority): inter-line height to be able to be bigger than 40.
Sure, it will be done.

Quote:
a community "please": some good values for thresholds (or tutorial, as mentioned). No matter what I do, I end up with subrip recognizing only parts of letters (too thinned) or ugly big areas (the two fill options don't help).
Well, in my case it's a combination of everything: text color and outline color tolerance, filling. Beta 13 introduced some stuff to help with the big ugly areas (most of which should disappear when you click "use outline"), namely drawing lines between the text lines and filling the open areas from there. Also, keep in mind that "large" means that the width or the height is more than 10 times the text line width, so if that is detected incorrectly (max=10), then only areas of more than 10*10=100 in width or height will be filled. The value 10 came from the fact that the widest letter (W) and the tallest letter (E) have some less than 10 lines forming them. Basically, you need to manually lower the text line witdth to the point where text is still detected correctly, but large areas are filled. I'll change it to work better when the height of the text is set in the inter-line options panel.
Everybody, please post your successful setting combinations. And I'm still waiting for someone to volunteer to write a tutorial .

Quote:
The source is very clean, BTW.
thankyous: to the authors of the program.
Well, the point was to make it easy to understand. SubRip has enough parts that I had a hard time unraveling myself, I saw no point in adding to that .
And you're welcome, it's nice to be appreciated .

Last edited by ai4spam; 13th May 2005 at 18:37.
ai4spam is offline   Reply With Quote
Old 13th May 2005, 09:51   #50  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Beta 14 is up on the official website.
Changes:
- GUI improvements and changes in the video routine
- added AviSynth support for files other than regular AVIs

I have one more feature on my list: output BMPs with the recognized text (so only what was actually typed in or recognized shows up) and a text file with frame numbers, coordinates and file names, for possible subtitle elimination. Someone willing to write a VirtualDub filter to use the results?
ai4spam is offline   Reply With Quote
Old 14th May 2005, 00:14   #51  |  Link
GrofLuigi
Member of a Library
 
Join Date: Oct 2002
Posts: 463
Quote:
Originally posted by ai4spam
Well, in my case it's a combination of everything: text color and outline color tolerance, filling. Beta 13 introduced some stuff to help with the big ugly areas (most of which should disappear when you click "use outline"), namely drawing lines between the text lines and filling the open areas from there. Also, keep in mind that "large" means that the width or the height is more than 10 times the text line width, so if that is detected incorrectly (max=10), then only areas of more than 10*10=100 in width or height will be filled. The value 10 came from the fact that the widest letter (W) and the tallest letter (E) have some less than 10 lines forming them. Basically, you need to manually lower the text line witdth to the point where text is still detected correctly, but large areas are filled. I'll change it to work better when the height of the text is set in the inter-line options panel.
Well, I have some pretty good ideas what to do, but unfortunately, the first "bug" mentioned prevents me from doing any serious work/testing. Will try the new version and report back.
Quote:
Originally posted by GrofLuigi
The source is very clean, BTW.
Oops, I meant my source material...
Quote:
Originally posted by ai4spam
And you're welcome, it's nice to be appreciated.
And I really mean it.

GL
GrofLuigi is offline   Reply With Quote
Old 14th May 2005, 05:29   #52  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Quote:
Well, I have some pretty good ideas what to do, but unfortunately, the first "bug" mentioned prevents me from doing any serious work/testing. Will try the new version and report back.
Please do. Can you specify whether it was in native mode or in MediaPlayer mode? You may also want to try on a different computer, I think it's really weird that the focus rectangle gets reset.
Quote:
Oops, I meant my source material...
There I was, thinking I was complimented .

Last edited by ai4spam; 14th May 2005 at 06:38.
ai4spam is offline   Reply With Quote
Old 14th May 2005, 10:47   #53  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
SubRip 1.20 Beta 15 is available.

Changes:
- GUI improvements
- support for saving bitmaps for later subtitle removal (sequential bitmaps and a file with rows of the format below)
Code:
<index>,<first frame>,<last frame>,<left coord>,<top coord>
Basically, this is all the information needed for subtitle removal. Anyone volunteers to write a VirtualDub plugin ?
ai4spam is offline   Reply With Quote
Old 15th May 2005, 04:18   #54  |  Link
GrofLuigi
Member of a Library
 
Join Date: Oct 2002
Posts: 463
Quote:
Originally posted by ai4spam
Please do. Can you specify whether it was in native mode or in MediaPlayer mode? You may also want to try on a different computer, I think it's really weird that the focus rectangle gets reset.
It's gone with beta 14, you produce programs faster than I can download them.

Ehm... mediaplayer mode or... I just "open hard subbed video files".
As I said, through Avisynth script:
Code:
LoadPlugin ("C:\Program Files\DGMpgDec\dgdecode.dll")
MPEG2Source ("D:\VIDEO\DVD\1.d2v")
ConverttoYUY2 ()
Crop (12,76,-8,-76, align=true)
Maybe it was the crop, non-mod-something value (source = PAL DVD). I just took out the black borders and the subtitle nearly touched the bottom.

GL
GrofLuigi is offline   Reply With Quote
Old 15th May 2005, 10:05   #55  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Great stuff guys...I'm trying the hardcode subtitles detection and it works pretty good for the moment.


May I suggest to add some new subtitles format for the next releases : USF, TTXT, and why not the QuickTime TeXML ?

I can provide some samples if you want...
Kurtnoise is offline   Reply With Quote
Old 15th May 2005, 12:11   #56  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
Quote:
Originally posted by ai4spam
SubRip 1.20 Beta 15 is available.

Changes:
- GUI improvements
- support for saving bitmaps for later subtitle removal (sequential bitmaps and a file with rows of the format below)
Code:
<index>,<first frame>,<last frame>,<left coord>,<top coord>
Basically, this is all the information needed for subtitle removal. Anyone volunteers to write a VirtualDub plugin ?
i'll put an avisynth plug-in on my (to long) todo-list
E-Male is offline   Reply With Quote
Old 15th May 2005, 16:50   #57  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Quote:
Originally posted by E-Male
i'll put an avisynth plug-in on my (to long) todo-list
No need, I'm almost done with it . Just stripped down DeLogo.
ai4spam is offline   Reply With Quote
Old 16th May 2005, 08:49   #58  |  Link
screw
Registered User
 
Join Date: Aug 2002
Location: Latvia
Posts: 69
Few remarks from my side:

1. If I interrupt the OCR with "Pause", and than modify Character matrix, "Continue" is not available (button is grey) after that, but I can restart OCR from beginning. Is that a feature or a bug (in older versions it was possible to "Continue" with OCR after matrix modification)?
P.S. Seems fixed in Beta 15.

2. This SubRip version has the same bug as 1.17 and older versions with OCR of Latvian subs - SubRip crashes, if Latvian subtitles are selected for OCR. It seems that language string "Latvian, Lettish" in SubRip EXE file is the reason (maybe it is too long). If patched to "Latvian" and length indicator set to 7, it works just fine.

Screw

Last edited by screw; 16th May 2005 at 09:45.
screw is offline   Reply With Quote
Old 16th May 2005, 09:31   #59  |  Link
zuggy
Registered User
 
Join Date: May 2002
Location: Czech Republic
Posts: 171
Quote:
Originally posted by screw

2. This SubRip version has the same bug as 1.17 and older versions with OCR of Latvian subs - SubRip crashes, if Latvian subtitles are
My fault...
It was fixed in upcoming (never released) v1.17.2. I will fix it in 1.20 final.

Last edited by zuggy; 16th May 2005 at 09:33.
zuggy is offline   Reply With Quote
Old 16th May 2005, 20:34   #60  |  Link
ai4spam
Programmer
 
ai4spam's Avatar
 
Join Date: Sep 2003
Posts: 382
Quote:
Originally posted by ai4spam
No need, I'm almost done with it . Just stripped down DeLogo.
Looks like I spoke too soon: the filter works fine in preview mode, but for the life of me I can't understand why it won't work in the main VirtualDub window (RunPorc is never called?!?). Do you have an example trivial filter code that I can try out? Thanks.
ai4spam is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.