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 22nd March 2010, 23:41   #681  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Ok, guess I mistook your post. Setting 200 flags in >1000 subs sound like some kind of torture this way or the other.

Then again, why not use the keyboard shortcuts?
1) Alt+F to set the forced flag
2) Alt+S to save
3) Alt+Right to advance to the next subtitle
Guess that would be much more convenient than using the mouse.

You could complain that there's no shortcut for save+advance, but shortcuts for non-letter characters
0xdeadbeef is offline   Reply With Quote
Old 23rd March 2010, 14:57   #682  |  Link
laserfan
Aging Video Hobbyist
 
Join Date: Dec 2004
Location: Off the Map
Posts: 2,444
Quote:
Originally Posted by 0xdeadbeef View Post
...why not use the keyboard shortcuts?
1) Alt+F to set the forced flag
2) Alt+S to save
3) Alt+Right to advance to the next subtitle
Guess that would be much more convenient than using the mouse.
I'm usually pretty good about reading docs but I did miss these; you're right they'd have helped me a lot.

Quote:
You could complain that there's no shortcut for save+advance, but shortcuts for non-letter characters
Dunno that I will ever do another one this ugly, but it might be nice for a future release to use the PC kb arrow keys e.g. Up is Back, Down is Forward, Left is Save-and-Back, Right is Save-and-Forward.

Thanks for this great tool, I'm not sure how else one might go about tweaking the forced st flags.
laserfan is offline   Reply With Quote
Old 25th March 2010, 05:07   #683  |  Link
dfordham
Registered User
 
Join Date: Feb 2009
Posts: 4
Forced Subs from the command line

I'm trying to use BDsup2Sub from the command line. I have a BD (Iron Man) which has a small sup file with nothing but forced subs in it. If I import it using the GUI, it correctly tells me there are 37 forced subs. However, I am trying to use the following C/L:

BDSup2Sub.jar "d:\MKV Work Folder\Subtitles 3.sup" "d:\MKV Work Folder\Subtitles 3.sub" /forced

With this command line, nothing is returned. If I remove the /forced, I get the .sub file. Am I doing something wrong?
dfordham is offline   Reply With Quote
Old 25th March 2010, 18:20   #684  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by dfordham View Post
I'm trying to use BDsup2Sub from the command line. I have a BD (Iron Man) which has a small sup file with nothing but forced subs in it. If I import it using the GUI, it correctly tells me there are 37 forced subs. However, I am trying to use the following C/L:

BDSup2Sub.jar "d:\MKV Work Folder\Subtitles 3.sup" "d:\MKV Work Folder\Subtitles 3.sub" /forced

With this command line, nothing is returned. If I remove the /forced, I get the .sub file. Am I doing something wrong?
Currently I don't see why this should not work apart from the missing "JAVA -jar" which I guess you left just better readability. I just tested a similar case with a SUP containing only 23 forced subtitles and it worked as expected:
Code:
java -jar e:\src\java\BDSup2Sub\BDSup2Sub.jar "german test 3.sup" "test 3.sub" /forced
->
Code:
Command line:
E:\src\Java\BDSup2Sub\BDSup2Sub.jar german test 3.sup test 3.sub /forced

OPTION: export only forced subtitles: ON
Target frame rate set to 25fps

Converting SUB/IDX

Loading german test 3.sup
Selected language 'German (de)' by filename
#> 1 (00:01:06.525)
...
#> 23 (01:42:06.788)

Detected 23 forced captions.

Writing test 3.sub
Decoding frame 1/23 at offset 0x0000021b
...
Decoding frame 23/23 at offset 0x0005ecbd

Writing test 3.idx

Conversion of 1 file(s) finished

Is there anything printed on the console (note: use JAVA.EXE from the CLI, not JAVAW.EXE)? An error message maybe?

If you are 100% sure that you're using the newest version, didn't mistype the filename on the console and the console output indicates that everything was ok but no subtitles were exported, then I'd need to take a look at the file.
I'd be surprised though to see that this really doesn't work as there are several GUIs that use BDSup2Sub from the CLI especially to extract only the forced subtitles.
0xdeadbeef is offline   Reply With Quote
Old 25th March 2010, 22:50   #685  |  Link
dfordham
Registered User
 
Join Date: Feb 2009
Posts: 4
Operator error (I guess)

0x,
Thanks for responding so quickly. I seem to have wasted your time, though, as now everything seems to work as advertised.

Oh well, it was late and I'm old. That's a bad combination.

Thanks for an excellent program!
dfordham is offline   Reply With Quote
Old 25th March 2010, 23:05   #686  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by dfordham View Post
Oh well, it was late and I'm old. That's a bad combination.
Sounds familiar
No sweat...
0xdeadbeef is offline   Reply With Quote
Old 28th March 2010, 18:09   #687  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Hey 0xdeadbeef, I have here the "From Hell" Blu-ray (Region A) which uses PGS subtitles that are a series of paper scroll-like images designed to display at certain points to reveal historical trivia. OCR'ing these subs is likely to be an exercise in futility. BDSup2Sub converts the image and text legibly, albeit with 5 "WARNING: multiple PDS/ODS definitions: result may be erratic" and, in recognition of the constraints of the DVD palette, in 3 shades only. Are you interested in samples of such subtitles for further research, if only as an exercise in masochism?

