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 September 2009, 17:00   #561  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
I agree... and I agree more about PGSs were not supposed to be used for 'fancy' animations in the first place.

I wish one of you gifted guys had more time to take a closer look to IGS... (not that there is a free-tool to mux them into a menu m2ts file, but still).

Dean
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 11th September 2009, 17:39   #562  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by deank View Post
I agree... and I agree more about PGSs were not supposed to be used for 'fancy' animations in the first place.
Well, PGS supports things like cropping and palette animations. So fade ins/outs are possible, but simulating this by quickly drawing images with modified alpha is nothing PGS is meant for.

Quote:
Originally Posted by deank View Post
I wish one of you gifted guys had more time to take a closer look to IGS... (not that there is a free-tool to mux them into a menu m2ts file, but still).Dean
Dunno if I'm one of these gifted guys What are you then?
Well, the basic decoding/drawing stuff is very similar to PGS, but the interactivity makes everything much more complicated. Besides: IGS can't be simply converted to/from something else. So what would the input/output be?
0xdeadbeef is offline   Reply With Quote
Old 11th September 2009, 18:25   #563  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Yes, you're one of the gifted guys for sure!

And about IGS... You have:

input:

* Image (active, inactive, action-state)
* Coordiantes in selected plane (1920x1080)
* Actions, associated with active/action states (ordinary navigational commands, used in movieobject.bdmv)

output:

Elementary stream, describing RLE encoded navigational graphics + palette with their attributes (x, y, actions) (max 15 per menu page, tho each page can have multiple 'sub-pages' of IG elements)

Dean
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 11th September 2009, 19:05   #564  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
I meant which input format for a command line tool to create an IGS stream or what output format to convert an IGS stream to. Creating a full featured IGS WYSIWYG editor is surely beyond the scope of any freeware tool.
0xdeadbeef is offline   Reply With Quote
Old 11th September 2009, 19:13   #565  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Okay, then a CLI can handle creation of IGS by accepting a bunch of PNGs/BMPs (like max 15 of them) as input files, reserving space for navigational commands and outputting the elementary stream.

Sure it seams simple, but there is no tool that can do it. Not to say that there is no muxer to mux the IGS (at least at the moment - but I'll think of something).

Dean
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 27th September 2009, 22:03   #566  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Just a suggestion for the GUI and the drop-down with resolutions:

Since you know the bottom right x,y of each subpicture, would you add a semi-detection of the imported .sup so it won't always default to 720x576?

(if y is the bottom right Y coordinate)

Something simple as:

default res=480

(checks performed in this exact order)
y>480 - res=576
y>576 - res=720
y>720 - res=1080

It will be useless to use the width but it may help if bdsup2sub detects widths >720 or >1280 to refine the decisions after y coordinate is processed.
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 27th September 2009, 23:01   #567  |  Link
twazerty
AVCHDCoder developer
 
Join Date: Feb 2009
Location: Oss, Netherlands
Posts: 266
Hello

After some time I decided to use your app in AVCHDCoder. But i am not been able to hook up BDSub2Sub to AVCHDCoder which is also written in java.

I was unable to find the starting point when I add your jar as an external Library. I cannot figure out how to convert a pgs to pgs. (Downscaling)

When I use the commandline version I get other problems. Because you wrapped it as a jar I get the following problems:
Because your commandline gives no information on when it is ready I am unable to detect when the conversion is complete. (BDSub2Sub converts but no progress information)
Techniques like looping and see if the filesize changes doesn't work.

When I wrap you jar into an exe I am also unable to point the main class. The gui shows up with the exe but the commandline doesn't work ('"F:\NetBeansProjects\AVCHDCoder\Tools\BDSup2Sub\BDSup2Sub.exe"' is not recogniz
ed as an internal or external command,
operable program or batch file.)

Maybe some problems are related to the fact that you placed some files in the default package instead of a package. (Always put java files in packages).

As far as my knowledge goes I don't know a solution. Maybe you can help me?

I do have an idea. You can pack your jar (because you have the source) into an exe file as Command Line application. (Launch4j) This way you can use System.out.println() to deliver progress information. Now you also don't have the java -jar problem on 64 bit Vista/7 (Know problem, you have to manually point to javaw in order to use the commandline)

Thanx!
twazerty is offline   Reply With Quote
Old 27th September 2009, 23:51   #568  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
@Dean:
IMHO, there is no way to determinate the target resolution, as it's a user choice. How would I know from looking at the source (which has a known and fixed resolution) which target resolution the user wants to select??? I could maybe make the last choice persistent or add a command line option "/res:keep" (just like for fps), but that's about it.
Or maybe I didn't really understand your request or maybe it's just too late right now.

@twazerty:
The best way to use BDSup2Sub from another Java app would be to use the whole JAR as a library. Then you can import functions from the BDSup2Sub classes like from any other library, e.g.

Code:
import deadbeef.SupTools.Core;
import deadbeef.SupTools.CoreException;
import deadbeef.Tools.Props;
import deadbeef.Tools.ToolBox;
There's JavaDoc for all important Core/Tools classes embedded in the JAR, so you can even integrate the JAR into the Eclipse help system and get online help and code completion. You just need to add the JAR under "Java Build Path->Libraries" and then edit "JavaDoc location" to "JavaDoc in archive, Worspace file" and set the path to the Jar.

This approach is used by "ToNMT UI" AFAIK.

If you need help, I could create an example, but probably not before Tuesday.

Last edited by 0xdeadbeef; 28th September 2009 at 00:15.
0xdeadbeef is offline   Reply With Quote
Old 28th September 2009, 10:08   #569  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Quote:
Originally Posted by 0xdeadbeef View Post
@Dean:
IMHO, there is no way to determinate the target resolution, as it's a user choice. How would I know from looking at the source (which has a known and fixed resolution) which target resolution the user wants to select???
:-P

What I meant to say (and got confused) is to auto-select the source resolution in the drop-down list when loading a sup file and not always default to 720x576. It is not important at all anyway...

I just started looking at .sup format yesterday with an idea for a small cli tool for resizing/repositioning...
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 28th September 2009, 11:17   #570  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Hm, for SUP/IFO, the resolution is read from the IFO as far as I remember - so it's not fixed to PAL, but maybe there's a bug. Also most probably it defaults to PAL if the info from the IFO is inconsistent or missing.
Problem is that I only own PAL DVDs. I'll try to have a look at this with an NTSC sample later this week when I have time.

Or are you suggesting to use the (DVD)-SUP format for higher resolutions? That is a little problematic as - in contrary to SUB/IDX - there is no way to define the resolution explicitly. The IFO only has predefined values for standard resolutions.
0xdeadbeef is offline   Reply With Quote
Old 28th September 2009, 11:42   #571  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
No, I was talking about BD SUP files...

I created a small .cmd file and associated .sup files with it so I can double click a bd sup file and open it in bdsup2sub:

Code:
java -jar d:\multiavchd\tools\bdsup2sub.jar %1
But then everytime I need to manually select the resolution of the input file.

:-)
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 28th September 2009, 15:03   #572  |  Link
twazerty
AVCHDCoder developer
 
Join Date: Feb 2009
Location: Oss, Netherlands
Posts: 266
Quote:
Originally Posted by 0xdeadbeef View Post
....

There's JavaDoc for all important Core/Tools classes embedded in the JAR, so you can even integrate the JAR into the Eclipse help system and get online help and code completion. You just need to add the JAR under "Java Build Path->Libraries" and then edit "JavaDoc location" to "JavaDoc in archive, Worspace file" and set the path to the Jar.

This approach is used by "ToNMT UI" AFAIK.

If you need help, I could create an example, but probably not before Tuesday.
A sample would be helpful.
twazerty is offline   Reply With Quote
Old 28th September 2009, 21:42   #573  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by deank View Post
But then everytime I need to manually select the resolution of the input file.
No, you need to manually confirm the conversion options. Among them is the target resolution. The resolution of the input file can't be selected, as it's read from the BD-SUP.

Quote:
Originally Posted by twazerty View Post
A sample would be helpful.
Hope this helps:
http://www.sendspace.com/file/80y622

This is basically a version from BDSup2Sub which consists only of one base class which uses all the functionality from the JAR. This is the whole Eclipse project folder, but maybe you need to change the properties after moving it to another folder.

Last edited by 0xdeadbeef; 28th September 2009 at 21:53.
0xdeadbeef is offline   Reply With Quote
Old 28th September 2009, 21:52   #574  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
I don't want to waste your time on the subject