Edit: To clarify, my thinking is this: Such subtitles, which consist of text of some font on a detailed and shaded multi-color background, could perhaps be converted to VobSub or even BD-SUP with your tool but done in a way with extremely high contrast and color palette modification so that they become black on nearly pure white or vice versa. They could then be OCR'd by other tools and either used from there or re-converted to BD-SUP.

Last edited by Inspector.Gadget; 28th March 2010 at 18:46.
Inspector.Gadget is offline   Reply With Quote
Old 28th March 2010, 18:48   #688  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by Inspector.Gadget View Post
Hey 0xdeadbeef, I have here the "From Hell" Blu-ray (Region A) which uses PGS subtitles that are a series of paper scroll-like images designed to display at certain points to reveal historical trivia. OCR'ing these subs is likely to be an exercise in futility. BDSup2Sub converts the image and text legibly, albeit with 5 "WARNING: multiple PDS/ODS definitions: result may be erratic" and, in recognition of the constraints of the DVD palette, in 3 shades only. Are you interested in samples of such subtitles for further research, if only as an exercise in masochism?
Though my need for masochism is limited lately and I guess you all noticed that I have much less time compared to last year, there's always a place for a weird subtitle in my freak gallery. A link via PM is welcome.
0xdeadbeef is offline   Reply With Quote
Old 28th March 2010, 18:52   #689  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Sure, will send ASAP. Is the SUP demuxed with eac3to sufficient or do you need anything else from the disc? Thanks.
Inspector.Gadget is offline   Reply With Quote
Old 1st April 2010, 13:05   #690  |  Link
layman66
Registered User
 
Join Date: Mar 2010
Posts: 2
Changing Y-value of all subtitles at once

First let me say how marvelous a tool BDSup2Sub is. It left me speechless when I was able to convert my demuxed HD DVD sup-files directly into BD sups.

I still have some HD DVDs which don't have subtitles, but where I could rip them as SRTs from DVDs. Via Clown_SRT2XMLSUB I imported them into BDSup2 Sub. They were automatically placed close to the bottom of the screen. When I moved them up under "Edit" and "Move all captions", the subs - which hat been aligned at approx the same Y-value - started to spread (with their Y-value fluctuating by +/- 5 pixels; this happens also with tsMuxeR srt to BD sup conversion). I noticed that whenever the letter g, j, p, q or y were present, the subtitles moved up a bit. I was then able to align them again by correcting the Y-value of each subtitle individually. I now wonder - as this is not feasible wiht my next movie which has close to 2,000 subtitles - if all Y-values could be changed at once.

A new feature could allow for replacing a given Y-value by another Y-value in all subtitles which have this given value. With 5-10 replacment rounds, Y-values which were spread between 880 and 890 could for instance be aligned at 888. Alternatively, a new feature could allow for changing the Y-value of all subtitles by a given value, e.g. by -35 pixels. As a layman when it comes to programming I have no clue how difficult it would be to add such a feature. Regardeless of whether this ever comes to life, I want to thank you for all the hard work you put into this wonderful tool.
layman66 is offline   Reply With Quote
Old 2nd April 2010, 09:54   #691  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Well, in a nutshell you describe the problem of descenders when aligning the lower edge of subtitles to a border.

There was a request earlier to automatically fix this by calculating a mean or median value and then aligning all subtitles to this value to eliminate the jitter. Letting aside that this gets a little more complex since there may be subtitles with 1, 2 and three or even more lines, there is one main problem with this approach: it assumes that the problem is only caused by descenders, but aligning the upper edge to a border would only shift this problem to be one of the ascenders.

While I still guess it would be possible to come up with an algorithm that automatically determines x-height of the font, number of lines and over-/undershoot for plain Latin characters, it would involve quite a lot of work and would most probably fail for special characters, Arabic fonts or whatever. This is the main reason why I didn't try to implement anything like this. The other is that I honestly don't care so much if the subtitles move up or down a little.

Which brings me back to your request. Yes, I could implement such a special feature, but no, I most probably won't. Thinking of a way to reasonably implement this in the GUI would cost me at least a hundred times more of my precious lifetime that implementing the code for it.

Some time ago, I toyed with the idea to implement scripting support for subtitle placement. Anyway, after thinking about it for some time, I realized that there would be nearly no benefit compared to exporting to XML and using a script on the XML part.