What I was trying to say is that when I load a file in BDsup2sub and I'm presented with a window to chose resolution/framerate and other options, but the default (target) resolution is always 720x576.

I was just asking if you can make it honor the input BD-SUP resolution (like you do with the framerate) and have it as default.
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 28th September 2009, 21:54   #575  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
That's why I suggested:

Quote:
Originally Posted by 0xdeadbeef
I could maybe make the last choice persistent or add a command line option "/res:keep" (just like for fps), but that's about it.
0xdeadbeef is offline   Reply With Quote
Old 28th September 2009, 22:10   #576  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
Yes although you can implement /res:keep as default when using the GUI, instead of explicitly using the option.
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 28th September 2009, 22:16   #577  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Honestly, the main reason for the PAL default is that I use BDSup2Sub only to convert BD SUPs to PAL SUB/IDX. So it's unlikely that I will simply default to the input resolution for the target.
Then again, there are probably more clever ways to handle this. I'll try to think of something when I have a little more time. Maybe next weekend or so.
0xdeadbeef is offline   Reply With Quote
Old 29th September 2009, 01:36   #578  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
I too agree that it would be nice to see BDSup2Sub remembering more of my previous selections upon restart: such as resolution and location of source files. I almost never use it for anything aside from converting BD Sup's to 720p sub/idx so it would be nice if the tool remembered that. After some certain point (I can't recall which version) BDSup2Sub defaults to (remembers?) the language I normally select, English, which has been much appreciated.
saint-francis is offline   Reply With Quote
Old 29th September 2009, 11:28   #579  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by saint-francis View Post
I too agree that it would be nice to see BDSup2Sub remembering more of my previous selections upon restart: such as resolution and location of source files.
It should remember the last directory used for importing/exporting files since quite a long time. Works for me.
For the conversion options (like target resolution, target fps, scaleX/Y), I guess I will implement a "Use as default" and "Restore factory settings" button and additionally add the "/res:keep" command line option.


Quote:
Originally Posted by saint-francis View Post
After some certain point (I can't recall which version) BDSup2Sub defaults to (remembers?) the language I normally select, English, which has been much appreciated.
This is probably a misconception. BDSup2Sub reads the language from the input stream (if this is possible) and uses it as default. If the stream doesn't contain any language information (e.g. BD-SUP), it tries to determine the language by looking at the name of the input stream. If it contains e.g. "English", it defaults to English.
0xdeadbeef is offline   Reply With Quote
Old 3rd October 2009, 10:21   #580  |  Link
Kratus
Registered User
 
Join Date: Aug 2002
Posts: 4
Hello there,
I discovered your awesome tool a few weeks ago.
Thumbs up for your great work an level of support!
I use it to move subtites into the 2.35 AR area since I use a scaler to view 2.35 movies to avoid black borders on top and bottom of my screen.
Because it is painful to demux, move subs, remux etc, manually, I wanted to do some automation, the way Clown BD makes it (EAC3->BDSup2Sub->TsMuxeR), using CLI in a batch file.

But (there is allways a but ) I noticed a strange behaviour:
Here is an example with the "Largo Winch" French BR:

1. The GUI way:
- the original sub ist hosted here: http://www.sendspace.com/file/2r8r1f
- using the GUI it works flawlesly, with following parameters:

- it ends up with a correctly processed file, sampled here: http://www.sendspace.com/file/nkgu7n

The problem comes up when I want to use CLI-operation for doing the same task.

2. The CLI way:
- I call BDSup2SUb using the following command-line:
"C:\Program Files\Java\jre6\bin\java.exe" -Xmx256m -jar "D:\BDSup2Sub\BDSup2Sub.JAR" "'D:\HD-RIP\Largo Winch\*.sup' 'D:\HD-RIP\Largo Winch\*.sup' /res:1080 /movin:2.35,24 /verbatim+" >"D:\HD-RIP\Largo Winch\BDSup2SubLog.log"
- and I end up with a corrupted file sampled here: http://www.sendspace.com/file/32zz0p
where the bitmaps appear to have disapeared starting at sub nr 59.

- I hosted the log file here: http://www.sendspace.com/file/tz0rlk

Did I something wrong?
Or is this an issue in BDSup2Sub CLI-support?

Last edited by Kratus; 3rd October 2009 at 10:29.
Kratus 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 08:42.


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