To cut a long story short: why don't you export the subtitles to XML, handle the position details there and import the result back in BDSup2Sub? If it's really about replacing y-values, a simple text editor should do. If not, a script in Perl (or whatever you prefer) script to change values within a range to a certain value would only need a few lines of code.
0xdeadbeef is offline   Reply With Quote
Old 12th April 2010, 12:51   #692  |  Link
mrr19121970
Registered User
 
Join Date: Mar 2008
Posts: 305
@layman66, I'll look into this for you. Perhaps I can change the way Clown_SRT2XMLSUB decides the vertical position for you. Better to cure the problem than to try to find a workaround fix.
mrr19121970 is offline   Reply With Quote
Old 13th April 2010, 07:30   #693  |  Link
sporic
Registered User
 
Join Date: Mar 2007
Posts: 29
Can BDSup2Sub do these things:

1) Delete a particular frame?

2) Move are particular frame? For example Frame #100 to position #5?

Thanks.
sporic is offline   Reply With Quote
Old 13th April 2010, 08:36   #694  |  Link
mrr19121970
Registered User
 
Join Date: Mar 2008
Posts: 305
@layman66

The subtitles are aleady lined up in the vertical position. You can use the Vertical tolerance slider to adjust this. If you're still not happy, then you can manually chang all Y values in the XML file before opening in BDSup2SUB

Quote:
<Event InTC="00:13:54:19" OutTC="00:13:58:12" Forced="False">
<Graphic Width="902" Height="178" X="509" Y="872">XML_1_1.png</Graphic>
</Event>
<Event InTC="00:13:58:14" OutTC="00:14:00:16" Forced="False">
<Graphic Width="299" Height="178" X="810" Y="872">XML_2_6.png</Graphic>
</Event>
<Event InTC="00:24:12:22" OutTC="00:24:14:07" Forced="False">
<Graphic Width="310" Height="178" X="805" Y="872">XML_3_10.png</Graphic>
</Event>

Last edited by mrr19121970; 13th April 2010 at 09:31.
mrr19121970 is offline   Reply With Quote
Old 13th April 2010, 16:56   #695  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by sporic View Post
Can BDSup2Sub do these things:
1) Delete a particular frame?
Yes, in the Edit dialog you can check/uncheck the "exclude from export" checkbox. Excluded frames are displayed with a large red cross to show that they won't be exported.

Quote:
Originally Posted by sporic View Post
2) Move are particular frame? For example Frame #100 to position #5?
Not directly. You could however export to XML/PNG and then move one "Event" block to another location (and edit the time). The result can then be imported in BDSup2Sub again.
0xdeadbeef is offline   Reply With Quote
Old 15th April 2010, 14:53   #696  |  Link
sporic
Registered User
 
Join Date: Mar 2007
Posts: 29
What XML editor do use? using wordpad doesn't cut it. somehow cutting and pasting using Wordpad doesn't save formatting. Any recommendations?
sporic is offline   Reply With Quote
Old 15th April 2010, 17:30   #697  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
I used XML Notepad from Microsoft a few times in the past, but usually I use UltraEdit for all my text file editing needs.
There are several free text editors as well of course which feature syntax highlighting etc. for XML, e.g. Programmer's Notepad or Notepad++.
If you can live without the syntax highlighting, also Notepad should do.
0xdeadbeef is offline   Reply With Quote
Old 21st April 2010, 11:57   #698  |  Link
layman66
Registered User
 
Join Date: Mar 2010
Posts: 2
Changing Y-values

@ 0xdeadbeef & mrr19121970

Thanks for your suggestions! First I tried the vertical slider but to no avail. While Y-values in a specific XML-file were all the same for a given slider position, after importing the different XML-files into BDSup2Sub the subtitles were all placed at the bottom of the page, no matter what the slider position was. I don't know what happened. Maybe I chose parameters that were incompatible with BDSup2Sub. However, I then was able to export the subtiltes as XML/PGN-files. With a simple texteditor I replaced the different Y-values with one. After re-importing the edited XML-file into BDSup2Sub, the Y-values were now all the same (identical to the ones in the edited XML-file!). That was indeed quite straight forward. Dunno why I haven't thought of it myself. Thanks again to both of you! Your programs rule!
layman66 is offline   Reply With Quote
Old 25th April 2010, 00:56   #699  |  Link
MikeEby
Registered User
 
Join Date: Apr 2010
Posts: 24
to 0xdeadbeef, Your app does a great job on Avatar.



Mike
__________________
Another EAC3to GUI Plus

Last edited by MikeEby; 25th April 2010 at 01:24.
MikeEby is offline   Reply With Quote
Old 25th April 2010, 21:23   #700  |  Link
d4eRc
Registered User
 
Join Date: Apr 2010
Posts: 4
Your Avatar screen looks nice, I extracted the german forced subtitle as idx/sub, but it only shows up white in VLC. It does not show up at all in mplayer (thats probably another thing - any suggestions anyway?).
Do I have to do something special about colors or do you recommend another subtitle format for mkv-Files?
d4eRc 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 13:11.


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