View Full Version : BDSup2Sub - convert and tweak bitmap subtitle streams (VobSub,BD-SUP,BDN XML,HD-SUP)
0xdeadbeef
26th February 2009, 00:39
http://javaforge.com/displayDocument/icon_128.png?doc_id=76805
BDSup2Sub is a tool I wrote initially to convert captions demuxed from a Blu-Ray transport stream (M2TS) into the DVD VobSub format (SUB/IDX) used by many DVD authoring tools - hence the name. Many more features were added over time as was support for other formats. So in the meantime the name seems a little inappropriate. In a nutshell, it's a subtitle conversion tool (for image based formats) with scaling capabilities and some other nice features.
Feedback is welcome - especially from the authors of other tools to discuss compatibility issues.
To report problems with a subtitle stream, please either post the zipped stream (if it is compliant with the forum rules) or upload it to a "one click hoster" and send me a PM with the link. And don't forget a detailed error description.
Supported Formats
Blu-Ray SUP: Import (since 1.0) and Export (since 1.6)
Sony BDN XML: Import and Export (since 3.3.0)
HD-DVD SUP: Import (since 1.9)
VobSub (SUB/IDX): Import (since 3.5.0) and Export (since 1.0)
DVD-SUP (SUP/IFO): import and export (since 3.9.0)
Features
add a fixed delay to all timestamps (since 1.0)
perform a frame rate conversion e.g. for pal speedup (since 1.0)
synchronize time stamps to output frame rate (since 2.0)
edit times and position of each caption (since 2.3)
control all features (except editing) from the command line (since 1.7)
move all captions inside or outside a given area (since 2.7) or horizontally (since 3.9.6)
scale up/down with a variety of filters (from bilinear over bicubic to Lanczos3 and Mitchell) (since 3.4.0)
edit "forced" flags (since 3.6.0)
exclude single captions from export (since 3.6.0)
erase rectangular regions of a caption (since 3.6.0)
scale captions independently of screen size (since 3.7.0)
automatically remove fade in/out from imported subtitle streams
export the target palette in PGCEdit text format (RGB values 0..255) (since 3.9.0)
edit the imported DVD palette when input is either VobSub or SUP/IFO (since 3.9.1)
edit the frame palette and alpha values when input is either VobSub or SUP/IFO (since 3.9.3)
set/clear forced flags for all captions (since 3.9.9)
Documentation
The complete documentation is available from the help menu inside the application. You can also read it online (http://bdsup2sub.javaforge.com/help.htm).
Download
Current version: 4.0.0 (14.12.2009)
http://www.sendspace.com/file/j3df4s
Previous versions:
3.9.9:http://www.sendspace.com/file/4mcnk5
3.9.8:http://www.sendspace.com/file/epw7ng
3.9.7:http://www.sendspace.com/file/k8lcmo
3.9.6:http://www.sendspace.com/file/w5tfal
The download is a JAR archive that needs an installed Java runtime (Java 6 JRE) to run. You can get it from Sun's website:
http://java.sun.com/javase/downloads/index.jsp (e.g. JRE 6 Update 13)
A complete revision history (http://bdsup2sub.javaforge.com/help.htm#Change_History) can be found at the end of the online help.
Usage
With the Java runtime installed, the JAR can be started by double clicking on it. Alternatively, you can start it from the command line via:
java -jar BDSup2Sub.jar
or in Windows if you don't want a open CMD box:
javaw -jar BDSup2Sub.jar
Have fun.
Screenshots
Main screen (source in upper part, target in lower part)
http://javaforge.com/displayDocument/scrn_main.png?doc_id=76807
Conversion dialog with the basic conversion options
http://javaforge.com/displayDocument/scrn_conv.png?doc_id=76804
Edit dialog
http://javaforge.com/displayDocument/scrn_edit.png?doc_id=76808
Move dialog
http://javaforge.com/displayDocument/scrn_move.png?doc_id=76806
BigCondor
26th February 2009, 05:04
Thanks very much for your effort and sharing.
I have tried to convert two sups with your program and it works. I noticed that the results of idx+sub will vary with the size of the original sup (font size of the original).
The first one in the figure is very nice.
The second one, which engages smaller font, the edges are not all correctly marked.(upper image taken from suprip, lower one from .son file)
Selur
26th February 2009, 15:27
any plans to open the source of the tool?
0xdeadbeef
26th February 2009, 17:18
I noticed that the results of idx+sub will vary with the size of the original sup (font size of the original).
Well, of course they do. The smaller the input picture, the smaller the output picture. For OCR purposes, the best choice would be the original picture from the Blu-Ray SUP. Therefore it doesn't make much sense to use the converted low-res picture for OCR. Besides, the subsampling used for antialiasing also contradicts the idea of OCR in a way.
any plans to open the source of the tool?
Not in the sense of a real open source software since it would be a major effort to clean up the sources to a state that they were worth to be publicly released. Then again, as always with my software, if someone kindly asks for the sourcecode, I will share it of course. Just be warned: the sources are quite a mess currently.
Adub
26th February 2009, 19:11
Well, of course they do. The smaller the input picture, the smaller the output picture. For OCR purposes, the best choice would be the original picture from the Blu-Ray SUP. Therefore it doesn't make much sense to use the converted low-res picture for OCR. Besides, the subsampling used for antialiasing also contradicts the idea of OCR in a way.
Yes, but unfortunately, there doesn't exist a "perfect" solution yet for OCRing blu-ray subtitles. Suprip is pretty good, but suffers from a few major bugs here and there.
0xdeadbeef
26th February 2009, 20:30
Well I sure don't intend to add OCR to SupToSub, so all I could offer would be an export to an easy to implement format. E.g. a bunch of GIFs plus a text file similar to the IDX of VobSub. Then maybe someone could set up a scripting tools to convert this to SRT or whatever.
0xdeadbeef
27th February 2009, 01:10
A little update:
26/02/2009 1.0 -> 1.1
-Added progress dialog for import
-Added check for existing target files and write protection
-Added detection of forced subtitles and the possibility to export only forced subs
-Removed some checks from RLE decoding to support some non-standard frames which write to the next line without EOL
-Fixed two small bugs in run length decoding (fixes reading exports from SupRead)
-Support for multi-packet pictures (well, exactly two packets are supported for the moment)
I edited the first posting...
Sorry, another micro update to 1.1b (not visible in GUI) since there was another bug with multi-packet support for SUPs. This should really work for all two-packet SUPs. I'll add unlimited packet support later though no SUP stream seems to use it.
shon3i
27th February 2009, 08:20
Do you think about reverse process? DVD->BluRay?
0xdeadbeef
27th February 2009, 12:27
Not really. Would this make sense?
SquallMX
27th February 2009, 18:34
Not really. Would this make sense?
Yes:), some Bluray titles don't have subtitles that the DVD versión does have, and sometimes de DVD version is better placed or have better font (Warner BR subtitles are placed in the black bars if the movie is 2.35, some of us hate that, and right now there's no way to change the position, the DVD subtitles can be placed inside the 2.35 image itself).
Another petition, an option to resize BR subs from 1080p to 720p, currently it's not possible to have BD5 at 720 with subtitles because no program exist that converts the subs from 1080p to 720p.
:thanks:
woah!
28th February 2009, 02:24
1080 to 720 resizing would be very cool if possible, otherwise it works very well thx :)
0xdeadbeef
1st March 2009, 16:23
The resizing to 720p itself, although a little different compared to the approach used for VobSub, would be easy to implement. Then again, I don't have any SUP writing functionality yet (as well as SUB/IDX Reading). While one might think that it should be easy to implement a writer when you already know the format to implement a reader, the problem is that I can skip a lot of unknown stuff when reading, but have to write it when writing.
Chances are that with all the guessing about these unknown fields I have to do, the written SUP file creates all kind of problems when used with different players.
woah!
2nd March 2009, 01:42
for me it was just that my WD TV HD Media Player plays MKV/SUB/IDX and i encode my blurays down to 720p MKV's for storage on it. i use subrip right now to ocr to srt and this app would save those steps thats all :)
either way your app does a great job thx ..
edit: actually they look pretty good as they are on my tv playing on the WD player :) so thats very cool and saves me alot of work thx :)
0xdeadbeef
2nd March 2009, 02:18
Hm, my only option would be to export 720p SUPs since SUB/IDX doesn't officially support 720p (and I would be surprised if any player could handle it). Then again, I would be surprised to hear that MKV streams can contain SUPs.
So the 720p SUP would only make sense for the use case that SquallMX suggested (converting a 1080p BD to 720p BD5 to save space).
SquallMX
2nd March 2009, 05:47
Hi, i found a little bug, the program crash when i load this Sup file (From Matrix R1 Bluray):
http://rapidshare.com/files/204262182/00005.track_4609.sup
:helpful:
0xdeadbeef
2nd March 2009, 17:54
Hm, this seems to be from an NTSC stream? The screen size is 720x480, therefore the "downsizing" to PAL (which is the default target resolution) fails with a division by zero.
I'm thinking of a workaround - yet this is not really a planned scenario.
0xdeadbeef
2nd March 2009, 20:14
A little update (edited the first post for download)
02.03.2009 1.1 -> 1.2
Reworked SUP multipacket parsing to support unlimited packets (kinda untested though for > 2 packets).
Fixed bug in detection of primary color & luminance thresholds.
Added workaround to prevent crash when loading SUPs in NTSC/PAL resolution.
Note that "upscaling" NTSC to PAL will not change the size of the bitmap, only the offsets.
Also downsizing from PAL to NTSC might fail - I'll have to reconsider this issue later.
Info was not updated when switching output format
Added fixed line feed after even and off RLE buffer since VobSub sometimes skipped the last line
~bT~
3rd March 2009, 03:12
request: is it possible to remember last folder?
also i noticed after loading the above file for matrix, it says, source fps 23.976 dest fps 25?
is that correct? and yes, that was using the latest version.
0xdeadbeef
3rd March 2009, 12:18
While the program is running, it remembers the last folder. However, it doesn't save any ini file yet. This is on my list however.
Regarding the SRC/TRG frame rates: AFAIK the SUP file doesn't contain any info about the frame rate. Therefore, if you want to convert the frame rate, you have to select the source and target frame rates manually. The 23.976 as source and 25fps as target is just the default setting as this is my typical scenario (PAL speedup from 24p). Indeed the source and target frame rates are only used to calculate a speedup/slowdown factor that's used to manipulate the time stamps.
~bT~
3rd March 2009, 16:13
^ sorry. my bad. it was late last night when i posted that and didn't realise the option above which u must tick to enable changing.
saint-francis
3rd March 2009, 17:45
Therefore, if you want to convert the frame rate, you have to select the source and target frame rates manually.
How is this done? I see no option to specify frame rate. Only resolution. I actually see nothing about frame rates at all in your tool.
Fantastic tool BTW. I'm loving it. Thanks for all of your hard work.
0xdeadbeef
3rd March 2009, 17:53
How is this done? I see no option to specify frame rate. Only resolution. I actually see nothing about frame rates at all in your tool.
Changing the frame rate is not visible in the main view. However, when you select "Save" in the file menu, an export dialog pops up where you can set the checkbox for "Change frame rate". If this checkbox is active, the source and target frame rate can be edited and the time stamps will be changed accordingly during export.
saint-francis
3rd March 2009, 18:32
Changing the frame rate is not visible in the main view. However, when you select "Save" in the file menu, an export dialog pops up where you can set the checkbox for "Change frame rate". If this checkbox is active, the source and target frame rate can be edited and the time stamps will be changed accordingly during export.
Gotcha. Thanks.
turbojet
3rd March 2009, 23:57
Hey thanks for the program it's definitely useful however I came across some subs that are misaligned that I reported here (http://forum.doom9.org/showthread.php?p=1257351#post1257351). If you could take a look at it be much appreciated.
0xdeadbeef
4th March 2009, 01:05
How am I supposed to take a look if you didn't post a stream?
Besides, if two different tools which don't share a single line of code, show the same behavior, chances are that the stream is either buggy or uses an undocumented/unknown formatting feature.
Anyway, without a stream, nobody can tell for sure.
~bT~
4th March 2009, 03:25
how do i get the subs to show up in white rather than grey?
turbojet
4th March 2009, 05:57
Here's one of the many streams (http://www.sendspace.com/file/iyrnxf), most sup's I've converted to 720p with BD-RB has shown the problem so I think it would be a pretty common issue. I just found BDSup2Sub earlier today so this is the first.
I think it is issues with the streams like you say, I've seen many strange displays with SupRip over the past year or so but they seemed to ocr ok so I didn't pay much attention to it. But these strange displays play fine in the retail somehow.
0xdeadbeef
4th March 2009, 12:29
Can you name a frame that you think is misaligned in this SUP?
On the first look, the window (WDS) locations and sizes seem to be valid.
BTW: how was this created? It contains DTS info, so it was probably not created with EAC3TO...
hubblec4
4th March 2009, 17:40
i converted some BD.sups and i find a timestamp problem in the sub.idx
some subtitles are shown too long...
sample is here (http://rapidshare.com/files/205270057/BDSUP-idx.rar.html)
load the sub/idx in SubtitleCreater an go to subtitle 135 and you will see what i mean.
Thats not a mistake of SC because during the playback in MPC the subtitle are shown too long.
hubble
turbojet
4th March 2009, 18:30
Can you name a frame that you think is misaligned in this SUP?
On the first look, the window (WDS) locations and sizes seem to be valid.
BTW: how was this created? It contains DTS info, so it was probably not created with EAC3TO...
5, 8, 11-26, 29-40, 42-56, 58, 63-71, 73,75, 77, 81-83, 86-90, 92, 93, 95-101 are all the 'shifted' entries in the first 100.
It was demuxed with tsmuxer I will try eac3to and see if that changes anything.
eac3to threw an error
s06 Writing the destination file failed.
Aborted at file position 2052063232.
0xdeadbeef
4th March 2009, 19:50
@turbojet
Hm, looks like the windows are perfectly centered, but the image is quite a bit smaller than the window in this case (which it usually isn't). Since there is no window in the VobSub format, the image is displayed at the coordinates of the window and thus is shifted left. Problem is that I'm unsure how to handle this case (image smaller than window) in general. Maybe centering is an option, maybe there are flags in the stream that define what to do. I'll have a look.
@hubblec4
This is obviously a problem in the original stream (or created by the demuxer). If you go to frame 134 in BDSUP2Read, it shows an end time stamp "00:00:00:000". This is of course a bad thing to start with.
Since I wanted to add some time stamp inconsistency checking anyway, I might add some auto fix code as well.
0xdeadbeef
4th March 2009, 22:46
Hope I didn't destroy more than I fixed this time. First post is updated again.
04.03.2009 1.2 -> 1.3
x/y ofs from start PCS is used instead of that from the window definition (fixes most misaligned subtitles)
Time stamp inconsistencies are reported and fixed
Swapped checkboxes in export dialog to emphasize the relation between the "Change frame rate" checkbox and the src/trg FPS
Added ini file to store frame size/position and load/save paths. Probably more to follow.
Added upscaling (indeed the scaling algorithm already supported it, only the factors were wrong)
Allowed all output formats for the moment. Dunno where this will take us, but it's worth a try.
Added layout panel that shows the location of the subtitle
Worked a bit on the user interface (less rescaling of components)
Removed warnings about empty palettes since this seems to be pretty common.
All editable fields of export dialog read out again before saving (indeed already done in 1.2)
turbojet
5th March 2009, 04:45
Thanks!
1.3 got rid of the misaligned subs, at the least the ones I had remembered on 3 of 3 sup's so far. I'm considering it fixed and not going to try to remember those other ones that were misaligned. I'll let you know if I see it happen in the future.
One thing I notice in vista x64 is progress bar is very small screenshot (http://i39.tinypic.com/2i1gt4m.png)
hubblec4
5th March 2009, 06:22
Hello
Thanks for the new version.
A new problem i found.
sample (http://rapidshare.com/files/205493213/00005_-_8_-_Subtitle__PGS___German__893_captions.rar.html)
The subtitles are doubled and the first sub has no endtime in the timestamp. the problem i found on SupRead to. Only SupRip load and show the file correctly.
hubble
0xdeadbeef
5th March 2009, 18:32
Well, again, this is more a problem of the stream.
The section sequence of a typical stream looks like this:
PCS(start)/WDS/PDS/ODS/END PCS(end)/WDS/END
In your stream it looks like this:
PCS(start)/WDS/PDS/ODS/END PCS(start)/WDS/PDS/ODS/END PCS(end)/WDS/END
So the whole start sequence including the the palette and RLE compressed bitmap is duplicated, yet with different start times (PTS). IMHO this doesn't make sense since it wastes lots of space. So this is most probably a authoring fault or a problem with the demuxer.
Then again, I think I can add a workaround.
0xdeadbeef
6th March 2009, 00:37
Just a small update, mainly for the last two issues reported.
Hubble/turbojet, could you give it a try and report back?
06.03.2009 1.3 -> 1.4
Tinkered around with progress dialog to solve problems under Vista. Can't test it though.
Added frame/sequence number checks/warnings
Added automatic elimination of double subtitle start frames.
turbojet
6th March 2009, 04:25
I think progress bar looks ok now (http://i41.tinypic.com/nbez68.png) in vista.
Thanks again
hubblec4
6th March 2009, 10:40
Just a small update, mainly for the last two issues reported.
Hubble could you give it a try and report back?
06.03.2009 1.3 -> 1.4
Added automatic elimination of double subtitle start frames.
Well done. it works pretty good. No doubling anymore.
Thank you
hubblec4
6th March 2009, 11:02
Another problem i have found. please look at my sample (http://rapidshare.com/files/205493213/00005_-_8_-_Subtitle__PGS___German__893_captions.rar.html)
After transcoding the time to show this subtitles is very short. Example. Subtitle 78
here is the original length from SupRip:
78
00:08:47,068 --> 00:08:50,820
-Ich heirate.
-Was? Hör auf, ich versteh ihn nicht.
but in the new file.sub/idx (open it in SC)
78
00:08:49,070 --> 00:08:50,822
-Ich heirate.
-Was? Hör auf, ich versteh ihn nicht.
the endtime seems to be correct but the starttime is too late and nobody can read this subtitle in this short time.
hubble
0xdeadbeef
6th March 2009, 12:14
Damnit, how many samples do you actually have ;) ?
I will have a look this evening. However I assume that this is another case of stream inconsistency that SupRip detects and fixes. I just fear that each workaround added might create new problems. Also with all that stream bug fixing I somehow don't find the time to continue core development.
hubblec4
6th March 2009, 12:28
Damnit, how many samples do you actually have ;) ?
its the same sample like the first with the doubling issue.
i hope you can find a solve. then it works perfect. and the 1080p-output for sub/idx is the best feature!!
the subtitles looks like the original.
hubble
manusse
6th March 2009, 13:32
and the 1080p-output for sub/idx is the best feature!!
I didn't even know it was allowed as sub/idx is a DVD format at the origin. Did you test such a sub/idx stream with VobSub when playing a HD stream. Is it working? Is it also working with AviSynth (TextSub)?
Gives me some ideas for SubtitleCreator....
Cheers
Manusse
hubblec4
6th March 2009, 14:48
I didn't even know it was allowed as sub/idx is a DVD format at the origin. Did you test such a sub/idx stream with VobSub when playing a HD stream. Is it working? Is it also working with AviSynth (TextSub)?
Gives me some ideas for SubtitleCreator....
Cheers
Manusse
only i use mkv with subtitle.sub/idx (and sometimes SRT) and VSfilter.
It works very good the subtitles are correct shown and looks like the original. But SC can't shown the subtitles correctly.
Working with AviSynth....I don't know.
hubble
0xdeadbeef
6th March 2009, 17:25
I didn't even know it was allowed as sub/idx is a DVD format at the origin.
Indeed I just added this as an experimental feature since I was (and am) not sure what the different filters/players make of it. But since there's at least one happy customer, I think I'll leave it in ;).
BTW: SubtitleCreator v2.3rc1 seems to have quite some problems with the SUB/IDX files created by BDSup2Sub. With most of the files (which VobSub resync displays ok), SC crashes at the end of the import. Seems to be a System.NullReferenceException in SubtitleCreator.PreviewForm.ReadSUPCompleted().
0xdeadbeef
6th March 2009, 17:53
Another problem i have found.
...
but in the new file.sub/idx (open it in SC)
78
00:08:49,070 --> 00:08:50,822
-Ich heirate.
-Was? Hör auf, ich versteh ihn nicht.
the endtime seems to be correct but the starttime is too late and nobody can read this subtitle in this short time.
Ok, a quick look in the console output shows that this is a tripled start packet. While I thought I fixed it for any number of start packets, my workaround seems to work only for two. I'll have a look.
manusse
6th March 2009, 18:17
BTW: SubtitleCreator v2.3rc1 seems to have quite some problems with the SUB/IDX files created by BDSup2Sub. With most of the files (which VobSub resync displays ok), SC crashes at the end of the import. Seems to be a System.NullReferenceException in SubtitleCreator.PreviewForm.ReadSUPCompleted().
Thanks for the information. I'll try to have a look.
Cheers
Manusse
customer
??? Do you plan to sell your software later?
0xdeadbeef
6th March 2009, 18:28
Thanks for the information. I'll try to have a look.
Great, thanks!
??? Do you plan to sell your software later?
No way. This was supposed to be ironic. Obviously failed ;)
hubblec4
6th March 2009, 20:56
Ok, a quick look in the console output shows that this is a tripled start packet. While I thought I fixed it for any number of start packets, my workaround seems to work only for two. I'll have a look.
When i open a BD.sup with the "doubling-issue" in SupRead. It shows me that the starttime from the first subtitle is the correct time. but it have no endtime. and the second subtitle had the right endtime but the wrong starttime.
so you could try to take the starttime from the first subtitle and the endtime from the second subtitle...maybe
hubble
0xdeadbeef
6th March 2009, 21:25
06.03.2009 1.4 -> 1.5
Fixed redraw bug and reduced memory needed for zoom modes.
Fixed bug that caused wrong start time in case of multiple start packets or missing end packets.
Extended primary color detection to support "white,light grey" in addition to "light grey, dark grey"
Added possibility to edit/save/load Vobsub palettes
Fixed blatant bug in export of forced subtitles which would export the same frames over and over again
Set default alpha threshold to 80
hubblec4
6th March 2009, 22:40
06.03.2009 1.4 -> 1.5
Fixed bug that caused wrong start time in case of multiple start packets or missing end packets.
Wow, i am very impressed. it works now 100%
Great thanks to you.
Where i can find the Logfile to check the warnings?
hubble
hubblec4
7th March 2009, 00:04
one thing again.
in the save-box where i can choose the language: i miss some languages like norwegian etc. ...
can you add this?
hubble
0xdeadbeef
7th March 2009, 00:48
Just a dumb error - exactly half of the languages that ought to be in the list didn't get there. Will be fixed in the next version. I won't release a new version just for this though. But I'm pretty confident that you'll find another issue ;)
~bT~
7th March 2009, 04:02
06.03.2009 1.4 -> 1.5
Fixed redraw bug and reduced memory needed for zoom modes.
Fixed bug that caused wrong start time in case of multiple start packets or missing end packets.
Extended primary color detection to support "white,light grey" in addition to "light grey, dark grey"
Added possibility to edit/save/load Vobsub palettes
Fixed blatant bug in export of forced subtitles which would export the same frames over and over again
Set default alpha threshold to 80
thanks a lot 0xdeadbeef! any way to donate?
0xdeadbeef
7th March 2009, 10:54
thanks a lot 0xdeadbeef!
You're welcome! And there was not even a "but" ;)
any way to donate?
This is a spare time project and mainly driven by my own needs and the fun of it. While I might implement features requested by other people, I might as well decide to ignore such requests. Accepting donations, among a couple of other issues, would put me in a position where I would feel obliged to implement requested features no matter if I want to or have time to. This contradicts the idea of a fun spare time project (at least in my humble opinion).
Kurtnoise
7th March 2009, 11:14
great stuff...:)
May I ask you to add command line support ?
something like:
BDSup2Sub -i input.sup -o output.sub -lang English
:thanks:
0xdeadbeef
7th March 2009, 13:19
It's on my list. There is one big feature I'd like to add first though.
IceM
7th March 2009, 14:14
Nice work!
I did about the same as you did, but I could not manage to fix the vobsubs properly and put the project in the freezer.
If you want I can send you my reader implementation (all written in java). I managed to get quite a bit of info out of it (though, still some options unknown for me). Or we could work together on it? My plan was to make it an open source app... If interested you can drop me a pm or something.
0xdeadbeef
7th March 2009, 19:04
If you want I can send you my reader implementation (all written in java). I managed to get quite a bit of info out of it (though, still some options unknown for me).
I guess my SUP(BD) parser is nearly complete right now and I understand most of the fields. I'd take a SUP-Parser for HD-DVD though ;)
Or we could work together on it? My plan was to make it an open source app... If interested you can drop me a pm or something.
For the moment, this is a one man show. Indeed the project is too small and too "experimental" (other name for "dirty hack") at this time to make sense for shared development. If (and this is a big "IF") I will ever finish the planned core features AND I find the time to restructure and comment the sources to a degree that someone else can make use of them, I plan to release the sources for the common good. I don't think that this will become a big Sourceforge project though. At least it's not planned to become a big"all in one" solution like SubtitleCreator or whatever.
As I already mentioned, I plan to implement only two more bigger feature, where one of them is command line support. Chances are that I'll do only bug fixes after this point.
0xdeadbeef
8th March 2009, 21:52
08.03.2009 1.5 -> 1.6
Added support to write (BD-)SUPs (kinda experimental though, SupRip doesn't like'em). This included a major rework of the program's structure, so I hope I didn't break anything.
Rewrote upscaling function (bilinear: slower, but much better quality)
Fixed: half of the languages in the language selection box were not displayed
While I was at it, I sorted the lower part of the list alphabetically
chros
9th March 2009, 10:33
A long awaited feature was implemented by You!!! Thank You !
I'll try it ...
hubblec4
9th March 2009, 12:47
08.03.2009 1.5 -> 1.6
Added support to write SUPs (kinda experimental though, SupRip doesn't like'em). This included a major rework of the program's structure, so I hope I didn't break anything.
Rewrote upscaling function (bilinear: slower, but much better quality)
Fixed: half of the languages in the language selection box were not displayed
While I was at it, I sorted the lower part of the list alphabetically
thanks for your hard work.
i have tested somthing an found 0 errors.
In the Box "Mode" SUP->SUP better you call this SUP->DVD.SUP maybe
hubble
0xdeadbeef
9th March 2009, 17:01
thanks for your hard work.
i have tested somthing an found 0 errors.
Ah, great. I feared I might have broken something that worked before.
In the Box "Mode" SUP->SUP better you call this SUP->DVD.SUP maybe
It's a "BD-SUP to BD-SUP" conversion actually. As discussed in the online help, it's meant to e.g. convert a BD-SUP from 1080p to 720p. Since BD-SUPs are the only SUPs supported by BDSUp2Sub, I thought this was pretty obvious. I'll edit the history though.
hubblec4
9th March 2009, 17:49
It's a "BD-SUP to BD-SUP" conversion actually. As discussed in the online help, it's meant to e.g. convert a BD-SUP from 1080p to 720p. Since BD-SUPs are the only SUPs supported by BDSUp2Sub, I thought this was pretty obvious. I'll edit the history though.
ok. i understand. thats helpful for the BD-Copy_Community...
I test your new version again and when i found some bugs i report this...
hubble
avivahl
9th March 2009, 20:50
Great work! :)
SquallMX
10th March 2009, 21:09
The program works great :D.
I just have a little request, the option to resize subs to 1440x1080p, it's a Bluray compilant resolution helpful for movies too hard to compress at FullHD 1920x1080p (if you don't want to use 720p).
:helpful:.
Thanks for your hard work.
0xdeadbeef
10th March 2009, 22:43
I just have a little request, the option to resize subs to 1440x1080p, it's a Bluray compilant resolution helpful for movies too hard to compress at FullHD 1920x1080p (if you don't want to use 720p).
I might add this in the next release. But here's the one for today:
10.03.2009 1.6 -> 1.7
BDSup2Sub now also works from the command line. See online help for parameter description.
Some minor tweaks and correction here and there
Optimized RLE encoding for SUPs a little bit (two pixels of the same color don't use RLE code)
Tried to add some better (?) fake time stamps to the ODS/WDS/PDS/END packets.
0xdeadbeef
11th March 2009, 23:40
Me again...
11.03.2009 1.7 -> 1.8
Fixed bug in the palette conversion introduced in r1.6 that could lead to artefacts on the left side of the subpic (SUB/IDX export only)
Fixed wrong alpha threshold default in command line version (SUB/IDX export only)
Introduced new resolution 1440x1080
SquallMX
12th March 2009, 02:16
Me again...
11.03.2009 1.7 -> 1.8
Fixed bug in the palette conversion introduced in r1.6 that could lead to artefacts on the left side of the subpic (SUB/IDX export only)
Fixed wrong alpha threshold default in command line version (SUB/IDX export only)
Introduced new resolution 1440x1080
:thanks: You're amazing, thanks for make this incredible program!!!
0xdeadbeef
13th March 2009, 13:52
13.03.2009 1.8 -> 1.9
Added support for reading HD-DVD SUPs (I own only one HD-DVD, so chances are it won't work with many HD-DVDs)
The same selectable values appear in the ComboBox for source and target FPS (still can be edited)
Reworked online help a little bit (working Hyperlink to Doom9 thread and copy to clipboard functionality)
Renamed Mode/Format ComboBoxes to "Output Format" and "Output Resolution"
Fixed wrong display of target image size (introduced in r1.6)
rack04
13th March 2009, 14:41
Does anyone have a sample m2ts with subs they wouldn't mind sharing?
turbojet
13th March 2009, 15:10
Thanks for the sup to sup conversion however I haven't gotten them to display while playing when muxing with tsmuxer. I've tested both resizing and not resizing, powerdvd 8 and mpc-hc. The sup I posted earlier also shows this issue. Could you look into this?
SupRip before the rewrite (I think it was 1.10 or earlier) handles these same sup files ok except some characters are skipped over and I gave up tweaking suprip after about 10 minutes. SupRip versions after rewrite crash on these files but I've seen this happen quite often with the later versions.
Also any chance of a wildcard string for input via command line?
e.g. java -jar bdsup2sub.jar C:\sups\* /res:720 would resize all sup files in C:\sups\ to 720 and adding 720 to each filename during output
rack04: there's an example .sup I posted in this thread from a full movie you can mux that with any video as a test if that's what you are looking for.
p.s. as megaupload seems to be gaining popularity is there any specific reason for preferring it with a silly captcha and wait times, which reminds me of old rapidshare without the speed limiting which raipdshare still has, over one without all this extra stuff like sendspace or mediafire?
0xdeadbeef
13th March 2009, 15:32
Thanks for the sup to sup conversion however I haven't gotten them to display while playing when muxing with tsmuxer. I've tested both resizing and not resizing, powerdvd 8 and mpc-hc. The sup I posted earlier also shows this issue. Could you look into this?
Indeed I fear that this is an issue of the PTS/DTS time stamps. While I would assume that all the image related data in the exported SUPs should be ok as should the PTS time stamps of the display start and stop commands packets (PCS), I kinda don't know how to recreate the PTS (and DTS?) time stamps of the other packets (WDS, PDS, ODS and so on). I don't really know why a Muxer would need these time stamps and can only assume that it's possible to detect the frame rate of the SUP stream via packet size/time stamp calculations. It's kinda weird though to not implement a fall back if this fails. It's no like HD-DVD-SUPs or SUB/IDX files would have this kind of information.
SupRip before the rewrite (I think it was 1.10 or earlier) handles these same sup files ok except some characters are skipped over and I gave up tweaking suprip after about 10 minutes. SupRip versions after rewrite crash on these files but I've seen this happen quite often with the later versions.
All my trials with SupRip ended in SupRip simply ignoring my SUPs without the slightest hint why it does so. Any kind of output would help. Heck, I even tried to dig myself though these Delphi sources, but I couldn't even find a single line of code that seems to be related to BD-SUP decoding.
Also any chance of a wildcard string for input via command line?
e.g. java -jar bdsup2sub.jar C:\sups\* /res:720 would resize all sup files in C:\sups\ to 720 and adding 720 to each filename during output
I'll put it on my list. I'd prefer a syntax like this though:
java -jar bdsup2sub.jar C:\sups\*.sup c:\sups\*_720.sup /res:720
p.s. as megaupload seems to be gaining popularity is there any specific reason for preferring it with a silly captcha and wait times, which reminds me of old rapidshare without the speed limiting which raipdshare still has, over one without all this extra stuff like sendspace or mediafire?
There's no special reason to use MegaUpload apart from the fact that it seemed to be popular, simple and fast (enough). Any suggestions?
turbojet
13th March 2009, 16:18
Maybe you could compare what BDSup2Sub at 720p outputs from the sup I uploaded earlier to what BD-Rebuilder outputs at 720p (http://www.sendspace.com/file/e8ohwr) to help debug it? (beware that BD-Rebuilder has bad alignment while BDSup2Sub has good alignment)
Even a lot of retail sups I've tried crash the latest SupRip versions, have you tried SupRip 1.01 or earlier?
Your wildcard suggestion makes more sense.
Sendspace (http://www.sendspace.com/) I prefer these days, it seems to have very good routing throughout the world and no captcha, wait, speed limit (it says it does but it doesn't), 300 MB max file size, basic online file manager and a standalone app that supposedly can resume and upload multiple files but I've never tried it.
Mediafire (http://www.mediafire.com/) is another good one but it has a popup window, 100 MB file limit (if it ever matters), not the greatest routing, probably < 95% uptime, and it has just a basic online file manager. I've come across some other ones that are 'clean' but I can't remember the names.
0xdeadbeef
13th March 2009, 19:53
Maybe you could compare what BDSup2Sub at 720p outputs from the sup I uploaded earlier to what BD-Rebuilder outputs at 720p (http://www.sendspace.com/file/e8ohwr) to help debug it? (beware that BD-Rebuilder has bad alignment while BDSup2Sub has good alignment)
I don't need to take that indirection as I can simply load any SUP, export it and compare both versions. Unfortunately, the matter is a little more complex than it might seem. See also here: http://forum.doom9.org/showthread.php?t=145654
Besides, BD-Rebuilder cheats around this issue by not touching any important data at all. It only patches the screen size and offsets and doesn't even touch the image data. Since it doesn't change any package length with this attempt, it doesn't need to recalculate the PTS/DTS time stamps and simply copies them. Anyway, this of course means that the subtitles appear quite a bit larger in a downscaled 720p, because they are scaled up together with the video picture.
Even a lot of retail sups I've tried crash the latest SupRip versions, have you tried SupRip 1.01 or earlier?
Apart from the fact that I mixed SubRip and SupRip, I think I know what crashes SupRip, but I honestly think that this is an issue with the RLE decoding there (accepts EOL only if the line is complete - which contradicts the idea of RLE compression). So while I think I could change my exports to satisfy SupRip, I'd rather see SupRip fixing this issue.
turbojet
14th March 2009, 06:50
Yup BD Rebuilder texts are huge after resizing to 720p which is annoying, hopefully that's fixed soon.
Ya I agree that it's SupRip's responsibility to fix it as the issue goes way beyond BDSup2Sub output. My current fix is to not upgrade, unfortunately this is a fix that is becoming more and more common these days with various software.
SquallMX
15th March 2009, 08:00
13.03.2009 1.8 -> 1.9
Added support for reading HD-DVD SUPs (I own only one HD-DVD, so chances are it won't work with many HD-DVDs)
The same selectable values appear in the ComboBox for source and target FPS (still can be edited)
Reworked online help a little bit (working Hyperlink to Doom9 thread and copy to clipboard functionality)
Renamed Mode/Format ComboBoxes to "Output Format" and "Output Resolution"
Fixed wrong display of target image size (introduced in r1.6)
Hi, is this a bug?, MKVMerge fails to load some parts of the subtitles created with BDSup2Sub:
Original Sub:
http://rapidshare.com/files/209412308/BRSup.rar
IDX/VobSub:
http://rapidshare.com/files/209412099/VobSub.rar
MKVMerge Error Code:
Warning: spu_extraction_duration: Encountered broken SPU packet (next_off < start_off) at timecode 00:55:09.556. This packet might be displayed incorrectly or not at all.
Warning: spu_extraction_duration: Encountered broken SPU packet (next_off < start_off) at timecode 01:07:35.676. This packet might be displayed incorrectly or not at all.
:thanks::helpful:
saint-francis
15th March 2009, 15:41
Same here.
http://forum.doom9.org/showthread.php?t=145416
I thought it was an issue with mkvmerge.
It doesn't seem to affect playback though.
SquallMX
15th March 2009, 16:48
Same here.
http://forum.doom9.org/showthread.php?t=145416
I thought it was an issue with mkvmerge.
It doesn't seem to affect playback though.
In my case, subtitles for that timecode don't appear (if I load the subtitles has external subs in MPC they work fine), everything else works perfectly.
0xdeadbeef
15th March 2009, 19:17
Hm, I converted the "Spanish.sup" and loaded it into SubtitleCreator. Can't see any overlaps there. Can you? Does any other SUB/IDX tool display overlaps?
Then again, this problem might be related to the fact that BDSup2Sub currently is a little relaxed when it comes to creating time stamps. Indeed, BDSup2Sub currently doesn't care for the target frame rate and simply uses a millisecond time stamp, no matter what the output frame rate is.
A multiplexer might stumble over this as the timestamps (and display durations) are supposed to be multiples of a frame duration. If they are not, rounding up an end time and rounding down a start time to the next multiple of the frame duration might indeed lead to the same value of start and end. Which however is still no overlap.
Anyway, I already started reworking BDSup2Sub to always work with the 90KHz time ticks and synchronize the time stamps to the target frame rate. I'm not completely convinced though that this will resolve this issue in all cases (especially when there's also a speed up/down involved).
rack04
16th March 2009, 17:08
I haven't had any luck converting .sup to .idx using the command line. Here is the command line that I'm using:
java -jar "C:\Program Files\BDSup2Sub\BDSup2Sub.jar" "C:\Personal\Videos\DELSCENE1.sup" "C:\Personal\Videos\DELSCENE1.idx" /lang:en /res:480
Using this command line I get ERROR: File C:\Personal\Videos\DELSCENE1.sup is not a valid BD SUP stream.
However if I use the user interface I'm able to convert the .sup to .idx no problem.
0xdeadbeef
16th March 2009, 17:47
Yeah, I kinda forgot to remove the file check for the command line interface. So it still blocks HD-DVDs from the command line. Will be fixed in the next release.
0xdeadbeef
17th March 2009, 00:01
16.03.2009 1.9 -> 2.0
SUP: palette is only exported up to the highest entry actually used (previous versions always exported 256 entries)
Increased resolution of all internal time stamps to 90kHz (was 1kHz)
During export, start/end time (or start/delay) are synchronized to the target frame rate (special handling for PAL, NTSC and 24P)
HD-DVD SUPs were refused from the command line: fixed.
New frame rate: 23.975Hz. equal handling of frame rates for command line and export dialog (e.g. aliases)
Frame rate info is written into the PCS headers of created BD-SUPs (and read for src fps detection)
Wildcard support for command line (read online help for details)
0xdeadbeef
17th March 2009, 02:37
Regarding the MKVMerge issue, I got a little more insight what causes this problem. Indeed MKVMerge doesn't complain about a time overlap, but about a "wrong" offset. This seems to happen for each subtitle that doesn't fit into one 0x800 bytes packet and thus uses an RLE buffer split over multiple (usually 2) packets.
While I'm not so keen to claim that there is no chance that I messed something in my implementation, chances are that MKVMerge doesn't consider multi-packets at all. At least the fact that VobSync is able to decode the multi-packet subtitles created by BDSup2Sub hints that the command buffer and the offset can't be that wrong. Besides, I'm pretty sure I saw multi-packet subtitles displayed correctly when used to create a DVD.
So this might be an issue of MKVMerge. I'm not yet 100% sure though.
SquallMX
17th March 2009, 04:20
Thanks for the update and the research, you're right, only MKVMerge has problems with the subs, others VobSub programs works fine (VobSub, DirectVobSub, MPC Subtitle Module, SubSync, etc).
:thanks:
turbojet
17th March 2009, 06:04
Thanks for the update and uniterrupted download of it.
I tried the wildcard cli: java -jar BDSup2Sub.jar "'00001*.sup' '*-bbsup2sub.sup /res:720"
and I got
OPTION: set resolution to 720p (1280x720)
Exception in thread "main" java.lang.NullPointerException
at BDSup2Sub.main(BDSup2Sub.java:313)
I tried with spaces (added ') and without spaces in path and also outputting to *.sub and also without resziing maybe I'm missing something?
Also exported sups (1080 and 720) are displaying correctly now in mpc-hc and powerdvd, great work!
0xdeadbeef
17th March 2009, 12:24
I tried the wildcard cli: java -jar BDSup2Sub.jar "'00001*.sup' '*-bbsup2sub.sup /res:720"
You don't need the single quotes here at all since the file names don't contain any space. So the following should do as well:
java -jar BDSup2Sub.jar "00001*.sup *-bbsup2sub.sup /res:720"
If you need the single quotes (due to spaces in file names), they have to be around a filename, not around filename+parameter. I'll improve syntax checking in the next version though to avoid the exception.
turbojet
17th March 2009, 15:39
With same files but no space in path I tried: java -jar BDSup2Sub.jar "00001*.sup *-bbsup2sub.sup /res:720"
and the same error popped up
I also tried: java -jar BDSup2Sub.jar "00001*.sup *-bbsup2sub.sup" /res:720
and got: ERROR: No extension given for target /res:720
0xdeadbeef
17th March 2009, 18:07
Ok, it has nothing to do with single quotes. It's just that I always tested with the source files in a path. So I overlooked that no path inside the source file name results in a null pointer exception.
Until I fix this in the next release, use the following workaround:
java -jar BDSup2Sub.jar ".\00001*.sup *-bbsup2sub.sup /res:720"
turbojet
17th March 2009, 18:18
Thanks that works, that's not a bad way to do it especially for people with linux experience.
0xdeadbeef
17th March 2009, 19:56
While we're at it, there are some restrictions to the characters that the wildcard will replace. Indeed more or less only alphanumeric characters (and ".") are supported. I guess I will switch to a more relaxed regular expression for the next release, bur for the moment, special characters like "(){}[]!%&§#~" etc. are not matched by the wildcard.
I also made some progress regarding the MKVMerge issue. Indeed it's really a bug in BDSup2Sub. It happens only for subtitle frames where the RLE data would fit into 0x800 bytes, but due to the control header, a 2nd packet is needed. In this case, the overall packet length is wrong which is exactly what MKVMerge reports (if you know how to take it). VobSub Resync seems to be pretty relaxed about this and SubtitleCreator crashes when it tries to show such a subtitle. I have also at least one report that hints that this could lead to problems with standalone DVD players.
-> Will be fixed in next version.
hubblec4
17th March 2009, 21:36
I also made some progress regarding the MKVMerge issue. Indeed it's really a bug in BDSup2Sub. It happens only for subtitle frames where the RLE data would fit into 0x800 bytes, but due to the control header, a 2nd packet is needed. In this case, the overall packet length is wrong which is exactly what MKVMerge reports (if you know how to take it). VobSub Resync seems to be pretty relaxed about this and SubtitleCreator crashes when it tries to show such a subtitle. I have also at least one report that hints that this could lead to problems with standalone DVD players.
-> Will be fixed in next version.
Thats sounds really good. Thanks again for your hard work!
I had converted some BD.sups and found another issue.
in the idx-file i found some entries like this:
timestamp: 01:26:34:439, filepos: 000ce2000
timestamp: 00:00:00:000, filepos: 000ce3800
timestamp: 01:26:39:444, filepos: 000ce6800
timestamp: 01:26:40:486, filepos: 000ceb800
thats the last 4 entries!
in another case:
timestamp: 01:26:37:775, filepos: 000cdc000
timestamp: 01:26:41:613, filepos: 000cdf000
timestamp: 00:00:00:000, filepos: 000ce2000
timestamp: 00:00:00:000, filepos: 000ce4000
i think this entries are to much.
hubble
sample (http://rapidshare.com/files/210564392/subs.rar.html)
0xdeadbeef
17th March 2009, 22:25
Approval may take a while, better use Sendspace or whatever. Then again I had enough for today anyway.
17.03.2009 2.0 -> 2.1
Fixed: usage of wild card from the command line would cause exception when source file name didn't contain a path
Fixed: wrong VobSub packet size if only the control header was shifted to the next packet, but the first packet was not completely filled.
Fixed: delay can be entered in milliseconds again. It's adjusted to target frame rate automatically.
Added command line parameter "/dly" to define a delay
Added target frame rate auto detection for command line
Changed command line parameter "/fps" to allow setting of only the target frame rate
turbojet
18th March 2009, 00:12
Wildcards are working as documented in the help now thanks again.
Without really bloating the cli help do you think wildcard usage could be added?
hubblec4
18th March 2009, 06:14
17.03.2009 2.0 -> 2.1
Fixed: wrong VobSub packet size if only the control header was shifted to the next packet, but the first packet was not completely filled.
this fix is ok. mkvmerge shows no warnings anymore.
but the 00:00:00-timestamp-entries are there.
thats the last entries in the idx-file(BDSup2sub v.2.1)
timestamp: 01:26:34:355, filepos: 000ccb800
timestamp: 00:00:00:000, filepos: 000cce800
timestamp: 00:00:00:000, filepos: 000cd1000
timestamp: 01:26:41:446, filepos: 000cd6000
timestamp: 01:26:41:613, filepos: 000cd8800
timestamp: 00:00:00:000, filepos: 000cdb000
timestamp: 00:00:00:000, filepos: 000cdc800
its possible to delete this entries automaticly?
sample (http://rapidshare.com/files/210567462/00116_-_31_-_Subtitle__PGS___French__1670_captions.rar.html)
hubble
0xdeadbeef
18th March 2009, 12:19
Invalid timestamp are usually corrected by BDSup2Sub. There are obviously special circumstances here that I need to examine.
It's also possible that I broke this correction (partly) in 2.0 or 2.1. It basically still works though, as I tested several SUPs with invalid time stamps before I released 2.1.
We'll see when I get back from work and can have a look at your samples.
[Edit]
Ok, let's say it will be fixed in the next release ;)
0xdeadbeef
18th March 2009, 22:48
Only one little change this time:
18.03.2009 2.1 -> 2.2
Fixed: missing end times were not handled correctly.
hubblec4
19th March 2009, 08:16
Only one little change this time:
18.03.2009 2.1 -> 2.2
Fixed: missing end times were not handled correctly.
thanks. now i think works the converting perfect!!
question: sometimes is the time too short for showing the subtitles.
is it possible manuelly change the start- and endtime in your tool? :-)
hubble
Mtz
19th March 2009, 08:31
I don't think that is possible. But maybe to add some check if a subtitle have duration under 1 second (23 frames), to automatically extend the duration to at least 23 frames for any subtitle, but with the caution to not overlap the timmings with the next one.
enjoy,
Mtz
hubblec4
19th March 2009, 08:51
ok but i hope 0xdeadbeef can find a way to implement this feature. because SubtitleCreater doesnt support 1080p.sub/idx-files at the moment.
hubble
0xdeadbeef
19th March 2009, 12:19
Editing the times/position is not really planned currently as it would involve a redesign of several program parts.
Detecting too short subtitles is something I thought about some time ago but simply forgot.
I'd like to output a warning as default and fix the length only if it's selected via (export) menu.
0xdeadbeef
22nd March 2009, 15:29
Ok, let's say I changed my mind about editing ;)
Anyway, this release includes a major internal rework, so chances are again that I broke some things here and there.
I kinda wished I had used a more sensible system of revisions from the beginning, but indeed I never planned to include half of the features that are in now.
One good thing about the world economic crisis you might say as major parts of BDSup2Sub were written during forced vacations and short-time work.
22.03.2009 2.2 -> 2.3
Split export dialog into conversion dialog and export dialog.
Completely reworked the time stamp check. It's done at import now, not at export
Also the source time stamps are not altered any more to fix missing/invalid times.
Added edit dialog to change offsets and timestamps
Added check/fix possibility for very short display durations. Also new command line option "/tmin".
Automatic selection of language for SUB/IDX export if filename contains language name (e.g. "spanish")
hubblec4
22nd March 2009, 21:31
22.03.2009 2.2 -> 2.3
Split export dialog into conversion dialog and export dialog.
Completely reworked the time stamp check. It's done at import now, not at export
Also the source time stamps are not altered any more to fix missing/invalid times.
Added edit dialog to change offsets and timestamps
Added check/fix possibility for very short display durations. Also new command line option "/tmin".
Automatic selection of language for SUB/IDX export if filename contains language name (e.g. "spanish")
wow amazing. it looks so good.
i will test it in the next time.
so i need no more another programm to convert my BD.sups!
GREAT THANKS TO YOU.
hubble
hubblec4
22nd March 2009, 21:38
22.03.2009 2.2 -> 2.3
Automatic selection of language for SUB/IDX export if filename contains language name (e.g. "spanish")
ok this feature are very bugy. german, english and turkish works correct but all other language not. when i want save the file it shows me ever French(fr).
test it with:
Thai
Portuguese
Spanish
Polish
Icelandic
Hungarian
Hebrew
Modern Greek
Czech
hubble
hubblec4
22nd March 2009, 21:46
00001 - 12 - Subtitle (PGS), Czech, 627 captions.sup
00001 - 13 - Subtitle (PGS), Modern Greek, 629 captions.sup
00001 - 14 - Subtitle (PGS), Hebrew, 634 captions.sup
00001 - 15 - Subtitle (PGS), Hungarian, 628 captions.sup
demux by eac3to3.14 (switch, -demux)
hubble
0xdeadbeef
22nd March 2009, 21:48
Works for me!?
hubblec4
22nd March 2009, 21:58
Works for me!?
mmh sorry for me not:confused:
0xdeadbeef
23rd March 2009, 00:12
This leaves me puzzled. I tried with about ten different languages. No matter what I do, the language pre-selection works like it is supposed to.
Can anybody else confirm a problem with this feature???
alc0re
23rd March 2009, 00:31
Converted .sup from get smart bluray to 720p...muxed with tsmuxer, played on my panasonic bd35 bluray player. No subtitles shown. :(
Back to using suprip for now I guess.
0xdeadbeef
23rd March 2009, 00:59
Well, I would mostly blame the person who decided to include all that damn additional PTS and DTS stuff in the BD-SUPs. Compared to HD-DVD-SUPs, BD-SUPs are really a complete mess and obviously most authoring tools are kinda broken too if you look at all the garbage and redundancy that can be found in a typical BD-SUP.
Anyway: as long as nobody answers my according thread how to exactly calculate these various additional PTS and DTS timestamps, there's nothing I can do about this.
Most probably however, nobody (except the TsMuxer guys maybe) can answer this question at all because IMHO it's the muxer that has to fix all the time stamps of the muxed streams. All it should care about regarding the SUPs are the timestamps for start and end - which are correct almost certainly in the SUPs created by BDSup2Sub. If the Muxer can do this for SRT subtitles, I can't see any reason why it shouldn't be able to do this with BD-SUPs as well.
~bT~
23rd March 2009, 01:42
Can anybody else confirm a problem with this feature???
yes i can confirm. tried with hellboy and king kong so far.. ger is being detected always even tho it should be eng.
0xdeadbeef
23rd March 2009, 01:50
Was there an "english" in the name(s) at all? "tried with Hellboy" doesn't really tell that much.
Again: what this feature does is simply scan the input file name for one of the integrated language names ("Spanish", "English", "German", "Norwegian" etc.). If there is no language given in the file name or if it's misspelled, then there's nothing to detect.
~bT~
23rd March 2009, 02:00
^ my bad. it works as intended :)
Pati
23rd March 2009, 14:52
Many many thanks 0xdeadbeef for this very useful tool!
However, I do have a problem with the subtitles of one HD-DVD I want to convert to Blu-Ray. Or actually two problems:
1) All the subtitles show all black (or rather, they show nothing).
2) All the subtitles have a duration of 28ms. The starting times seem to be correct, though.
Since the log of BDSup2Sub displayed offsets to the SUP file (a very useful feature, thanks for that!), I managed to do some debugging of this problem with a HEX editor. This is what I found:
1) The subtitles seem to show only black because all "Alpha Info" buffers/tables are filled with hex code 0xFF, instead of 0x00 like in a working HD-DVD SUP file I tested. I tested what happens if I just clear the buffer (rewrite 0x00 over all the 0xFFs), and after I did that to the first subtitle and reloaded the SUP file into BDSup2Sub, the first subtitle showed up fine. I tried the same thing to the second subtitle and that showed up fine as well.
It looks to me like 0xFF should be handled similarly to 0x00 in Alpha Info table. No tool I tried (BDSup2Sub, SUPRead and SupRip) seemed to do this, though. I don't understand *why* 0xFF should be the same as 0x00, but at least that way the subtitles seem to be shown correctly. Also ,it looks like I am not the only one that has encountered this problem: http://forum.doom9.org/showthread.php?p=1255086#post1255086
2) I also compared the timestamps of my problem SUP with a working SUP file, and found out that the timestamp hexcodes of my problem SUP are like this:
#1
DCSQ start ofs: 0x00002af9 (00:00:55:026) 00 00 00 00 2F 09 01
DCSQ stop ofs: 0x00002f13 (00:00:55:054) 00 02 00 00 30 11 84
#2
DCSQ start ofs: 0x000066f0 (00:00:57:262) 00 00 00 00 2D 88 01
DCSQ stop ofs: 0x00006b0a (00:00:57:290) 00 02 00 00 2E 90 84
However, in a HD-DVD SUP file that seems to give correct durations, the timestamps are as follows:
#1
DCSQ start ofs: 0x00001879 (00:23:00:718) 00 00 00 00 1C 89 01
DCSQ stop ofs: 0x00001c93 (00:23:02:157) 00 7E 00 00 1C 89 02
#2
DCSQ start ofs: 0x00005148 (00:37:22:579) 00 00 00 00 38 BC 01
DCSQ stop ofs: 0x00005562 (00:37:25:918) 01 25 00 00 38 BC 02
I don't quite understand the timestamp format, but it seems like there is an increment part and a base part, and looks like BDSup2Sub only handles the increment part.
(That working example is from a HD-DVD forced subtitles SUP file which only contains 5 subtitles events, which made it nicely compact for my tests :-)
Would it be possible for you to fix BDSup2Sub to handle this problem HD-DVD SUP file correctly? I suppose I could code a program that will preprocess my problematic SUP file, but I'm sure it would benefit many others as well if you could fix BDSup2Sub instead!
Thanks a lot for reading this far, and again thanks for BDSup2Sub!
Pati
Freddy68
23rd March 2009, 15:02
Hi I am new to this forum, I've been using BD RB 2003 . I dont know if this is the right thread to post this question, but I have some hddvd movies that I've converted to bluray using HDBR Extractor and then TS Muxer 1.3.4. and I've been succesful as far as video and audio. But when it comes to subs, after I do HDBR extraction I have to use SupRead to export the subs in an acceptable container so TS Muxer is able to recognize it and convert it to bluray. After that is done, when I burn it, the video flashes when the subs appear and this happens back and forth. Let me remark that if I do the conversion without the subs everything plays perfectly. It only happens when I try to convert from Hddvd to bluray with the subtitles. Can someone help me on this?
0xdeadbeef
23rd March 2009, 18:13
1) The subtitles seem to show only black because all "Alpha Info" buffers/tables are filled with hex code 0xFF, instead of 0x00 like in a working HD-DVD SUP file I tested.
That's because HD-DVD uses an inverted logic for alpha values. 0xff is fully transparent and 0x00 ist fully opaque while usually (RGBA, but also BD-SUP) it's vice versa. A typical HD-DVD uses a fully transparent color as background color and fully opaque colors for the text. Values in between are used for anti-aliasing.
I tested what happens if I just clear the buffer (rewrite 0x00 over all the 0xFFs), and after I did that to the first subtitle and reloaded the SUP file into BDSup2Sub, the first subtitle showed up fine. I tried the same thing to the second subtitle and that showed up fine as well.
Not surprising, but this just goes to show that the subtitles are completely transparent in the original stream. Maybe a demuxer author thought that this was a good idea or maybe the stream is defective. Hard to tell.
It looks to me like 0xFF should be handled similarly to 0x00 in Alpha Info table. No tool I tried (BDSup2Sub, SUPRead and SupRip) seemed to do this, though.
Of course they don't, since this would disable transparency and would be plain wrong.
I don't understand *why* 0xFF should be the same as 0x00, but at least that way the subtitles seem to be shown correctly.
As I said, this is either a demuxer "feature" (most probable) or a corrupt stream (less likely) or maybe (but highly unlikely) there is some unknown bit somewhere that tells to not allow transparency at all. Anyway, treating 0xff just like 0x00 is wrong for sure.
2) I also compared the timestamps of my problem SUP with a working SUP file, and found out that the timestamp hexcodes of my problem SUP are like this:
#1
DCSQ start ofs: 0x00002af9 (00:00:55:026) 00 00 00 00 2F 09 01
DCSQ stop ofs: 0x00002f13 (00:00:55:054) 00 02 00 00 30 11 84
The first word at the given offset is the time offset to the PTS for the start/stop display commands. The start display offset is 0, so the subtitle is displayed at the PTS (this is typical). The stop display offset is 0x0002, which is 2*1024/90000 seconds or 22.756ms after the start command. This is obviously crap. Could be a demuxer bug or whatever. The displayed duration of 28ms is due to frame rate synchronization btw.
I don't quite understand the timestamp format, but it seems like there is an increment part and a base part, and looks like BDSup2Sub only handles the increment part.
As I said, the start/stop commands define a time offset based on the PTS. Though I don't think that's what you implied.
Anyway, most obviously BDSup2Sub handles both correctly, else every frame for every HD-DVD-SUP would have a zero duration or would start at the same (zero) time.
Would it be possible for you to fix BDSup2Sub to handle this problem HD-DVD SUP file correctly?
If the stream is broken (and I'm pretty sure it is), there is no "correct" way to handle it. You're asking for a hack, not for a correction.
This being said, it's hard to impossible to automatically fix every possible defective stream. Anyway, to investigate an issue, I need the stream and I need to know how it was created.
E.g. if the inverted alpha was a common problem, I could add a hack for this (e.g. menu option "invert alpha"). As I said, maybe (but not very likely) it's even a feature of the stream but that's impossible to tell without any data to investigate.
About the timestamps: maybe this is an issue of multiple stop command as BD-SUPs are ridden by multiple start packets. Again: if I had the stream, I could have a look. Then again, maybe the stream is just bollocks since it was created by a buggy demuxer.
I would propose to extract the SUP again with a current version of either EAC3TO or TSMuxer and post it here (or better upload it anywhere and send me a PM) if it still gives you problems.
BTW: with BDSup2Sub 2.3 you can edit the display duration and can even force a minimum display duration of e.g. 2000ms.
Pati
23rd March 2009, 20:54
If the stream is broken (and I'm pretty sure it is), there is no "correct" way to handle it. You're asking for a hack, not for a correction.
This being said, it's hard to impossible to automatically fix every possible defective stream. Anyway, to investigate an issue, I need the stream and I need to know how it was created.
....
I would propose to extract the SUP again with a current version of either EAC3TO or TSMuxer and post it here (or better upload it anywhere and send me a PM) if it still gives you problems.
Thanks for a reply!
Sorry if I implied that BDSup2Sub was broken and needed a fix (that was not my intention, although reading my message again it does look like that). I am indeed after a "hack" that would allow me to use this broken SUP file.
I can upload it somewhere tomorrow (it is late here at the moment) so you can take a look at it. I tried all the tools I could find (and latest versions of all) to extract the stream, and all of them gave a similar result (and one tool, could have been EVODemux, complained about the original stream containing authoring errors). So I don't think the problem is the way I extracted the SUP stream, I believe the problem is in the stream itself.
Thanks again, I'll get back to you tomorrow!
Edit: Private message sent, hope you have the time and interest to look into it!
Edit2: Oh, and I forgot to comment on that duration problem...
#1
DCSQ start ofs: 0x00002af9 (00:00:55:026) 00 00 00 00 2F 09 01
DCSQ stop ofs: 0x00002f13 (00:00:55:054) 00 02 00 00 30 11 84
What I meant with the "base and incerement part" was that perhaps the 0x0002 in the "DCSQ stop" is the increment, and 0x3011 is the base (while the base for the DCSQ start is 0x2F09). I saw that in the working SUP file those 3rd words are the same in both "DCSQ start" and "DCSQ stop", while in my problem SUP they differ. Of course, since I know nothing about the timestamp format, other than what you explained above, that 3rd word might have nothing to do with anything.
Pati
0xdeadbeef
24th March 2009, 18:32
What I meant with the "base and incerement part" was that perhaps the 0x0002 in the "DCSQ stop" is the increment, and 0x3011 is the base (while the base for the DCSQ start is 0x2F09).
Nope. That's what I meant with "I don't think that's what you implied".
Of course, since I know nothing about the timestamp format, other than what you explained above, that 3rd word might have nothing to do with anything.
As I already said: only the first word does. the following dword is the (byte) offset to the next DSCQ and has nothing to do with timestamps.
Anyway, I had a look at the SUP and I think I know what the problem is there. Yet this isn't easy to fix and I don't even know if I want to invest much time in this.
The problem seems to be that the subtitles in this SUP are faded in (and out?). This (kinda) explains why the first subtitle is completely transparent at first and why the display duration is so short. Indeed after the display end marker, another alpha buffer follows and then a dozen more. I kinda lost track after the 4th or 5th, but there are lots more alpha buffers. There also seem to be several palettes. As the DSCQ times are accumulated, this also explains the short duration: BDSup2Sub only takes the first fading step, which results in a fully transparent, much too short subtitle.
While at first glance it seems to be easy to skip all the additional alpha and palette buffers and simply use the last one(s), this would only work for a fade-in, not for a fade out. There would be some ways to handle this of course, but I'm not quite sure if I want to invest the time for a dead format.
Pati
24th March 2009, 18:37
Ah, okay, thanks for taking a look, and for the explanation of what is going on with the subtitle.
That is fine, I'll just code something myself so that I can handle this particular subtitle (a preprocessor of sorts so that I can use BDSup2Sub for the actual work, and fix the durations manually if needed).
So, thanks again for BDSup2Sub itself!
Pati
0xdeadbeef
24th March 2009, 18:44
Don't get me wrong: I'll probably add a fix for finding the correct end time and skipping the first palette/alpha buffers the next days. Then again as I said, this won't completely fix the problem as it will only cure fade ins.
hubblec4
24th March 2009, 22:11
22.03.2009 2.2 -> 2.3
Automatic selection of language for SUB/IDX export if filename contains language name (e.g. "spanish")
ok this feature are very bugy. german, english and turkish works correct but all other language not. when i want save the file it shows me ever French(fr).
test it with:
Thai
Portuguese
Spanish
Polish
Icelandic
Hungarian
Hebrew
Modern Greek
Czech
hubble
This small bug is simple. All BD.sup files works correct but the movie-folder named "French Connection". BDSup2sub choose french for the language.
hubble
~bT~
24th March 2009, 23:30
^ its not buggy really :p it does what it says.
Originally Posted by 0xdeadbeef View Post
22.03.2009 2.2 -> 2.3
* Automatic selection of language for SUB/IDX export if filename contains language name (e.g. "spanish")
which it does :) change it to chinese connection or something :p and see what happens.
0xdeadbeef
25th March 2009, 01:53
I'll change this in 2.4 amongst a couple of other things.
@Pati: there'll also be better (yet not nearly perfect) support for faded HD-DVD captions.
I'm too tired now and want to do some more testing, but chances are 2.4 will be released tomorrow.
Pati
25th March 2009, 12:42
Ah, much appreciated! No hurry, take your time and all the rest you need!
Pati
0xdeadbeef
25th March 2009, 18:37
25.03.2009 2.3 -> 2.4
Improved support for HD-DVD-SUPs (multiple DCSQ START commands are supported, DCSQ is accumulated)
BD-SUP: subtitles without RLE buffer are ignored (led to NullpointerException)
Fully transparent colors are always interpreted as transparent black to not mess with scaling
Automatic language selection now only considers file name, not the path name
Bilinear scaling is also used for scaling down
Better exception handling for general exceptions inside threads
Edit dialog: duration can be entered as float value now (just for consistency)
Accidentally changed time format from "hh:mm:ss:ms" to "hh:mm:ss.ms" in IDX files. Fixed.
saint-francis
25th March 2009, 19:27
Would it be possible for you to include a changelog with each version? With the blazing rate at which you are making updates it's getting difficult to keep track of the progress and what version I currently have.
Also, when switching to a new version is it OK to keep the .ini from the previous version?
Thanks for the great tool!
turbojet
25th March 2009, 19:38
Converted .sup from get smart bluray to 720p...muxed with tsmuxer, played on my panasonic bd35 bluray player. No subtitles shown. :(
What version did you try?
I had problems pre 2.1 I believe it was with sup's showing in PowerDVD 8 and MPC-HC from TSMuxer's BD output but since 2.1 I haven't had an issue. I haven't been able to test on a standalone yet.
0xdeadbeef: If you are looking for SMlabs a developer has been active in in this thread (http://forum.doom9.org/showthread.php?t=134104) lately another way to reach them is by email tsmuxer@smartlabs.tv
Pati
25th March 2009, 20:32
Thanks for version 2.4! I quickly tested the fade-in/fade-out SUP, and the subtitles are now visible, great!
However, the durations do not seem to be correct yet, and most of the time the subtitle stays visible half-transparent for what seems like much too long. Perhaps this is the fade-out problem you mentioned?
Anyways, this is a big step forward, thanks!
Pati
0xdeadbeef
25th March 2009, 20:33
Would it be possible for you to include a changelog with each version? With the blazing rate at which you are making updates it's getting difficult to keep track of the progress and what version I currently have.
There's a complete revision history at the end of the online help.
Also, when switching to a new version is it OK to keep the .ini from the previous version?
Yep, there's not too much stored there anyway.
0xdeadbeef: If you are looking for SMlabs a developer has been active in in this thread (http://forum.doom9.org/showthread.php?t=134104) lately another way to reach them is by email tsmuxer@smartlabs.tv
I already tried to reach him by PM but with no success.
0xdeadbeef
25th March 2009, 20:48
However, the durations do not seem to be correct yet, and most of the time the subtitle stays visible half-transparent for what seems like much too long. Perhaps this is the fade-out problem you mentioned?
Perhaps. Maybe that's why I called it "better (yet not nearly perfect) support for faded HD-DVD captions"?
turbojet
26th March 2009, 06:42
I already tried to reach him by PM but with no success.
I've had some issues with pm popup notification on this board so that may be an issue for them as well. However I recently received a reply via e-mail, maybe you would have better luck through email.
Pati
26th March 2009, 08:20
Perhaps. Maybe that's why I called it "better (yet not nearly perfect) support for faded HD-DVD captions"?
Right. :-) Well, I just wanted to let you know I appreciate your work and follow with great interest your progress!
Though, since you have the exact same file that I am using as test material, perhaps my reporting my test results is not that informative or useful, so I'll just silently follow your progress from now on.
Thanks!
Pati
0xdeadbeef
26th March 2009, 18:29
26.03.2009 2.4 -> 2.5
Fixed: Cr and Cb color components were switched when reading BD-SUPs (in since 1.0)
Fixed: inconsistent behavior of "export forced" checkbox (probably introduced in 2.3)
Changed: console is cleared before loading a SUP to avoid heap and performance problems (Swing text components are SLOW).
Changed: when copying console output to clipboard, the clipboard is reset first to avoid OutOfMemoryException.
Changed: improved console output for BD-SUP reading to use less lines in the console
hubblec4
26th March 2009, 19:28
thanks for the new version.
hubble
turbojet
27th March 2009, 07:55
Since 2.4 this colored sup (http://www.sendspace.com/file/m1t7m0) is recognized as yellow, it should be a turqoise blue. When outputting to idx/sub it looks ok in yellow, when outputting as sup it looks like yellow with orange spots. Could you take a look?
0xdeadbeef
27th March 2009, 11:14
Since 2.4
Do you mean 2.5?
this colored sup (http://www.sendspace.com/file/m1t7m0) is recognized as yellow, it should be a turqoise blue.
In revision 2.5, I swapped the order of Cr and Cb components when reading SUPs. This was because I had the first BD with colored SUPs in my hands ("Iron Man") and could verify the colors. So IMHO, version up to 2.4 had wrong colors, while 2.5 has correct colors.
Since you complained about 2.4, but probably mean 2.5, I'm pretty uncertain how to handle this complaint. Do you complain that the colors are different in 2.4 and 2.5 (which they should be) or did you compare 2.4/2.5 to the real BD in a standalone player and found that 2.4 was correct while 2.5 was not? This would really puzzle me though since my PS3 shows the colors exactly like 2.5 does.
When outputting to idx/sub it looks ok in yellow, when outputting as sup it looks like yellow with orange spots. Could you take a look?
As I changed the order of Cr/Cb components in 2.5 when reading SUPs, I somehow forgot about writing SUPs. I already fixed it locally though.
turbojet
27th March 2009, 12:01
2.3 gui shows and outputs the correct color.
2.4 and 2.5 gui shows and outputs the wrong color.
0xdeadbeef
27th March 2009, 12:33
2.3 gui shows and outputs the correct color.
2.4 and 2.5 gui shows and outputs the wrong color.
Sorry, but this is impossible, as 2.4 behaves exactly like 2.3 when it comes to colors. The change was done in 2.5.
And did you really compare the SUP as displayed by 2.5 to the output of a standalone?
If so and you still say that the colors displayed by 2.5 are wrong, this really leaves me puzzled. Then either my PS3 or your standalone shows wrong colors or I'm totally missing something else.
I'm already playing with the idea of a "swap Cr/Cb" option for the conversion dialog...
turbojet
27th March 2009, 12:57
2.0-2.2 also output the correct colors. I didn't test in a standalone, don't have one here. But with any luck at all I can test it in a couple this weekend.
MPC-HC, PowerDVD, suprip, vobsub resync are what I've been using to detect the colors which also matches what BDsup2sub gui displays.
Does Iron Man subs display wrong color in v 2.0-2.3?
0xdeadbeef
27th March 2009, 13:21
As I already said: version 1.0 until 2.4 did use the same order of color components and therefore display the same colors. These colors are wrong (swapped Cr/Cb) when compared to what my PS3 displays - which I couldn't test until I got "Iron Man" which was the 1st BD with colored captions that I got my hands on. As I discovered this, I swapped Cr/Cb in 2.5 and now colors in BDSup2Sub 2.5 are identical to what my PS3 displays when the original BD is played.
So as I said: either the PS3 is wrong (which seems extremely unlikely) or your player(s) are wrong. Hard to tell without a 2nd standalone.
Anyway: I added a menu option to swap Cr/Cb manually.
27.03.2009 2.5 -> 2.6
Fixed: Cr and Cb color components were switched when writing BD-SUPs (introduced in 2.5)
Fixed: DSCQ is updated instead of accumulated for HD-DVD-SUPs with multiple DSCQs
Changed: better detection for faded HD-DVD-SUPs
Changed: improved luminance threshold detection
Changed: added menu entry to swap Cr/Cb components
turbojet
27th March 2009, 13:39
Swapping Cr/Cb fixed it in 2.6 thanks.
Actually I downloaded 2.4 from videohelp just now and it handled it correctly, I obviously wasn't paying much attention to the version in title bar, you are right 2.5 is where the issue started.
0xdeadbeef
27th March 2009, 14:15
Well, your use of "correct" is debatable. IMHO BDSup2Sub handles colors correctly since 2.5. I find it hard to believe that Sony, core member of the BD Association, screwed this in the PS3, which probably still is one of the most popular BD players.
turbojet
27th March 2009, 14:28
Correct meaning the swap setting came very close to replicating the original sup I uploaded which is tough to debate. I have a feeling you'll experience the same thing in PS3 with that sup. I actually prefer the yellow vobsubs over the turquoise but the 2.5 sups were very difficult to read.
I don't know about Iron Man sup, I don't have that one and I believe your claims about it.
Probably just a case where some need the swap while others don't, luckily we have control of that now.
0xdeadbeef
27th March 2009, 17:16
Correct meaning the swap setting came very close to replicating the original sup I uploaded which is tough to debate.
As long as you didn't actually see the captions of the original BD on a certified standalone, I'd argue that it's impossible for you to judge if the colors are correct or not. So it's not tough, but pointless to debate.
I have a feeling you'll experience the same thing in PS3 with that sup. I actually prefer the yellow vobsubs over the turquoise but the 2.5 sups were very difficult to read.
I'm pretty sure indeed that the SUPs of the original BD displayed on a PS3 would look pretty close to what BDSup2Sub 2.5/2.6 shows (ignoring lack of calibration and gamma correction). The fact that the BD-SUPs created by 2.5 had an inconsistent palette is a completely different matter.
Which however raises the questions if you're actually using the SUPs created by BDSup2Sub to mux a transport stream. If so: does this work reliably?
I don't know about Iron Man sup, I don't have that one and I believe your claims about it.
It's almost 100% certain that any BD on any PS3 shows exactly the same behavior as they share the same software.
Probably just a case where some need the swap while others don't, luckily we have control of that now.
I don't think so. I guess that other people stumbled over the same assumption as I did: if the color space is commonly called "YCbCr", it seems likely that the color components are also stored in that order. As SupRip shows the "Iron Man" caption in wrong colors, it's pretty clear to me that it uses the wrong Cr/Cb order just like BDSup2Sub did until (including) 2.4.
turbojet
27th March 2009, 17:43
You could if you wanted to test out that sup stream on a PS3 and compare color palettes of the original to swap vs unswapped setting in BDSup2Sub. As I understand it the color palette is contained inside the sup and I don't see why a PS3 would interpret it differently then these other tools/players do.
I've only watched a few 720p movies with sup's converted with BDSup2Sub and they seem to be reliable since I think it was 2.1 when they started showing, except for this one colored forced sup stream. I'll let you know if I do find some thing else though.
0xdeadbeef
27th March 2009, 20:20
[...] I don't see why a PS3 would interpret it differently then these other tools/players do.
You aren't serious, are you?
Besides, at least one of the tools you named, Vobsub Resync, doesn't even support BD-SUPs. I must admit that I'm surprised to hear that MPC-HC does. At least with the M2TS streams I tried, it certainly didn't. So, this obviously leaves us in a PowerDVD vs. PS3 situation (if at all), where I would bet on the hardware player produced by the BDA foundation member for sure.
Anyway: anybody with a standalone is invited to report if colored captions demuxed from a BD/HD-DVD appear correct (neglecting calibration/gamma correction) in BDSup2Sub compared to what the standalone displays with the original BD/HD-DVD. If not, post the SUP and some details (which captions should look how, which demuxer used, did the "swap cr/cb" option fix it etc).
Pati
28th March 2009, 15:20
Thanks for 2.6! The fade-in/out HD-DVD SUP files seem to be pretty much fixed now. :thanks:
I do get a few "problems decoding RLE" errors when exporting to BD SUP, though.. What causes that?
Pati
rizu
28th March 2009, 15:41
Hi,
First I'd like to thank you for making this tool :)
I have one request/idea.. would it be possible to add as an option to relocate subs automatically inside the picture, simply something like keep subs inside set bounds?
I'm planning to get myself 2.35:1 screen and having subs outside the screen isn't really an option :) I though about making such tool myself but then I saw your tool and though it could be easy to add such feature to already existing software, I'm sure there would be loads of people who'd have use for such feature anyway. I know I can do this with srt subs but I really do prefer bitmap subs as there are several cons on srt.
I've put a quick sketch as an attachment to show what I'm after. Basically you'd enter Min and Max Y and treshold, these values would set the final bounds, no subs would be left outside these values. Then all subs would be scanned and determined the ones that need repositioning. Software would mark subs that has to be lowered and subs to be risen and also save highest and lowest Y found on sub frames.
Treshold would describe how much subtitle can get below min Y or above max Y to be marked for repositioning while min and max Y would tell where the new lowest or highest subtitle would be repositioned.
Then after all subs were scanned repositioning would take place by following logic: rise ALL subs that were below (Max Y-Treshold) by (biggest Y found on subframes-Max Y entered). Same logic on too high positioned subtitles. So it would process only the frames that need repositioning. Treshold would keep frames away from bouncing all over the screen too. If both Min Y and Max Y would be true over the same frame, then tell user about it and leave frame as it is (let user deal with that particular frame by himself manually).
turbojet
29th March 2009, 07:27
Found an oddity with the swap cr/cb.
With the same colored sups I've been dealing with if I disable swap the text in the gui appears yellow but it outputs blue subtitles.
If I enable swap the gui shows blue but it outputs yellow subtitles.
Also the color of the sup in MPC-HC, PowerDVD, SupRip, SupRead matches the color of what is shown on a Panasonic BD30.
I'll try testing on a PS3 soon.
jonathonsunshine
29th March 2009, 11:45
As of version 2.6 is it able to automatically detect the language when you are running it from a command prompt ? I couldn't see anything in the help, no switchs and it defaulting everything to german unless you specify something else (from the command prompt).
0xdeadbeef
29th March 2009, 16:59
I do get a few "problems decoding RLE" errors when exporting to BD SUP, though.. What causes that?
In this particular SUP, it seems that the last line in the 2nd buffer (either even or odd lines) is a bit too long. Or let's say: there's more information in the RLE buffer than needed to decode the picture. As long a no image is cut or garbled, I decided to live with it. If you find a pic that is, please report though.
First I'd like to thank you for making this tool :)
You're welcome, although by experience, there's usually a "but".
I have one request/idea.. would it be possible to add as an option to relocate subs automatically inside the picture, simply something like keep subs inside set bounds?
Surprise ;)
Indeed I played with the idea myself, but then decided that probably nobody would ever need this as I couldn't imagine a (commonly needed) use case.
I'm planning to get myself 2.35:1 screen and having subs outside the screen isn't really an option :)
Ok, this sounds like a use case. Although I'm not 100% sure if I'd implement it this way if I would.
I though about making such tool myself but then I saw your tool and though it could be easy to add such feature to already existing software, I'm sure there would be loads of people who'd have use for such feature anyway. I know I can do this with srt subs but I really do prefer bitmap subs as there are several cons on srt.
There's no such tool for SUB/IDX? Or which type of captions do you export?
BTW: Changing Y position alone would be no complete solution. I stumbled over subtitles which nearly fill the whole screen vertically, since there's an upper line above the picture and a lower line below the picture. In this case, the described algorithm would fail, since the subpicture would need to be scaled down.
Found an oddity with the swap cr/cb.
With the same colored sups I've been dealing with if I disable swap the text in the gui appears yellow but it outputs blue subtitles.
If I enable swap the gui shows blue but it outputs yellow subtitles.
Are you sure that this isn't a misconception on your side? If you swap Cr/Cb, save as a SUP and load it again (with the swap setting still on), the colors will change (again) of course. That's the idea of the swap function. To see the correct colors after saving a file with swapped colors, you need to uncheck the swap option of course.
Also the color of the sup in MPC-HC, PowerDVD, SupRip, SupRead matches the color of what is shown on a Panasonic BD30.
SupRip shows the wrong colors compared to a PS3 (if it doesn't crash). SUPread shows only a few captions of your example, but what it shows looks exactly like in BDSup2Sub:
http://imagedash.com/uploads/bfi1238341351l.png (http://www.imagedash.com)
So if you say that "SupRead matches the color of what is shown on a Panasonic BD30", this would also mean that BDSup2Sub shows the same colors. Then again, since SupRip shows different colors than SUPread, the whole statement is questionable to say the least.
Also, I'm still not convinced that MPC-HC can display SUPs at all. With all M2TS I tried up to now, MPC-HC didn't display any embedded SUPs at all (option greyed out).
As of version 2.6 is it able to automatically detect the language when you are running it from a command prompt ? I couldn't see anything in the help, no switchs and it defaulting everything to german unless you specify something else (from the command prompt).
No, you have to define the language explicitly from the command line. Since the automatic detection is only based on the file name, it doesn't work reliably enough to use it without any user feedback. Imagine titles like "French Kiss" or "Italian Job"...
rizu
29th March 2009, 20:16
You're welcome, although by experience, there's usually a "but".
As always :) But I like this SW as it is already, I currently use it to convert blu-ray subs to 1080p nonscaled vobsubs so I can mux my hd movies to mkv, no other SW can do it as far as I know :)
Ok, this sounds like a use case. Although I'm not 100% sure if I'd implement it this way if I would.
There are few drawback, sometimes subs are positioned differently just to avoid burned in subs or text on original movie but colliding on those with this kind of algorythm should be a rare case because such subs are already repositioned above normal position.
There are other ways around of course, like using resolution 1920x800 and some zoom mode for video on such playback SW where subs have fixed position. I'm currently playing with different ideas so it's hard to say directly what would work out best.
When I look into my blu-ray/hd dvd collection I'd say around half of the titles have subs inside the video frame and others are like on normal DVD release, partly outside the video frame.
There's no such tool for SUB/IDX? Or which type of captions do you export?
I doubt current tools work with 1080p vobsubs ;)
BTW: Changing Y position alone would be no complete solution. I stumbled over subtitles which nearly fill the whole screen vertically, since there's an upper line above the picture and a lower line below the picture. In this case, the described algorithm would fail, since the subpicture would need to be scaled down.Agreed, that's why suggested to leave such frames unaltered and tell user about it. Scaling would be ideal but may make overall algorythm just more complicated? Anyways there are not many such cases anyway.
Would be nice to know if there are any other having same kind of ideas, I mean I can't be only one considering wider screen and needing subtitles at the same time :)
cavediver
29th March 2009, 21:48
I just discovered this tool today and I must say I'm impressed. I prefer subtitles to be positioned in the black bar below the image in 2:35 movies. While BDSup2Sub can do this, I could only figure out how to do it frame by frame. Would it be possible to implement some sort of global repositioning box so all subtitles can be repositioned at once?
0xdeadbeef
29th March 2009, 22:05
Damn, I can feel the pressure increasing to implement such a feature. Let's say, I'll consider it, ok? Dunno though how motivated I'll be the next days...
laserfan
29th March 2009, 22:31
I prefer subtitles to be positioned in the black bar below the image in 2:35 movies.Ha, ha! Cuz I need to get the subtitles INTO the 2.35:1 frame so I can project onto my 'scope screen!
Currently I make an .srt, then re-create and re-position using tsMuxeR, but if this tool could just re-pos the original sups that might work too (though now that I think of it, this may put the original sups too high into the picture).
turbojet
30th March 2009, 06:36
Hopefully these pics will take out the confusion.
Clockwise from upper left: MPC-HC, 720p in suprip 1.13, 720p in supread, 1080p in bdsup2sub set to resize to 720p, 720p output in bdsup2sub
no swap in 1.26 (http://tinypic.com/view.php?pic=2ebxpur&s=5)
swap in 2.6 (http://tinypic.com/view.php?pic=9zlx1f&s=5)
bdsup2sub 2.4 (http://tinypic.com/view.php?pic=520rjr&s=5)
panasonic BD30 shows what mpc-hc and suprip see in these cases.
the original 1080p source appears blue in bd30, mpc-hc and suprip, supread doesn't display.
to enable bdsup in mpc-hc you need to choose vmr windowless, haali or evr in options > playback > output, restart the player, then choose from navigate > subtitle language
if PS3 and BD30 are showing different colors I think there is an issue with bdsup2sub's color palette as the original displays blue on both players.
0xdeadbeef
30th March 2009, 11:40
Hopefully these pics will take out the confusion.
Well, if MPC-HC shows a SUP in this case (which is hard to tell), then this only proves that it uses the (inverted) color order that SupRip does, but not the one that the PS3 does.
panasonic BD30 shows what mpc-hc and suprip see in these cases.
You kinda avoid talking about the original BD. How does it look like on the Panasonic? Or what is the "original source" exactly?
to enable bdsup in mpc-hc you need to choose vmr windowless, haali or evr in options > playback > output, restart the player, then choose from navigate > subtitle language
OK, I'll try this later.
if PS3 and BD30 are showing different colors I think there is an issue with bdsup2sub's color palette as the original displays blue on both players.
That's obviously a wrong assumption, as BDSup2Sub "has" not palette. It uses the frame palette defined for each frame of the SUP. Then again, if (and I'm not yet convinced that this is the case) the Panasonic shows different colors than a PS3 for the same original BD, there seems to be confusion about the color component's order even among different hardware vendors.
In this case, the definition in the BD specs was somewhat worthless anyway and BDSup2Sub way to handle it (via swap option) was the only possibility anyway.
jonathonsunshine
30th March 2009, 13:22
Since the automatic (language) detection is only based on the file name, it doesn't work reliably enough to use it without any user feedback. Imagine titles like "French Kiss" or "Italian Job"...
I think your forgetting thou, EAC3TO and TSDEMUX and realistically, any program that is going to demux streams from something, will put the base title at the start of the file name, from EAC3TO for example, the english subtitles from "The Italian Job" would come out as
"The Italian Job - 10 - Subtitle (PGS), English, 1467 captions.sub"
so BDSup2Sub simply needs to load the LAST language found in the file name.
Also, for what its worth, the GUI successfully detected the following languages for me, granted, in a file name without conflicting language codes.
Italian, Spanish, French, Japanese, Korean, Swedish, Dutch... only one I found that may be a bug (or perhaps only my ignorance) is detecting what EAC3TO described as "Modern Greek" as "Greek"...
Also, your program rocks. But it still needs a switch for loading language tags automatically from the command prompt. If you think it is an issue then just turn it off by default, but I have a dream of dropping 15 sup files on a batch file...
turbojet
31st March 2009, 01:33
Well, if MPC-HC shows a SUP in this case (which is hard to tell), then this only proves that it uses the (inverted) color order that SupRip does, but not the one that the PS3 does.
You kinda avoid talking about the original BD. How does it look like on the Panasonic? Or what is the "original source" exactly?
OK, I'll try this later.
That's obviously a wrong assumption, as BDSup2Sub "has" not palette. It uses the frame palette defined for each frame of the SUP. Then again, if (and I'm not yet convinced that this is the case) the Panasonic shows different colors than a PS3 for the same original BD, there seems to be confusion about the color component's order even among different hardware vendors.
In this case, the definition in the BD specs was somewhat worthless anyway and BDSup2Sub way to handle it (via swap option) was the only possibility anyway.
Look again, I said BD30 and PS3 (USA) display the original as blue.
SupRip 2.4 or earlier works correct
Since 2.5 the inverse of the gui is what's being displayed on BD30. If gui shows blue the BD30 will show yellow with a bunch of orange spots and it's very difficult to read. If gui shows yellow BD30 shows blue.
I don't know how it is for Iron Man, if I had access to the sup I'd try it out.
But for now I will just stick to 2.4 as I don't want to play this guessing game with colors. At least until BDSup2Sub is fixed or I come across a colored sup that doesn't keep it's correct colors.
Thanks for the app anyways.
0xdeadbeef
31st March 2009, 10:36
Look again, I said BD30 and PS3 (USA) display the original as blue.
No, in fact you didn't. You said "if PS3 and BD30 are showing different colors" (which in the context sounds like a speculation), but you never said you actually tested it on a PS3. And even after I insisted twice, you don't talk of a BD, just of an "original".
SupRip 2.4 or earlier works correct
No offense, but sentences like this make it hard to tell which of your statements are correct and which are misleading.
Since 2.5 the inverse of the gui is what's being displayed on BD30. If gui shows blue the BD30 will show yellow with a bunch of orange spots and it's very difficult to read. If gui shows yellow BD30 shows blue.
I guess it's futile to repeat that 2.5 had a bug which stored colors as YCbCr, although YCrCb was read and displayed. But even then I can't really understand how this would lead to orange spots.
Just in case that this is still not 100% clear: when exporting SUPs, BDSup2Sub doesn't touch the palette at all. Neither colors are altered nor added. The only possible change to the palette is swapping the Cr and Cb components if (and only if) the swap option is active. This is what 2.5 always did by mistake.
Or to put in other words: the fact that 2.6 displays (!) different colors than 2.4 has no influence on the saved palette at all as long as you store a SUP. Conversion to SUB/IDX is based on the actually shown colors of course.
But for now I will just stick to 2.4 as I don't want to play this guessing game with colors. At least until BDSup2Sub is fixed or I come across a colored sup that doesn't keep it's correct colors.
Well, you seem to be kind of unconvincable regarding this topic, so it's probably pointless to tell you that your refusal to use 2.6 is mainly based on wrong assumptions. I just hope that your misjudgement doesn't influence other users.
Let me put it this way: maybe the color model or at least he order of the Cb and Cr depends on some information in the original M2TS stream. E.g. it could be possible that it's bound to the video codec. If so, this information is gone in the ripped SUP stream. As far as I can tell, there's nothing in a SUP stream that would tell me if the colors are stored as YCbCr or YCrCb.
The only thing I can tell is that if I demux the M2TS of the German edition of "Iron Man" with EAC3TO, the color order needed to reproduce the colors displayed on a PS3 is YCrCb.
If there are discs or other circumstances which need YCbCr instead, I implemented the swap option, which makes BDSup2Sub behave exactly as it did before version 2.5 regarding SUB/IDX. For SUPs, 2.6 (with disabled swap option) behaves exactly like 2.4 anyway despite of the different colors displayed.
To claim that only 2.4 behaves "correct" and 2.5 and above lead to a "guessing game with colors" or simply "incorrect" colors, is therefore not really reasonable. The opposite is true: BDSup2Sub 2.6 gives you much more control than 2.4 did (or any other tool does).
BTW: I tried MTC-HC (1.2.990.0) with different output settings (EVR, EVR custom pres., VMR9 (windowed), VMR9 (renderless) - Haali was greyed out) and none of them showed any subtitle of any original (decrypted, but otherwise untouched) M2TS I tried. Now I updated to 1.2.1015.0 and it displays subtitles. But as I already guessed, the colors are different to what the PS3 shows (yellow is cyan, cyan is yellow).
turbojet
31st March 2009, 13:20
Have you even looked at the pics?
If you have and read what I wrote you should know what I mean by 2.4 being correct and a guessing game with 2.5 and 2.6 as far as Panasonic BD30, SupRip, MPC-HC, PowerDVD, ArcSoft TMT, WinDVD, and BD Rebuilder is concerned. I really would expect to get the same color output the gui shows me which has been the case up until 2.5
Have you even tested the sup I'm working with that's still available (http://www.sendspace.com/file/m1t7m0)?
Take that sup and see what color the original is on your PS3 and also see what colors are shown after running it through BDSup2Sub both swapped and unswapped and report back.
This way you can prove or disprove my assumption that if the original plays with the same color on all players but different then blue when ran through BDSup2Sub unswapped there's something wrong with BDSup2Sub's output.
Anyhow unless you test my sup I don't want to spend any more time trying to explain it through words to you.
0xdeadbeef
31st March 2009, 13:40
Have you even looked at the pics?
[...]
I don't think you'll ever seem to understand it without trying it yourself and I'm not appreciating being called a liar when I'm just trying to help.
I completely understand your assumptions and explained in detail which of them are wrong and why. I'm not quite sure how to explain this in more detail or if this would make sense at all, since you seem to be pretty much unconvincable.
turbojet
31st March 2009, 13:56
What are you trying to convince me of?
The least we could do to figure this all out is work with the same source.
I can't discuss the Iron Man subs at all with you as I don't have them to test, the subs could yield completely different results for me.
It could also be your PS3 doesn't agree with other players including USA PS3, which hopefully I'll get to check out soon with swapped and unswapped. I already know of a case where PAL PS3's played some BD5/9 with menus while USA PS3's don't. You don't need to try and tell me I'm right or wrong about this, I'm only stating it as a possibilty.
0xdeadbeef
31st March 2009, 14:03
Just re-read my postings. I invested quite some time to explain this to you, so it would be at least polite to read it. You also wouldn't need to ask "if I even had a look" at your example then.
turbojet
31st March 2009, 14:19
Sure I've invested a few hours trying to explain it to you as well, even going as far as making pics, next step would be to do it on your computer.
I don't see anything concerning the sup I used in your posts, but I do see some of Iron Man.
Anyways this is getting nowhere, if you don'r understand it by now I give up.
0xdeadbeef
31st March 2009, 15:45
Sure I've invested a few hours trying to explain it to you as well, even going as far as making pics, next step would be to do it on your computer.
If you still think this would change anything, you haven't read my postings (carefully enough).
I don't see anything concerning the sup I used in your posts, but I do see some of Iron Man.
Which goes to show how carefully you read my postings.
http://forum.doom9.org/showpost.php?p=1267198&postcount=150
Yeah, Iron Man sure loves his sake.
Anyways this is getting nowhere, if you don'r understand it by now I give up.
Yes, must be me :rolleyes:
Or wait, wasn't I the author and you the guy who didn't even recognize his own SUP. Hm?
0xdeadbeef
31st March 2009, 19:41
31.03.2009 2.6 -> 2.7
Changed: added option to move all captions inside/outside bounds (typically the cinemascope bars)
Changed: temporarily added workaround for (what I consider) a bug in SupRip's RLE decoder
Changed: automatic language selection also from the CLI if no language is given explicitly
turbojet
31st March 2009, 20:30
Basically it all comes down to a disagreement on what colors should be shown in te gui.
I understand why you want it to display supread colors for your PS3 hopefully you can understand why I prefer the old way which was suprip colors for BD30 and various software players. I found out PowerDVD 7 and Arcsoft TMT3 display supread colors, while PowerDVD 8 and TMT2 display suprip colors.
It's unfortunate there isn't standard way of displaying these colors. Anyhow maybe you could add an option thats read from ini to invert gui colors to suprip in the future?
Also is drag and drop and/or open with from context menu possible?
0xdeadbeef
31st March 2009, 23:10
Basically it all comes down to a disagreement on what colors should be shown in te gui.
Exactly. This of course also reflects the obvious confusion about the color order amongst different tools and obviously even standalones.
I understand why you want it to display supread colors for your PS3 hopefully you can understand why I prefer the old way which was suprip colors for BD30 and various software players. I found out PowerDVD 7 and Arcsoft TMT3 display supread colors, while PowerDVD 8 and TMT2 display suprip colors.
Then again, as I said, as long as you export SUPs, It's completely irrelevant how the colors are displayed in BDSup2Sub as it doesn't change the palette (as long as the swap option isn't activated).
It's unfortunate there isn't standard way of displaying these colors. Anyhow maybe you could add an option thats read from ini to invert gui colors to suprip in the future?
I'm not quite sure what this would be good for since it wouldn't add any functional benefit over the swap function but make this matter even more confusing.
Also is drag and drop and/or open with from context menu possible?
Drag'n'Drop should be possible, but integration into the Windows explorer is nothing that can be handled from Java. It should be possible to create a registry entry though with an external script or probably by just importing a ".reg" file. Then again, BDSup2Sub currently doesn't accept only one command line parameter. This should be easy to add though.
Let' say I'll consider these suggestions.
cavediver
1st April 2009, 01:50
I just downloaded 2.7. Thank you for the new ability to move all frames out of bounds for 2:35 material.
rizu
1st April 2009, 05:02
Thank you :) I like the way you implemented it.
jonathonsunshine
1st April 2009, 12:16
and thank you for auto language selection from command prompt
0xdeadbeef
1st April 2009, 17:03
As a side note, I am certain now, that the colors are stored as Y, Cr, Cb in a Blu-Ray PDS segment. This means that the colors displayed by SupRead, BDSup2Sub and my PS3 are correct.
rizu
2nd April 2009, 20:56
I found a weird HD DVD sub which puts BDSup2Sub to deadlock (just freezes on 0%).
It's evodemux stream but eac3to demuxed worked just the same way. If I try to import stream directly it freezes. If I use supRead and export it to BD sup and then open in BDSup2Sub there's about half of the subs giving error about subs ending before starting so I guess there is something messed up on original authorization :) For some reason TMT2 shows muxed BD with supRead subs just fine.
0xdeadbeef
2nd April 2009, 20:59
02.04.2009 2.7 -> 2.8
Changed: added drag'n'drop support
Changed: if one parameter (which is neither "/?" nor "/help") is given, it's used as input file for the GUI
Fixed: HD-DVD-SUPs: next DSCQ is checked to avoid endless loops.
alc0re
3rd April 2009, 03:24
I mean this in the kindest of ways...but I wish you as the developer would pursue fixing the output bd .sup so that it worked muxing with tsMuxer for avchd/bluray playback. I know you've said you need someone to respond to your asking for help regarding this issue...but the only way anyone is going to see that are the people that know about your program (and read the whole forum thread), and they for the most part are not developers with the knowledge to help with that issue. My wish is that you would pursue the developers of bd-rebuilder and/or tsMuxer for some help on this issue. This tool is very promising but its still lacking that feature. Now I know you're going to take my request that you pursue the issue with other developers with a grain of salt, since you are obviously not getting paid for developing this program, but I know I would be more than happy myself to pay for a program that could resize the original .sup to 1280x720 and have it work in a muxed avchd/bluray format. I appreciate your work on this program...if you don't have the time to fix this issue oh well. Thanks for your hard work on this program.
turbojet
3rd April 2009, 05:44
Thanks for the drag and drop, works well.
alc0re: I have resized to 720p sup, muxed with tsmuxer 1.8.18-1.8.34 and they worked correctly on Panasonic BD30 and PS3. I've done this on about 15 so far.
Is it the Panasonic BD35 you are having issues with?
Have you tried other sups other then get smart?
alc0re
3rd April 2009, 05:46
Yah I only tried it once. It was on my BD35 with the Get Smart subs.
I'll try it again with a different movie on my next transcode.
EDIT : Trying on Kung Fu Panda now...its burning.
EDIT 2 : Kung Fu Panda sup convert to 720 on BD35 works. I'll try it with more tomorrow...crossing my fingers as ocr'ing takes too much time and is error prone. I would love to be able to take that step out of the process.
0xdeadbeef
3rd April 2009, 11:46
@rizu:
2.8 also fixes the problem with you stream. About the warning: while it's completely legal in HD-SUB and BD-SUPs to have no end time (which will just display the caption until the begin of the next caption), I decided to force end times as this allows me to export always exactly the same stream format. So a warning displayed by BDSup2Sub doesn't necessarily mean an authoring bug. Indeed palette and cropping animations will also generate warnings as BDSup2Sub can't (or doesn't want to) really handle them.
Let's put it this way: a warning usually just means that BDSup2Sub doesn't like a certain stream structure and therefore isn't sure that the decoded caption is really correct.
@turbojet:
Did you try the explorer integration (see first posting or online help)?
@alc0re:
As I already pointed out, the matter is a little more complex than it might seem. In a nutshell the problem is that a player needs a certain time to decode the different parts of the subpicture to be able to display it at the scheduled time stamp.
There are several additional time stamps in a transport stream that tell the player when to load a segment into its decoder so it's ready for display when it's needed. Since calculation of these timestamps is a little tricky and depends on buffer sizes and decoding frequencies, this is typically handled by the authoring tool. Since e.g. SUB/IDX files (and also HD-DVD-SUPs) don't contain this information at all, it's completely up to the muxer or authoring tool to create these time stamps.
For whatever reason though, the guys who defined the BD-SUP format decided to let these time stamps in the demuxed SUP and most obviously, tsMuxer also uses them (without any further correction (?)) for Muxing. So now it's up to the tool that creates the SUP to somehow create these timestamps. As I already pointed out BDRebuilder cheats around this by simply not touching any relevant data and only moving the display offset (resulting in too big captions that may be partly outside the screen). I'm not quite sure about the BD-SUPs that SupRead exports if the source was a HD-DVD SUP. It seems to create at least some of the timestamps. Can't say how correct they are though.
Anyway, currently BDSup2Sub uses static offsets (derived from some untouched SUPs exported by TsMuxer) to write more or less plausible values to these time stamps. Since they are not calculated and in no way related to the size of the segments or size of the caption, it's very likely that a player might get into trouble if it implements the buffer/speed limitations exactly and not muxer/authoring tool fixes the time stamps. This is especially likely for standalones, since due to memory/performance limitations, they have to rely on the offsets much more than a software player running on a high end PC.
Then again, I was recently provided with some useful information that might help me to improve the situation. I'm actually currently digging through this and am kinda optimistic that I find a way to actually calculate the offsets instead of guessing them. It's kind of a major task though and may take a while.
Also keep in mind that in the end, it's the muxer/authoring tool that has to put the pieces together correctly. It shouldn't be forgotten that replacing an M2TS transport stream with another one muxed with some free Muxer is a hack. It might work with some players/movies and it might not with others. We're really still in the stone age of re-authoring BDs and due to the complexity of the BD format and the fact that every (real, not AVCHD) BD must have AACS (which makes free authoring tools either illegal or pointless), chances are this won't change soon.
alc0re
3rd April 2009, 15:51
Thanks. I appreciate your feedback and a better explaination of the problem. Helps me understand what's going on.
PS. I just tested, and the output bluray .sup file from your newest version does not crash suprip anymore. :)
rizu
3rd April 2009, 17:07
Thanks, that HD DVD stream works like a charm now :)
About your reposition routine, while it works, it still makes subs jumpy as it always calculates sub position by lowest point on current bitmap. For example sub with any of y,g and q will be basically positioned higher than subs where font doesn't reach below normal level. Sub jumpiness is noticed especially if subs are positioned close to actual video frame as you kinda remember the gap to the frame.
I can see few ways around this, first would search through all frames and get the lowest and highest bitmap positions on all subs and use it to calculate the amount subs which need to be repositioned..
Other simpler way would just mark the first found low and high position after repositioning.. eg if first low bitmap was lifted by 41px then lift all the rest by same amount too if lift value is somewhere around +-15px, that way you could keep subs from bouncing and not needing to go through all subs before determining a good value.
As a side note, I'm kinda exicited how current HD sw tools are working now that time has passed from the early days. I can pretty much backup my entire HD collection and view those films now in about every mediaplayer without sacrificing picture or audio quality :)
alc0re
4th April 2009, 03:27
0xdeadbeef
Two things...and I know I may just be asking you to repeat yourself. Forgive me, I know nothing about programming. If you take a demuxed bluray sup, and remux it with tsMuxer the bluray plays the sups fine (as expected.) You can't extrapolate the information you need from the original untouched bluray sup to use on the resized one? Now, I'm not expecting you to say yes, as I know if it was that easy you would do that. And I'm not looking for a long answer, partly cause I don't want to bother you with what may seem like stupid questions. What I am looking for is a brief answer...maybe even just a "no, its not that simple." I guess its just trying to satisfy my curiosity as to why its not that simple. It seems like a simple resize would not involve as much as it does, but apparently that's not the case.
Second...is there any way I can donate some cash money? It wouldn't be a huge contribution, but your tool is gonna save me a lot of time and I would like to give you some monetary kick back for your work. Perhaps Paypal?
turbojet
4th April 2009, 06:48
@turbojet:
Did you try the explorer integration (see first posting or online help)?
Just tried and yes it does work fine on vista x64, thanks.
One thing I'm trying to accomplish now is adding Convert to 720p for .sup files:
[HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p\command]
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 *-720p.sup /res:720"
Is the best luck I've had, it seems to process it but I don't know where the file is outputted, any ideas?
0xdeadbeef
4th April 2009, 10:42
One thing I'm trying to accomplish now is adding Convert to 720p for .sup files:
[HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p\command]
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 *-720p.sup /res:720"
Is the best luck I've had, it seems to process it but I don't know where the file is outputted, any ideas?
Probably in the current directory, which is a little vaguely defined in windows (usually something like "My Documents").
The problem is however, that this approach can't work anyway because you're using a wildcard in the target name (only) in a way that BDSup2Sub currently doesn't support. Besides, as the parameters passed to BDSup2Sub are not in double quotes, the Java runtime would try to expand the wildcard which might lead to interesting behavior. Also, as you erased the double quotes enclosing "%1", file names with spaces wouldn't work.
Honestly, I don't think it's a good idea anyway, but if you really need this way of calling BDSup2Sub, I could add support for (one) asterisk in the target file name that would be replaced with the source path+filename without the extension. Even then you'd need a different command string though. I'd also suggest to write the output to a log. This would look something like this (note the double quotes around the parameters passed to BDSup2Sub and the single quotes around "%1"):
@="C:\\Program Files\\Java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" \"'%1' *-720p.sup /res:720\" > C:\\TMP\\%1.LOG"
Note that this wouldn't work anyway currently. For the moment you could try this (no special single/double quotes this time as no wildcards are passed):
@="C:\\Program Files\\Java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" \"%1\" \"%1-720p.sup\" /res:720 > C:\\TMP\\%1.LOG"
This would however create files with two ".sup" extensions.
You could also write a Perl script or whatever that calls BDSup2Sub with an appropriate target file name.
0xdeadbeef
4th April 2009, 11:19
You can't extrapolate the information you need from the original untouched bluray sup to use on the resized one? Now, I'm not expecting you to say yes, as I know if it was that easy you would do that. And I'm not looking for a long answer, partly cause I don't want to bother you with what may seem like stupid questions. What I am looking for is a brief answer...maybe even just a "no, its not that simple." I guess its just trying to satisfy my curiosity as to why its not that simple. It seems like a simple resize would not involve as much as it does, but apparently that's not the case.
I can't take the original time stamps for a couple of reasons:
1) BDSup2Sub simplifies SUPs by removing palette/cropping animations and other stuff. So the structure of the SUP usually changes even if a BD-SUP is converted into a BD-SUP of the same resolution.
2) When scaling captions up/down, all the internal time stamps need to be recalculated because they are based on video/image sizes.
3) When converting a HD-SUP into a BD-SUP, there are none of these internal time stamps at all to use for the output file.
Second...is there any way I can donate some cash money? It wouldn't be a huge contribution, but your tool is gonna save me a lot of time and I would like to give you some monetary kick back for your work. Perhaps Paypal?
Despite of all that forced vacations due to the world economic crisis, I'm still in a financial situation that allows me to gently refuse this offer. Indeed, as I said before, I tend to lose interest in my projects after some time, but would feel obliged to implement stuff just because people donated a few bucks.
Anyway, I really prefer to be able to tell people to take it or leave it ;)
By the way, I think I figured out all the offsets in question in the meantime. The calculation is actually pretty simple if you know how do to it. Then again, I also realized that my "guessed" offsets were not so bad after all. Indeed, generally they were (mostly) rather too big than too small when scaling down. So while there will be an update soon with improved calculation of PTS/DTS time stamps, I'm not 100% sure if this will really fix muxing problems with all streams.
alc0re
4th April 2009, 17:15
Ok...thanks for the reply. The offer to donate would not hold you to anything if you walked away from the project, but I understand where you're coming from. You seem to be a person with some values, and I would feel the same way about it, even if the person did not intentially mean to make you feel obligated I would still feel that way. Good to hear about the calculations progress.
Another quick question...
With the warnings I get from your program...I get ones about not having ending times that were fixed automatically (does suprip fix these too then without telling the user about it? Cause I've never seen that type of error from suprip. It just outputs the .srt with start and end times.) And the other errors I get sometimes are sub's times being too short...but I'm assuming they were too short in the original sup (obviously, thats where its coming from.) So can I safely ignore that error without using the correct too short option and still have it play on my standalone without issues?
0xdeadbeef
4th April 2009, 18:12
With the warnings I get from your program...I get ones about not having ending times that were fixed automatically (does suprip fix these too then without telling the user about it? Cause I've never seen that type of error from suprip. It just outputs the .srt with start and end times.) And the other errors I get sometimes are sub's times being too short...but I'm assuming they were too short in the original sup (obviously, thats where its coming from.) So can I safely ignore that error without using the correct too short option and still have it play on my standalone without issues?
Well, as I already pointed out before, BDSup2Sub expects a start time, one image with one palette and an end time per caption. Any deviation from this scheme will result in a warning - this doesn't necessarily mean though that the stream is corrupt or that the result displayed in BDSup2Sub is invalid. Yet, both could be the case.
Missing end times for example are perfectly valid in VobSubs, HD-DVD SUPs and BD-SUPs. This just means that the caption is displayed until the next subtitle starts. Programs like SupRead display an end time in this case (e.g. start of next frame minus 1ms), but don't export an end time. In contrast, BDSup2Sub shows an end time of "00:00:00.000" in the source window and the "fixed" end time in the target window (which is also used for export). In the end, there shouldn't be much of a difference. The only exception is the very last caption. If it has no end time, BDSup2Sub will force a duration of 10 seconds or so (too lazy to look it up) while the unpatched version would be displayed until the movie ends.
The "too short" frames are usually the result of unexpected (yet probably legal) structures in the stream. E.g. quite a lot of BD SUPs have captions with multiple start sections, often with repeated image and palette data. So a feature meant for animation is used without any obvious reason - maybe because the authoring tool is crap. Still, while preposterous, this is most probably allowed. Still BDSup2Sub now has to decide which (of multiple) start end stop times to use in the end.
While I added several hacks here and there to work around these issues, there still might be cases, where BDSup2Sub uses the start/stop time from the wrong segment/epoch/whatever. Yet I didn't stumble over this issue lately. Still, reworking the start/end detection code to be more robust is already on my list.
Anyway, keep in mind that the presentation graphics stream of a BD is quite a complex beast. It can contain multiple objects with multiple palettes per frame ("epoch"), where images, palette entries and cropping windows can be updated to create all kind of animation/fading/transition effects. Since BDSup2Sub is focused on plain subtitles and conversion of these effects to VobSub would be more or less impossible or at least pointless, BDSup2Sub will never be able to display every fancy (animated) effect contained in the PGS.
turbojet
5th April 2009, 08:10
@="C:\\Program Files\\Java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" \"%1\" \"%1-720p.sup\" /res:720 > C:\\TMP\\%1.LOG"
Didn't work even after changing to java.exe, just opened and closed right away. I think the added double quotes are the issue
I also am having no luck getting a log with: > C:\\%1.LOG
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 *-720p.sup /res:720"
actually works with paths/file names with spaces somehow someway, I know with cmd it needs double quotes but maybe java handles ir differently.
I did make a little progress with
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 %1-720p.sup /res:720"
Using this on a file named 00001.track_4614.sup outputs what appears to be a correct 720p file named 00AB71~1.SUP-720p.sup in the working directory.
eng 00001.track_4614.sup outputted ENG000~1.SUP-720p.sup
Any ideas on how I could get the output file named with just the -720 added?
Rectal Prolapse
5th April 2009, 09:51
I just want to point out that supread's colors use the wrong colorspace conversion formula (YCbCr to RGB). At least in one of the later versions I tried. As far as I know, MPC-HC uses the correct colorspace conversion formula (I actually provided the formula to Casimir and should be in the MPC-HC main discussion thread). All standalone players should use the same formula, with the addition that some players can be set to expand to PC levels (ie. PS3 Full Range option instead of Limited).
Colorspace conversion should follow BT.709 (aka SRGB), with video levels (where black is at 16 and white is at 235).
This is just an FYI message...I have not used BDSup2Sub. I don't remember what suprip does for color conversion.
0xdeadbeef
5th April 2009, 10:33
I just want to point out that supread's colors use the wrong colorspace conversion formula (YCbCr to RGB).
[...]
This is just an FYI message...I have not used BDSup2Sub. I don't remember what suprip does for color conversion.
Do you mean slightly wrong (e.g. by using the full 0..255 range) or completely wrong due to swapped Cr/Cb?
As I said, due to certain input (*hint*), I'm now 100% sure that the color order is Y,Cr,Cb and not Y,Cb,Cr. Since BDSup2Sub uses Y,Cr,Cb and displays the same color as a PS3 does for the very same SUPs, I'm almost 100% certain that the colors displayed by BDSup2Sub are accurate (letting aside calibration, gamma etc.). If BDSup2Sub would display the wrong colors due to a bug in the RGB<->YCbCr conversion (which is very unlikely, since I checked it again and again), this would also mean that the PS3 shows wrong colors.
BTW: currently I'm using a color space conversion according to BT.601. Dunno how much this differs from BT.709, but it looks ok for me (compared to PS3). Keep in mind that video color space conversions are based on gamma corrected RGB, not on linear RGB that's used by PCs. So a 100% perfect color reproduction is kinda unlikely anyway.
Since SupRead shows the same colors as BDSup2Sub and SupRip doesn't, this makes SupRead right and SupRip wrong in my humble opinion. Again: is it more likely that the PS3 is right and SupRup screwed it or the other way around? Yeah, that's my guess, too.
@turbojet:
I'm a little surprised that the double quotes are not needed, but you seem to be right. Most probably windows adds them automatically if the file name contains spaces or other problematic characters. Anyway, either with or without double quotes filenames with spaces won't open with my proposed default shell integration. I think I now why, yet the automatic quoting of windows makes things a little complicated. I'll have to investigate.
Whatever: regarding your special case, support for a wildcard in the target string will be added in the next release. The asterisk (only) in the target string will be replaced by the full source file name (including path, but excluding extension).
Then again, I just started a major rework of the whole BD-SUP start/stop segment detection, so this may take a while.
turbojet
5th April 2009, 10:56
Ah no rush, it's just a little convenience that probably I'd only use unless you were to put it in as an option.
0xdeadbeef
5th April 2009, 12:22
Actually I made good progress and it looks as if I could release a new version today. Yet, after some testing, I have to correct my above statement: as I originally assumed, the double quotes around "%1" in the registry command string are necessary for file names with spaces. It's only that BDSup2Sub currently assumes one parameter with spaces inside it to be a wildcarded full CLI call. I already added a workaround for this locally, but this only works as expected if "%1" is inside double quotes.
Currently, it's beyond me why the unquoted version would work for you...
magic144
5th April 2009, 15:14
Any chance of an enhancement to allow/compensate for cropped encodes of the source.
i.e. Original video is 1920x1080, cropping is done to leave output at 1920x800 (sometimes rescaling is done too to produce 1280x528, but we'll leave that aside for now)
First step would be to do what can be done with BDSup2Sub already - ensuring all subs are moved INSIDE the picture area.
Second (new) step would be to recalculate sub positions so that 0,0 would now be top-left of the cropped area (and 800 would be the maximum Y-coord extent).
Anyway, I don't know how the code is structured, but I presume this wouldn't be a major undertaking and it would be a fantastic feature for anybody who does these 'cropped encodes'.
0xdeadbeef
5th April 2009, 15:39
Hm, I think all that's needed to handle this would be a freely definable output resolution, as BDSup2Sub scales width and heigth independently anyway. The only issue would be that the preview windows would be somewhat bound to a 16:9 resolution. So they would show a distorted picture and the cinemascope bars would be off.
magic144
5th April 2009, 15:50
Hmm, well the preview window shows what you're doing to the input space/coords (which is still uncropped anyway). This doesn't need to change I don't think - you still want to visually make sure that the first step (repositioning the subs to be INSIDE the 'scope bars) is doing the right thing.
You'd just need a checkbox or something to indicate that the output coordinates would only be relative to the PICTURE area (and not the WHOLE SCREEN). Or am I barking up the wrong tree?!
0xdeadbeef
5th April 2009, 16:29
Hmm, well the preview window shows what you're doing to the input space/coords (which is still uncropped anyway). This doesn't need to change I don't think - you still want to visually make sure that the first step (repositioning the subs to be INSIDE the 'scope bars) is doing the right thing.
Then again, if you'd ask me (and something tells me that I might have a little more insight into the inner workings of BDSup2Sub), the preview window does what its name implies: it's a preview of the exported target.
You'd just need a checkbox or something to indicate that the output coordinates would only be relative to the PICTURE area (and not the WHOLE SCREEN). Or am I barking up the wrong tree?!
Maybe. The preview windows is based on the idea of a 16:9 aspect ratio. When the image is cropped, this changes the aspect ratio to something else and BDSup2Sub can't really know what it is then.
Then again, I wonder why you would care about the preview windows anyway. If one could set the target screen size to the cropped screen size, there wasn't even any need to move the subtitles at all, because they would be inside the given target resolution anyway.
The only problem with this approach is that the cropped size would also be stored inside the IDX or SUP file (dependent on the output format). Since this is non-standard anyway, I can't really tell what your player expect there. How does it know that the image is cropped and what was its original aspect ration anyway?
magic144
5th April 2009, 17:08
well I certainly don't mean to presume to tell you how BDSup2Sub works !!! :-)
It is the first and only useful BD sup tool to come out that doesn't involve OCR, so it is a breath of fresh air
Having the target screen size be the cropped screen area would be a bonus. In so doing, I would not want/expect the aspect ratio of the subs to change. It would merely be a translation of the subtitle coordinate origin (0,0) from the original top-left (inc. black bars, in a screen 1920x1080) to the 'new' top-left - again (0,0), but with a new range of 1920x800 in this example.
i.e. a letter of 50 pixels in height would still be 50 pixels in height in the output space.
I can do this somewhat artificially right now by editing the idx file. If I maintain the output size to be 1920x1080, I can adjust these lines:-
org: 0, 0
to
org: 0, -189
and
scale: 100%, 100%
to
scale: 100%, 135%
(there being 140 pixel crop at top and bottom of original video, and 140*1.35=189)
where 1.35=1080/800
however this involves scaling, since the video is being rendered at 1920x800 but the subtitle coordinates are 1920x1080 still, therefore I have to artificially adjust the subtitle Y-axis.
if the subs were already limited/constrained to 1920x800 coordinate range, I could leave the idx file alone :-)
fyi, I am using ZoomPlayer with VobSubFilter
0xdeadbeef
5th April 2009, 17:54
Hm, what about this:
I could add a "crop offset" input field to the "move captions" dialog. Default setting is 0. If it is changed to e.g. 100, a colored line is displayed in the preview pane that is 100 pixels below the top of the screen. When moving captions, this would also be the upper limit - no caption could start above that line.
When exporting, every y-position is than simply decremented by that cropping offset.
Wouldn't be fancy, but easy to implement and should fix your problem.
magic144
5th April 2009, 18:12
That sounds like just the ticket! Would be great to try.
0xdeadbeef
5th April 2009, 19:38
That sounds like just the ticket! Would be great to try.
Ok, it's pretty likely that this will be added in the next release. At least if I don't need the next one as panic release to fix the bugs introduced in this one:
05.04.2009 2.8 -> 2.9
Changed: DTS (and internal PTS) time stamps are calculated now based on decoding and composition pixel rates. Should hopefully improve muxing results of exported SUP streams.
Changed: improved detection of start/end of caption - should result in less warnings and better handling of problematic SUPs
Changed: better handling of BD-SUP palettes (multiple IDs, palette update, alpha blending detection)
Changed: much more flexible handling of CLI parameters. Options are allowed now even if no target file name and/or no source file name is given.
Changed: support for one asterisk in target file name even if there is no wildcard in the source file name. The asterisk will be replaced with source path+filename without the extension.
Fixed: calling BDSup2Sub with source file name as only parameter would fail if the file name contained spaces. Now it should work with all file names as long as they don't have multiple SUP/SUB/IDX extensions in them.
Fixed: when changing the caption number in the edit and move dialogs, the wrong caption number was displayed after returning to the the main view.
Note that this is really a major update regarding BD-SUPs and will lead to different results than 2.8 in certain cases. Since I'm not so keen on regression testing, chances are that 2.9 will behave worse than 2.8 for selected SUPs. I sure don't hope so though and some complex SUPs that were completely screwed before look almost perfect now. So just give it a try.
magic144
5th April 2009, 20:34
Thanks for another new release.
cavediver
5th April 2009, 23:26
Under the "Move all captions" option, what does the "Offset" setting do?
0xdeadbeef
5th April 2009, 23:29
Keeps the caption from the selected border.
Ryu77
6th April 2009, 00:02
I've had a quick read through and it's possible I may have missed the answer to the question I am about to ask, but...
Which would be the best tool to mux these newly created, DVD ready subtitles with the video and audio?
Is there a program as easy to use as tsMuxeR that I could load the video, audio and sub/idx files into and create DVD folders, ready for burning?
SquallMX
6th April 2009, 04:49
I've had a quick read through and it's possible I may have missed the answer to the question I am about to ask, but...
Which would be the best tool to mux these newly created, DVD ready subtitles with the video and audio?
Is there a program as easy to use as tsMuxeR that I could load the video, audio and sub/idx files into and create DVD folders, ready for burning?
Try Muxman, but you will need to convert the VobSub subtitles to .Sup (DVD format), you can do that with Subtitle Creator (The conversion is lossless).
:helpful:
Ryu77
6th April 2009, 11:22
Try Muxman, but you will need to convert the VobSub subtitles to .Sup (DVD format), you can do that with Subtitle Creator (The conversion is lossless).
:helpful:
Yes, in the interim I had actually tried that method and the result was an option to select a subtitle that didn't actually display??
I will experiment some more and see what I can work out.
PS: I am working with Vietnamese subtitles for my Fiance to watch English speaking movies a little easier (I am Australian).
bananas
6th April 2009, 11:46
Got this sup that I can't get to work in pdvd,but works in ps3.
warning: multiple PDS/ODS definitions: result may be erratic it says with v2.9
and no errors with v2.8.Opened it up in suprip seems it doesn't recognise the font.
It's a bd sup im trying to convert to 720p.Here's the link to the .sup http://www.sendspace.com/file/n7vfsi
0xdeadbeef
6th April 2009, 12:37
Got this sup that I can't get to work in pdvd,but works in ps3.
warning: multiple PDS/ODS definitions: result may be erratic it says with v2.9
and no errors with v2.8.Opened it up in suprip seems it doesn't recognise the font.
It's a bd sup im trying to convert to 720p.Here's the link to the .sup http://www.sendspace.com/file/n7vfsi
Maybe I missed the question!? Does the original SUP cause troubles in PowerDVD or the SUP exported by BDSup2Sub?
Anyway: this is one of the very few examples of a SUPs that not only has (redundant) repeated image data per frame, but also some of the images are corrupt. Since 2.8 had another (less exact) way of selecting the image if there were multiple updates per epoch, chances are 2.8 selected the non-corrupt version of the image (by chance) while 2.9 selects the corrupt one. There is one flag left that I currently don't take into account and that might be used to ignore invalid images. I'll have a look if doing so will help here.
Yet, I'm pretty much convinced that the authoring tool that created this stream is somewhat broken.
bananas
6th April 2009, 12:42
It's the exported .sup by BDSup2Sub
0xdeadbeef
6th April 2009, 13:28
It would help a lot to precisely describe the problem. What exactly happens in PowerDVD? Does this happen with SUPs exported by 2.8 as well etc.?
Anyway: I found a problem with fragmented image objects if there are also image updates in the epoch. Hope this will also fix the RLE decoder warnings in your SUP. Then again, this begins to get really complicated as it's hard to tell which captions animations should be displayed and which should be eliminated.
bananas
6th April 2009, 19:22
The text does'nt show up at all in pdvd in both v2.8 and 2.9.
I made some experimenting I ocr'd the original sup
to .srt and then opened it up in subrip and saved
it with ansi.After that I made an .sup file with supread
and opened it up in BDSup2Sub and converted to 720p.
That method got it to work besides letters like ♪ shows up
like this "?".Trying to open up a .srt saved in unicode
doesnt work in supread.So I guess the problem is letters
like this ♪ .Im kinda new to this,but that is the result of
my little experiment ;P
0xdeadbeef
6th April 2009, 20:06
The text does'nt show up at all in pdvd in both v2.8 and 2.9.
I made some experimenting I ocr'd the original sup
to .srt and then opened it up in subrip and saved
it with ansi.After that I made an .sup file with supread
and opened it up in BDSup2Sub and converted to 720p.
That method got it to work besides letters like ♪ shows up
like this "?".Trying to open up a .srt saved in unicode
doesnt work in supread.So I guess the problem is letters
like this ♪ .Im kinda new to this,but that is the result of
my little experiment ;P
All this SRT/OCR stuff has nothing to do with BDSup2Sub (which works on bitmaps only), so I'm still not quite sure how this related to the original problem.
Anyway, I analyzed your SUP and I figured out why BDSup2Sub has issues with it. Yet unfortunately I need to rewrite parts of the SUP parser (*again*) since there are some pretty weird things happening in this SUP that I didn't expect.
I'm not 100% certain that this will fix your problems with PowerDVD as it won't influence the structure of the saved SUPs. Also I understand the SUPs exported by BDSup2Sub are displayed by a PS3. Though I kinda lost track if the unmodified SUPs were displayed by the PS3 or if this was the case for the "experimental" SRT-cross-conversion.
kikker
6th April 2009, 20:12
Sorry for the noobish question, but I'm attempting to backup a BD title to 720p x264 encode in either of the MP4 or MKV containers. Is there a way to use this tool to convert the SUP to the SUB/IDX format as a stream wrapped in the MKV?
Or, is that the holy grail people are searching for at the moment. I've read conflicting reports that the SUB/IDX binary format can handle HD (720p or 1080p) subtitles. Even if it were possible to obtain this subtitle format, it seems there's not even a DS filter to play it. Please correct if I'm wrong. If a DS filter does not exist for this format, is there a "stand alone" player that could play back HD SUB/IDX?
Thanks for any info....
rizu
6th April 2009, 20:28
Even if it were possible to obtain this subtitle format, it seems there's not even a DS filter to play it. MPC-HC plays 1080p sub/idx just fine and so does MediaPortal with MPC sub-engine mod. I've tested both. Heard that vsfilter also would work but haven't tested it myself. I think all mentioned are based on same routines ( vsfilter ) when it comes to sub/idx rendering.
As mentioned before, vobsubs were originally meant to handle only DVD subs so 720p or 1080p subs are all non-standard and not likely to be supported on stand-alone devices..
kikker
6th April 2009, 21:04
MPC-HC plays 1080p sub/idx just fine and so does MediaPortal with MPC sub-engine mod. I've tested both. Heard that vsfilter also would work but haven't tested it myself. I think all mentioned are based on same routines ( vsfilter ) when it comes to sub/idx rendering.
As mentioned before, vobsubs were originally meant to handle only DVD subs so 720p or 1080p subs are all non-standard and not likely to be supported on stand-alone devices..
OK, great! Thanks...So, in theory, I could use this app to convert the SUP to a 720p SUB/IDX and have it played back by any directshow player? I should have clarified what I meant by "stand alone". I was really talking about other software players that have their own internal codecs/filters like VLC, but I suppose this doesn't matter to me at least, as I prefer directshow-based players.
I don't have a BD drive quite yet, so I can't really experiment with this app, but can it take the 1080p subs and downsize them to appear as normal on a 720p encode?
hubblec4
6th April 2009, 21:17
Sorry for the noobish question, but I'm attempting to backup a BD title to 720p x264 encode in either of the MP4 or MKV containers. Is there a way to use this tool to convert the SUP to the SUB/IDX format as a stream wrapped in the MKV?
Or, is that the holy grail people are searching for at the moment. I've read conflicting reports that the SUB/IDX binary format can handle HD (720p or 1080p) subtitles. Even if it were possible to obtain this subtitle format, it seems there's not even a DS filter to play it. Please correct if I'm wrong. If a DS filter does not exist for this format, is there a "stand alone" player that could play back HD SUB/IDX?
Thanks for any info....
Hi kikker
There is a way for you.
BDSup2Sub works perfect for 1080p.sup to 1080p.sub/idx conversion.
for playback you should use MPC-HC and this VSFilter-Version (http://www.animereactor.dk/aegisub/vsfilter-2.39c.rar)
this is an updated version by Aegis (http://www.animereactor.dk/aegisub/)
the subtitles looks like the original.
hubble
saint-francis
7th April 2009, 00:37
I am now using this tool to convert all of my BD subtitles to 720p and play them with 720p video in .mkv with mpc hc flawlessly. I haven't tried vsfilter though.
rica
7th April 2009, 01:01
Think about i extracted and accelerated video and audio to 25 via eac3to.
Shall i have to adjust sup to 25 manually?
Or any automatic way which is hidden in your tool?
Rectal Prolapse
7th April 2009, 05:12
0xdeadbeef, for your reference:
http://forum.doom9.org/showthread.php?p=1175551#post1175551
and
http://forum.doom9.org/showpost.php?p=1176156&postcount=4045
My tests were done using a screenshot of MPC (not MPC-HC) and the eyedropper color tool in irfanview or Photoshop to check the accuracy of the YCbCr->RGB conversions.
Technically, you should be using BT709 - as that is the color space used by all hidef material (all hidef broadcasts, all Blu-ray discs, and all HD-DVDs), and is also the default color space used by the typical computer monitor (BT.709 is the same as SRGB).
Supread I think uses BT601 and also expands to PC levels (white at 255, black at 0) instead of the technically correct white at 235 and black at 16. It is up to the user's player to do the proper expansion when rendering.
This is not a criticism of your tool (in fact I think it is a great idea - I was thinking of making a similar tool, but assumed there was a resolution limitation) - just want to give you basis for your tests. As you can see, I am anal about adhering to standards as closely as possible. :)
0xdeadbeef
7th April 2009, 09:42
Think about i extracted and accelerated video and audio to 25 via eac3to.
Shall i have to adjust sup to 25 manually?
Or any automatic way which is hidden in your tool?
That's up to your definition of "manually" and "hidden".
"Hidden":
After you loaded a SUP, a dialog called "Conversion options" pops up, which shows the source frame rate (read from the SUP, but it may be incorrect for exotic formats), an assumed target frame rate (merely based on the selected resolution) and a little checkbox that says "change frame rate".
"Manually":
Select the correct source and target frames rates and check the checkbox.
0xdeadbeef
7th April 2009, 10:02
My tests were done using a screenshot of MPC (not MPC-HC) and the eyedropper color tool in irfanview or Photoshop to check the accuracy of the YCbCr->RGB conversions.
[...]
Ok, so this is really (only) about accuracy. While I might change the color conversion anyway, this will only change the display of subtitles, not the exported SUPs (as I currently don't touch the palette at all). Besides, without extending the color space to 0..255, blacks will appear gray of course on a PC. That's why BDSup2Sub uses a version of BT.601 that's modified to extend to 0..255.
As you can see, I am anal about adhering to standards as closely as possible. :)
Your name made me guess so ;)
magic144
7th April 2009, 10:06
0xdeadbeef,
I've done a bit more digging
It seems perhaps VSFilter will let me vertically expand the subtitles on playback after all...
There's a setting under the General tab, under Picture Size, called "Vertical Padding" which has one value called "Extend to 16:9" which looks like it will show full-scale (1920x1080) subtitles exported from BDSup2Sub properly proportioned across the whole screen, NOT just within the confines of my cropped video encode (by default, this WAS set to "Original Height" which is what was giving me the vertically squashed presentation).
I'll do some further investigation on my end before you get too deep into implementing that Vertical Offset feature!
0xdeadbeef
7th April 2009, 16:23
To be honest, most of the code is already there, the only thing missing is the command line support. Yet I could quickly undo the changes if they prove to be useless. So please tell me when you're sure about it.
Then again, I'm still struggling with the BD-SUP parser anyway. Although I rewrote large parts again, I'm still not completely happy with it and it may take a while until I find a solution that works for all the problematic SUPs in my private zoo.
Jaja1
8th April 2009, 14:33
First of all, thanks for your tool. It helps me a lot.
I do have a question. I wonder why the 1080p sub/idx's are less smooth than the original sups which are 1080p as well. Any thoughts on that?
0xdeadbeef
8th April 2009, 15:03
I do have a question. I wonder why the 1080p sub/idx's are less smooth than the original sups which are 1080p as well. Any thoughts on that?
Sure and you would know the answer, too, if you read the online help.
In a nutshell: SUPs have an individual 256 color palette per caption, VobSubs have a fixed 16 color palette for the whole stream and only 4 colors of these 16 colors can be used per caption. As there's one color used as transparent color, this leaves 3 (more or less) opaque colors for the caption which is about 252 colors less compared to a SUP.
Obviously this doesn't leave much space for antialiasing and thus the images look less smooth.
Jaja1
8th April 2009, 16:38
Thanks for your answer.
And I did read the online help, from which I understood that the conversion to sub/idx results in a reduction of color information. However, my knowledge on this subject is way too little to see that this results in jagged edges.
0xdeadbeef
8th April 2009, 18:34
08.04.2009 2.9 -> 3.0
Changed: reworked BD-SUP parser again to support multiple object per epoch and to split the epoch were it makes sense.
Also equal captions can be merged now even if they're in separate epochs.
Changed: added cropping support (crop the first n lines)
Changed: colorspace conversion according to BT.709 instead of BT.601. Doesn't seem to make much of a difference though.
Fixed: the alpha fading detection for BD-SUPs could create wrong colors in certain cases.
magic144
9th April 2009, 02:42
Thanks for the update 0xdeadbeef
I tried out the subtitle cropping feature with my test movie/subtitle. Took me a while to realize I had to press the "Upper Bound" button instead of manually entering the "Offset Y value"!!
The original movie is 1920x1280.
I am cropping the video 140 pixels each, top and bottom, leaving 1920x800 (AR 2.4:1)
I used v3.0 using the "Move all captions" dialog, set AR=2.4, set the "move inside bounds" radio button and set a Crop Offset Y value of 140 (via the "Upper bound" button).
Only thing I have to do manually after export is change the Frame size in the idx file from:-
size: 1920x1080
to
size: 1920x800
(because I've remapped the subtitles into the picture-only area of the source video, thanks to the cropping) - so it's not a totally automatic procedure just yet. Of course 1080-2*140=800.
I tried it in BOTH VSFilter in ZoomPlayer, AND in VLC (a quite behind-the-times v0.8.6i Windows build!) and both rendered the subtitles at the correct AR.
I think this will now mostly benefit people who use VLC as their only playback solution since it allows the subs to be used in cropped encodes like this and still be shown at the correct AR.
Thanks for the work and quick support!
m
PS - by the way, is using REC.709 appropriate for non-HD resolutions?? I had read that it was only applicable for YUV to RGB conversions of HD material.
http://www.glennchan.info/articles/technical/hd-versus-sd-color-space/hd-versus-sd-color-space.htm
http://forum.doom9.org/showthread.php?t=133982
Rectal Prolapse
9th April 2009, 07:33
PS - by the way, is using REC.709 appropriate for non-HD resolutions?? I had read that it was only applicable for YUV to RGB conversions of HD material.
Well, considering that Blu-ray uses REC.709 and BDSup2Sub is (primarily) for conversion of subtitles from Blu-ray discs, I cannot see why this is an issue? However, I guess for SD subtitles a switch could be added for REC.601 (or maybe it can autodetect...)
0xdeadbeef: Thanks for the REC.709 support! Does it use the exact formula I mentioned? That preserves the original levels of the subtitles. But if you wanted to do levels expansion, you could always add a switch I guess. :)
0xdeadbeef
9th April 2009, 09:29
0xdeadbeef: Thanks for the REC.709 support! Does it use the exact formula I mentioned? That preserves the original levels of the subtitles. But if you wanted to do levels expansion, you could always add a switch I guess. :)
I'm using the following (partly self-constructed) formulas for BT.709 (based on Kb = 0.0722 and Kr = 0.2126):
/* BT.709 for RGB 0..255 (PC) -> YCbCr 16..235 */
y = 16 + (int)( r*0.2126*219/255 + g*0.7152*219/255 + b*0.0722*219/255 + 0.5);
cb = 128 + (int)(-r*0.2126/1.8556*219/255 - g*0.7152/1.8556*219/255 + b*0.5*219/255 + 0.5);
cr = 128 + (int)(r*0.5*219/255 - g*0.7152/1.5748*219/255 - b*0.0722/1.5748*219/255 + 0.5);
/* BT.709 for -> YCbCr 16..235 -> RGB 0..255 (PC) */
y1 = 1.164383562*y;
r = (int)(-253.3400548 + y1 + 1.833671233*cr + 0.5);
g = (int)( 79.05863261 + y1 - 0.218117304*cb - 0.5450762084*cr + 0.5);
b = (int)(-295.1907945 + y1 + 2.160630137*cb + 0.5);
As you can see, they include conversion from the 16..235 video range to the 0..255 RGB range, which is necessary to display correctly on a PC monitor.
Anway, I find it hard to see any difference compared to my BT.601 code: at least with the naked eye, the colors look the same to me.
0xdeadbeef
9th April 2009, 12:11
I tried out the subtitle cropping feature with my test movie/subtitle. Took me a while to realize I had to press the "Upper Bound" button instead of manually entering the "Offset Y value"!!
Well you don't have to. I just thought it would be more comfortable to set a sensible value with one click.
Only thing I have to do manually after export is change the Frame size in the idx file [...]
Hm, I was not quite sure about this indeed since I'm not really familiar with this use case. If this is an issue I could extend the cropping feature to assume symmetrical cropping and change the output screen size accordingly.
PS - by the way, is using REC.709 appropriate for non-HD resolutions??
AFAIK BT.709 is the color space used for HD video streams and BT.601 is used for standard definition sources. Still, currently, this is no problem, as only SUPs from HD sources are imported. The exported VobSubs are using a RGB (0..255) palette defined in the IDX file and the muxer or authoring tool has to convert this into an appropriate color space again. Besides, the difference between BT.601 and BT.709 are obviously not so big to be detect easily.
As a side note: the color model used in the IDX file is a little debatable, too. Indeed I didn't find any clear definition if it is always assumed to be RGB 0..255 or if some tools expect other color models (RGB 16..235 or YCbCr/YCrCb 16..235 or whatever).
Also the range of YCrCb/YCbCr values doesn't seem to be clearly defined. While the typical limits are 16..235 in video applications, there are some cases where this is extended to 16..240 - sometimes for all three components, sometimes only for the luminance (Y). Then again, it shouldn't really matter much in this context.
magic144
9th April 2009, 14:47
Well you don't have to. I just thought it would be more comfortable to set a sensible value with one click.
Oh OK - when I tried it, I don't think just manually entering a value worked, but maybe I was doing something wrong. It certainly didn't show the red line on the preview window until I pressed the button, as far as I remember. As for the size range and the symmetrical cropping, that sounds like the typical use-case, unless others think differently...
Still, currently, this is no problem, as only SUPs from HD sources are imported.
D'oh - of course! Just me being a bit stupid there. So are SUPs using YCbCr encodings then? Hence you have to choose an interpretation when converting to RGB.
I would have thought that the 16..235 luminance values would have been inherent in the subtitle source, if they were to match the underlying video (typically). Obviously, as we have just witnessed, I am not an expert :-)
The ffdshow "RGB conversion" tab (Constrast section) describes the "Standard" conversion as being Y:16-235, Chroma:16-240
Indeed the Wikipedia YCbCr page describes the RGB conversion as giving an output with Y(16-235) and CbCr(16-240).
http://en.wikipedia.org/wiki/YCbCr
ps - and again, THANKS for this great tool!
0xdeadbeef
9th April 2009, 15:32
Oh OK - when I tried it, I don't think just manually entering a value worked, but maybe I was doing something wrong. It certainly didn't show the red line on the preview window until I pressed the button, as far as I remember.
As for all text input fields in BDSup2Sub the value is only actually used if enter is pressed. That is by intention though, since the value is checked and written back to the text field. Personally, I hate text fields that do that while typing.
D'oh - of course! Just me being a bit stupid there. So are SUPs using YCbCr encodings then?
The palette entries of BD-SUPs and HD-DVD-SUPs use a YCrCb color model. Indeed, the exact color model used seems to depend on the video stream at least for BD-SUPs. BT.601 is used for standard definition sources and BT.709 for HD sources.
So for the rare case of SUPs with PAL/BTSC resolution I guess I'd need to select BT.601 and BT.709 for the rest.
But as I said, the difference between BT.601 and BT.709 seem to be neglectable when it comes to subtitles which seldomly use subtle colors (if at all).
The ffdshow "RGB conversion" tab (Constrast section) describes the "Standard" conversion as being Y:16-235, Chroma:16-240
In the meantime I came to the same conclusion and I will change this in 3.1. Yet, the difference will be hardly perceivable anyway.
ps - and again, THANKS for this great tool!
You're welcome, still it's always nice to get positive feedback.
pleinlesyeux
10th April 2009, 13:39
0xdeadbeef,
I just wanted to thank you for that great tool.
I allows me to offset the subtitles of a BD in the pictures, which is great when you have a 2.35 screen !!!
I used to manually trimmed exported .png then to reauthor my .xml and .png to recreate .sub. Took my hours. Now, 1 minute !!!
0xdeadbeef
10th April 2009, 14:20
Ah, another happy camper ;)
Still, there's always place for improvement.
10.04.2009 3.0 -> 3.1.0
Changed: depending on the resolution of an imported SUP, either BT.601 (PAL/NTSC) or BT.709 (HD) is selected.
Changed: cropping is assumed to be symmetrical and now also affects screen size in exported IDX or SUP.
Changed: reworked default VobSub colors a little to provide better anti-aliasing. Also white is used in combination with dark gray now.
Changed: minimum distance between two equal captions is now fixed to 200ms and doesn't depend on minimum display time any more.
Changed: merged code and look of preview windows.
Changed: all (?) edit boxes select smallest/biggest valid value if given value is out of bounds instead of just ignoring invalid inputs.
Fixed: Merging captions failed in certain cases, which also resulted in wrong end times
Fixed: BT.709 color space assumes Cr/Cb values to be inside 0..240 instead of 0..235
Fixed: exporting forced captions didn't work any more (introduced in 2.9)
Fixed: value for min display time is also used if fix short frames checkbox is unchecked.
Fixed: move dialog remembers screen ratio.
kikker
11th April 2009, 16:31
Fantastic App! Thanks very much. I do have a request of course ;)
Could you possibly implement a job queue of some sort such that many front end GUI encoders have? Once the jobs are queued up, they could then be started one after the other. Perhaps even a drop box to queue up the SUPs? Also, as direct VOBSUB (VSfilter) can read one IDX and one RAR'ed SUB for multiple languages, it would be fantastic to have that as a possible output as well. Thanks again!
0xdeadbeef
13th April 2009, 23:29
14.04.2009 3.1.0 -> 3.2.0
Changed: BD-SUP palette is created by default when scaling, mode can be selected (keep palette, new palette, dither)
Changed: reduced text output to a minimum. To get full output, select "verbatim" mode.
Fixed: progress bar was never updated when importing HD-SUPs, also cancel didn't work in this case
Fixed: progress bar didn't work for very large files (during load)
avivahl
14th April 2009, 02:11
Amazing work. It's wonderful to see such a professional free tool w/ an amazing development rate. Good job.
I hope you'll consider open-sourcing it one day (your code can probably help many open-source projects).
alc0re
14th April 2009, 04:18
Changed: BD-SUP palette is created by default when scaling, mode can be selected (keep palette, new palette, dither)
What exactly does that mean?
Well, let me ask a more direct question...if I'm just downscaling a BD-Sup to 720p to be burned back to an avchd/bluray structure...should I change my default back to keep palette?
0xdeadbeef
14th April 2009, 11:46
Before 3.2.0, BDSup2Sub used the existing palette for each caption. When scaling up/down, this led to suboptimal antialiasing in cases where the original palette didn't contain the according intermediate colors or versions of the same color with intermediate alpha values.
Although theses cases were rare, some people complained about it and so I decided to determine a new (optimized) palette when scaling. You can see the differences when changing the "palette mode" options in the GUI.
As the creation of a new palette proved to be about as fast as using the existing one, I decided to make this the default option. This shouldn't be a problem though.
So the answer is "no, you should get best results with the default setting".
0xdeadbeef
14th April 2009, 11:54
Amazing work. It's wonderful to see such a professional free tool w/ an amazing development rate. Good job.
I hope you'll consider open-sourcing it one day (your code can probably help many open-source projects).
While I still plan to release the source some day, currently, this is too much of a work in progress. Still, as written in the disclaimer, I'll give the source to everybody who asks nicely and agrees to some basic rules (mainly: don't release a branch with only your name in, give me credit if you use code, don't spread the code without asking me). Indeed, I already gave the source to one person already.
Besides, you can use the JAR as library for own Java projects. The Javadoc help is included and I can provide everyone interested with an example to use the Core classes (indeed the example is the main class of BDSup2Sub containing the CLI stuff).
turbojet
16th April 2009, 08:29
0xdeadbeef: I want to let you know that sendspace auto deletes files if they haven't been downloaded in 30 days. I recently found this out and got kind of burned by it.
Also did the command line change you recently did affect the convert to 720p subs from context menu I was trying to work out?
I spent a little time on it since the update but not a lot and somehow I broke default open application, probably CCleaner and now I can't seem to get it back.
Also while not a common situation do you know why this sup split with tsmuxer (http://www.sendspace.com/file/gupito) throws an error?
0xdeadbeef
16th April 2009, 17:17
0xdeadbeef: I want to let you know that sendspace auto deletes files if they haven't been downloaded in 30 days. I recently found this out and got kind of burned by it.
I guess I can live with that and I's suspect that every one-click-hoster will delete files after a while.
Also did the command line change you recently did affect the convert to 720p subs from context menu I was trying to work out?
I spent a little time on it since the update but not a lot and somehow I broke default open application, probably CCleaner and now I can't seem to get it back.
I'm not quite sure if I understand the question. I added the wildcard in the target name (only) as suggested some versions ago.
Also while not a common situation do you know why this sup split with tsmuxer (http://www.sendspace.com/file/gupito) throws an error?
Well, this stream start amidst an epoch. Indeed, it starts with a "NORMAL" PCS section, which is clearly invalid. Then again, I added another check to prevent the crash. Still, only 2 frames can be decoded from this sample. The first frame is incomplete and therefore lost.
turbojet
17th April 2009, 06:52
I meant does the cli changes you made doing anything to help out something like:
HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p\command]
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 %1-720p.sup /res:720"
This is what no longer works for me but I think it's something with my system:
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="C:\\Program Files\\java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar \"%1\""
A check would be nice as you never know when it may popup in a real scenario. I see suprip and eac3to don't like the stream either.
0xdeadbeef
17th April 2009, 10:20
I meant does the cli changes you made doing anything to help out something like:
[HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p\command]
@="C:\\Program Files\\Java\\jre6\\bin\\java.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" %1 %1-720p.sup /res:720"
Yes, as I said I added support for a wildcard in the target some versions ago.
I just tried the following on my system:
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="E:\\dev\\java\\jre_6_0\\bin\\javaw.exe -jar d:\\src\\java\\BDSup2Sub\\BDSup2Sub.jar \"'%1' '*-720p.sup' /res:720\""
Works perfectly for me. Adjusted to your system, it should look something like this:
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="C:\\Program Files\\java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" \"'%1' '*-720p.sup' /res:720\""
This is what no longer works for me but I think it's something with my system:
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="C:\\Program Files\\java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar \"%1\""
There's one double quote missing. It should be
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="C:\\Program Files\\java\\jre6\\bin\\javaw.exe -jar \"F:\\TOOLS\\Sub Tools\\BDSup2Sub.jar\" \"%1\""
turbojet
17th April 2009, 10:41
Thanks.
My registry is messed up or something, I can't get 'Convert to 720p' to show even if I put in HKEY_CLASSES_ROOT\* nor can I get it to associate guess it's time for a windows reinstall.
0xdeadbeef
17th April 2009, 10:57
Hm, I can't really believe it's a windows issue.
Here's my complete test reg file for reference:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.sup]
@="SUP BD/HD-DVD caption stream"
[HKEY_CLASSES_ROOT\.sup\shell]
[HKEY_CLASSES_ROOT\.sup\shell\open]
[HKEY_CLASSES_ROOT\.sup\shell\open\command]
@="E:\\dev\\java\\jre_6_0\\bin\\javaw.exe -jar d:\\src\\java\\BDSup2Sub\\BDSup2Sub.jar \"%1\""
[HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p]
[HKEY_CLASSES_ROOT\.sup\shell\Convert to 720p\command]
@="E:\\dev\\java\\jre_6_0\\bin\\javaw.exe -jar d:\\src\\java\\BDSup2Sub\\BDSup2Sub.jar \"'%1' '*-720p.sup' /res:720\""
Please note that my BDSup2Sub path doesn't contain spaces, so it doesn't need to be enclosed in double quotes.
If I import the above reg file and right click on a SUP, I can either open it or select "Convert to 720p". Both options work.
turbojet
17th April 2009, 11:26
I was able to fix the registry, there was HKEY_CLASSES_ROOT\sup auto_file\shell\open\command calling fastexplorer %1 which no longer exists. I deleted the sup auto_file key and now the .reg you gave me works great with 'convert to 720p' and 'open'
Thanks again
0xdeadbeef
18th April 2009, 11:51
18.04.2009 3.2.0 -> 3.3.0
Changed: added support for importing/exporting Sony BDN XML/PNG format (used by Sonic Scenarist).
Images are automatically cropped on import.
Changed: new command line option "/fps:keep" uses source frame rate as target frame rate (for BD-SUP and XML)
Fixed: a little inaccuracy in (all) the scaling algorithms led to suboptimal results.
The result of bilinear scaling is now very, very close to a reference implementation.
Fixed: conversion dialog fps comboboxes showed "29.967" instead of "29.97" for NTSC frame rates.
Fixed: crash when BD-SUP starts with invalid epoch.
0xdeadbeef
18th April 2009, 16:09
18.04.2009 3.3.0 -> 3.3.1
Fixed: using XML as input didn't work from command line if also a target was given.
Fixed: output resolution given via command line did not influence selection in GUI.
mrr19121970
18th April 2009, 17:23
nice tool. i tried to to convert the subs from HD-DVD Atonement and it worked as described.
I've integrated a call into Clown_BD to your util.
It would be nicer to have a 'quiet' mode that didn't write so much to the console (at least not a new line every time) and perhaps a /log=file.txt type option on the CLI.
laserfan
18th April 2009, 17:32
Output still has "vertical jaggies" when converting to 720x480.
0xdeadbeef
18th April 2009, 17:51
It would be a miracle if the reduction of resolution wouldn't result in any drawbacks. We're talking of 1080 vs. 480 lines here or reduction to a 6th of the pixels.
Of course there are more complex filters that could improve the quality a little. Yet most of the complex resize filters are either aimed at upscaling or at photographic images. Palettized text with transparency and antialiasing in the source picture is not the typical scenario. Indeed filters like Bicubic Interpolation or Lanczos3 either have no benefit in this case or create artifacts like ringing.
0xdeadbeef
18th April 2009, 19:18
nice tool. i tried to to convert the subs from HD-DVD Atonement and it worked as described.
Nice to hear.
I've integrated a call into Clown_BD to your util.
A pretty sweet tool as well. If I hadn't decided to use EAC3TO directly from the console at some point, this would be my next choice.
It would be nicer to have a 'quiet' mode that didn't write so much to the console (at least not a new line every time) and perhaps a /log=file.txt type option on the CLI.
Why don't you just pipe the output to a file? And if you call Java via "javaw" no console window is opened at all.
mrr19121970
18th April 2009, 19:29
Why don't you just pipe the output to a file?
that's what I'm doing now, but my preferred method is to attach to the console (to show realtime progress). in atonement i got over 11K lines in the log, and this blew up the getconsole dll call.
here is a snapshot
Decoding frame 937/948 at offset 0x00c5c6a0
Decoding frame 938/948 at offset 0x00c5d004
Decoding frame 939/948 at offset 0x00c62742
Decoding frame 940/948 at offset 0x00c65d26
Decoding frame 941/948 at offset 0x00c68382
Decoding frame 942/948 at offset 0x00c6b41e
Decoding frame 943/948 at offset 0x00c6d754
Decoding frame 944/948 at offset 0x00c72c54
Decoding frame 945/948 at offset 0x00c79f70
Decoding frame 946/948 at offset 0x00c7dac8
Decoding frame 947/948 at offset 0x00c7fd62
Decoding frame 948/948 at offset 0x00c82364
Converting SUP(BD)
#1
DCSQ start ofs: 0x000011ad (00:00:59.393)
DCSQ stop ofs: 0x000015ce (00:01:01.589)
#2
DCSQ start ofs: 0x0000558c (00:01:49.109)
DCSQ stop ofs: 0x000059ad (00:01:50.543)
#3
DCSQ start ofs: 0x000096aa (00:02:15.969)
DCSQ start ofs: 0x000096b1 (00:02:15.969)
WARNING: DCSQ start ignored due to missing DCSQ stop
WARNING: Found faded alpha buffer -> alpha buffer skipped
WARNING: DCSQ stop missing.
the messages in red are good for the progress, and belong to the console, but not every message a new line.
I don't know JAVA, but I'm sure it's similar to this c# example
Console.SetCursorPosition(0,Console.CursorTop-1);
Console.WriteLine("Blah Blah");
the rest is good for a logfile
0xdeadbeef
18th April 2009, 19:49
the messages in red are good for the progress, and belong to the console, but not every message a new line.
I don't know JAVA, but I'm sure it's similar to this c# example
Console.SetCursorPosition(0,Console.CursorTop-1);
Console.WriteLine("Blah Blah");
the rest is good for a logfile
Unfortunately, there is no native support for terminal console output in Java. If there was, I would use it of course. However, the standard output is just a stream without the possibility to set the cursor position. Libraries like JCurses simulate a text terminal console in a graphic window, but this wouldn't help here. The only other way would be the use of a native code library. But this is a no-go for me.
If you want to show progress, why don't you pipe the console output to a file and periodically scan that file for changes. You could even filter these changes and create your own progress/status information from it.
0xdeadbeef
18th April 2009, 23:07
18.04.2009 3.3.1 -> 3.3.2
Fixed: exported PNGs had changed palette order (so palette entry 255 was not guaranteed to be transparent)
laserfan
19th April 2009, 20:28
It would be a miracle if the reduction of resolution wouldn't result in any drawbacks. We're talking of 1080 vs. 480 lines here or reduction to a 6th of the pixels.Of course--but as I posted in the other thread, BDSupEdit looks alot better (except for GZZ's red tinge).
0xdeadbeef
19th April 2009, 21:38
While I still think that for rescaling to 720p - which is probably the most common use case for scaling, more complex filters don't yield much better results, I agree that there's potential for scaling SUPs to PAL or NTSC. Not so much for VobSub though, as there are too few colors.
Still, the next version will offer various filters.
0xdeadbeef
19th April 2009, 23:45
Ok, here we go:
19.04.2009 3.3.2 -> 3.4.0
Changed: added miscellaneous scaling filter modes (amongst others: Bicubic, Lanczos3 and Mitchell)
Changed: improved quantizer to leave no multiple entries in the palette
Changed: rewrote PNG importer to use palette of image if that is possible
Fixed: added semaphore to synchronize GUI threads decoding captions (fixes crashes when quickly jumping through captions)
kikker
20th April 2009, 04:32
Thanks for your work on this project! Would you ever consider possibly implementing the capability to merge several SUPs into one IDX/SUB? As I'm sure you're well aware, VSRip rips the various sub streams from a DVD rip into one vobsub, and it would be very handy if yours did this as well, provided there was a way to have more than one SUP file as source of course. Thanks...
0xdeadbeef
20th April 2009, 11:17
Thanks for your work on this project! Would you ever consider possibly implementing the capability to merge several SUPs into one IDX/SUB? As I'm sure you're well aware, VSRip rips the various sub streams from a DVD rip into one vobsub, and it would be very handy if yours did this as well, provided there was a way to have more than one SUP file as source of course. Thanks...
I wonder if this makes sense at all for SUPs. A Demuxer like EAC3TO will extract the whole stream even for BDs using seamless branching. So for me this looks like a whole lot of effort for a very unlikely use case.
laserfan
20th April 2009, 16:13
Ok, here we go:
19.04.2009 3.3.2 -> 3.4.0
Changed: added miscellaneous scaling filter modes (amongst others: Bicubic, Lanczos3 and Mitchell)
Changed: improved quantizer to leave no multiple entries in the palette
Changed: rewrote PNG importer to use palette of image if that is possible
Fixed: added semaphore to synchronize GUI threads decoding captions (fixes crashes when quickly jumping through captions)
Thanks for the new version--my "vertical jaggies" issue in resizing 1080 to 480 is gone! :)
I especially like that selecting the filter mode (I think I prefer Lanczos3 in the little testing I've done so far) shows the result in the Preview window, although of course the proof is in the actual muxed output viewed on a TV.
Nice work, thanks again. :thanks:
kikker
20th April 2009, 17:56
I wonder if this makes sense at all for SUPs. A Demuxer like EAC3TO will extract the whole stream even for BDs using seamless branching. So for me this looks like a whole lot of effort for a very unlikely use case.
Thanks, but not sure if you know what I meant. If I have two (or more) SUPs (one in English and one in Spanish), I would like to have your app allow for the creation of one IDX/SUB combo, where the both languages can be read from the one vobsub with VSfilter. This is what VSRip does with DVDs, that is, it creates one IDX/SUB containing multiple languages. If you understood my request, then I'm not sure I understand your reply. In short, if it would be a relatively time consuming affair, then it may not be worth it for the subset of those who would like to see this feature.:thanks:
0xdeadbeef
20th April 2009, 18:09
Thanks, but not sure if you know what I meant. If I have two (or more) SUPs (one in English and one in Spanish), I would like to have your app allow for the creation of one IDX/SUB combo, where the both languages can be read from the one vobsub with VSfilter. This is what VSRip does with DVDs, that is, it creates one IDX/SUB containing multiple languages. If you understood my request, then I'm not sure I understand your reply.
I assumed you meant merging several pieces in serial. Then again, I still don't get the benefit of that request. What's wrong with exporting severals Vobsub files and then using them as input for an authoring tool/muxer/whatever? That's what I'm doing all the time.
Anyway: support for multiple input files at a time is very unlikely to happen.
kikker
20th April 2009, 18:27
Fair enough. I just like to archive the subs outside the container, and I can't think of anything else that might improve/enhance this app.
saint-francis
20th April 2009, 19:56
Fair enough. I just like to archive the subs outside the container, and I can't think of anything else that might improve/enhance this app.
Yeah, this tool is plain fantastic. It has worked perfectly for me for a while now. As far as I can see the only way to improve it would be to make it like vobsub in how vobsub doesn't need demuxed .sup's and can output multiple tracks in one set of sub/idx files like you say. These features are not necessary at all.
BDSup2Sub seems to be the final link in being able to work with the new format.
Surf
21st April 2009, 00:56
Hello,
As recent as version 3.2 I have not yet have a direct workable sub/idx when converting downward to 720x480 for DVD....
So far I have stumbled on this long roundabout way of achieving the muxable sup....
1st, using the SubToSup it and then load it to Dvdsubedit in which I need to adjust the blue color and de-emphasize to get the result.
Please, anyone who share a few pointers to get the sub/idx properly in one shot?
TIA.
GZZ
21st April 2009, 13:27
Tried your application 0xdeadbeef and it looks good, but the framerate conversion has a flaw or else I dont understand it correctly. If I load a sup file with a source framerate of 23.976 and set the target output to 25 fps then my input starttime on the first subtitle goes from 00:00:41.375 to 00:00:41.360, but if I in conversion settings click on "Change frame rate" and leave it at 23.976 fps (target fps is still 25fps), then my starttime goes from 00:00:41.375 to 00:00:39.680 like it should (from my own calculations).. Do I miss something here or is this a bug ?
Second when I load my first subtitle and set output resolution to 1920x1080 (same as input) then the coordinates calculated are:
Source:
Screen Size: 1920x1080
Image Size: 445x53
Pos: (737, 962) - (1182, 1015)
then the destination window shows:
Screen Size: 1920x1080
Image Size: 445x53
Pos: (737, 962) - (2657, 2042)
The resolution is the same, but how can it be the X, Y coordinate for the lower-right corner is set to a position which it out of the image resolution ?
0xdeadbeef
21st April 2009, 16:30
Tried your application 0xdeadbeef and it looks good, but the framerate conversion has a flaw or else I dont understand it correctly.
[...]
Do I miss something here or is this a bug ?
This is neither a flaw nor a bug and the behavior is explained in the online help.
In short: If you only set the output frame rate, the idea is firstly to patch a wrong frame rate to a correct value in the output stream (SUP/XML) without applying a speedup. Secondly this is meant to synchronize all time stamps to exact frame times. So even if the output frame frame equals the input frame rate, chances are that time stamps are slightly shifted by a few ms if the time stamps in the source files were not synchronized to the frame rate.
Only if the "convert frame rate" checkbox is activated, the frame times are really multiplicated by a speedup/speeddown factor that is derived from the given source and target frame rate. Of course the frames are synchronized to the output frame rate and the frame rate is written to the SUP/XML for this case as well.
Second when I load my first subtitle and set output resolution to 1920x1080 (same as input) then the coordinates calculated are:
[...]
The resolution is the same, but how can it be the X, Y coordinate for the lower-right corner is set to a position which it out of the image resolution ?
Thanks for reporting, yet this is just a dumb display bug. For the lower right coordinates, the screen width/height is added to the coordinates instead of the image width/height.
Will be fixed in the next release, but this doesn't affect the exported files in any way.
GZZ
21st April 2009, 17:36
In short: If you only set the output frame rate, the idea is firstly to patch a wrong frame rate to a correct value in the output stream (SUP/XML) without applying a speedup. Secondly this is meant to synchronize all time stamps to exact frame times. So even if the output frame frame equals the input frame rate, chances are that time stamps are slightly shifted by a few ms if the time stamps in the source files were not synchronized to the frame rate.
So if I get it right (from reading the help and what you are saying) you convert the last ms to frames and then round it to nearest integer frame.
Ex. 38 ms at 23.976 is 0,911 frame, its then rounded to 1 frame, which makes it 40 ms at 25 fps. Is there any benefits like better playback Compatibility ? Please explain. :)
If the above is correct, then why dosnt it apply if the input framerate match the output framerate ?
0xdeadbeef
21st April 2009, 18:10
So if I get it right (from reading the help and what you are saying) you convert the last ms to frames and then round it to nearest integer frame.
Ex. 38 ms at 23.976 is 0,911 frame, its then rounded to 1 frame, which makes it 40 ms at 25 fps.
Well, all times are handled internally in 90kHz resolution. This representation is rounded up/down to the nearest multiple of frame duration for all time stamps.
Is there any benefits like better playback Compatibility ? Please explain. :)
At least for VobSubs, a caption's display duration should always be a multiple of the frame duration.
Anyway, it simply doesn't make much sense to start or end a caption at any other time than a multiple of the frame duration. Indeed, for a display device running at the correct output frequency, it's plain impossible to display a caption "inbetween" frames.
So, while I'm not 100% sure that it helps for playback compatibility with BD-SUPs, it surely doesn't hurt. And the fact that BDN XML format is based on frames as well just goes to show that this approach is not completely senseless.
GZZ
21st April 2009, 18:40
So, while I'm not 100% sure that it helps for playback compatibility with BD-SUPs, it surely doesn't hurt. And the fact that BDN XML format is based on frames as well just goes to show that this approach is not completely senseless.
Thanks for explaning it.
0xdeadbeef
21st April 2009, 19:23
21.04.2009 3.4.0 -> 3.4.1
Fixed: scaling images from/to 1 pixel width/height led to division by zero/out of memory in scalers (happened with empty PNGs after cropping).
Now scaling from/to this small sizes is inhibited. Also bitmaps in the target are limited to a minimum of 2x2 pixels.
Fixed: lower right coordinates displayed for target were wrong, also the window offsets were displayed for the source instead of image offsets.
alc0re
22nd April 2009, 04:05
0xdeadbeef
In regards to a few posts above this one...someone said he can't think of any other way to improve this great tool you have authored. I whole heartedly agree that this is an amazing tool that has saved me soooo much time having to ocr sup files. On that note I did think of something that would make this tool even better that I have been meaning to ask for but have forgotten to until now. I understand that you remove some of the special effects found in the .sup files because your original intent with this tool was converting to .sub format (or whatever the format is...the idx one.) But why remove those special effects when the target output format is bluray .sup? I think it would be the icing on the cake to leave those special effects intact when outputting to bluray .sup format, and would probably even improve the conversion from say a 1080p to 720p resize. As I understand it, having to remove some of those special effects can sometimes cause (as per your documentation) "unpredictable output." Anyways, just wanted to throw out that request. It might not be a very high priority for you and since I know nothing about programming, I really don't know how time consuming that would be.
Thanks again for your program.
0xdeadbeef
22nd April 2009, 17:40
While this would be possible, there are quite a few problems with this feature. The main issue is that BDSup2Sub's whole design is based on the idea of plain captions (start, end, image). All the internal data structures are based on that idea and the parser is streamlined to simplify the SUPs during import.
Also, currently the lower window is a perfectly valid preview of the image stored in the output stream. Now for an animated caption that's updated every e.g. 40ms for dozens of times, what should I display? The idea of an animated preview gives me headaches for quite a couple or reasons. Then again, without animation, it would be impossible for the user to determine if using this "keep animations" feature would make sense at all.
There are lots of other issues though, e.g.:
I'd need to parse the input SUP differently depending on the output format.
Preserving palette animations would be extremely difficult if new palettes are created. Keeping the palette reduces the antialiasing quality though (at least if the original palette is lacking).
Calculating the correct PTS/DTS offsets for every element of a complex stream is quite a nightmare. Since there are still reports that BD-SUPs are not shown in PowerDVD and some standalones even for the extremely simple SUP format created by BDSup2Sub, I don't really expect I would get that to work in a reasonable amount of time.
Last but not least, I'd guess that about 1% of the SUPs on current BDs actually use palette or cropping animations. And I'd assume that in 90% of these few cases it's used for a simple alpha fade in/out. Now more or less rewriting the whole application to keep some alpha fading doesn't seem to be worthwhile.
alc0re
22nd April 2009, 19:03
Yah I kinda figured that it would be a lot of work.
Oh well...if it gets implemented one day ok...if not the tool is still awesome.
Thanks
GZZ
22nd April 2009, 19:39
I was coming to the same conclusion as 0xdeadbeef, also animated subtitles will be huge and I'm not sure the user will even detect the fade in/out as it only a 1-2 sec long, maybe it gives subtitles smoother preview, but when you have several subtitle after each other (because they speak alot and fast) animation would be almost nil. Been. I had one bluray once with a 1.2 GB sup file, all the subtitles was animated, sadly it was before I started working on BDSubEdit, so I dont have it anymore and cant remember the title. IHHHH!!!, but today I know why it was that big and still cant see the reason for it. Hopefully someone finds a bluray with a extreme subtitle file, could be fun to just see it in action, see if the animation gives the effect people are thinking about. But for BD5/BD9 keeping the subtitles to a minimum in size would be best. :)
0xdeadbeef
22nd April 2009, 21:51
I was coming to the same conclusion as 0xdeadbeef, also animated subtitles will be huge and I'm not sure the user will even detect the fade in/out as it only a 1-2 sec long, maybe it gives subtitles smoother preview, but when you have several subtitle after each other (because they speak alot and fast) animation would be almost nil.
[...]
But for BD5/BD9 keeping the subtitles to a minimum in size would be best. :)
Well, this is a little simplified. Firstly, real bitmap animations are not removed by BDSup2Sub, only palette and cropping animations are. The space needed by cropping animations is more or less negligible, and palette animations can be rather small as well. While BD-SUPs can't redefine only the alpha channels (as HD-DVD SUPs can), BD-SUPs can use palette updates of only a few colors. E.g. If only 64 palette entries are faded out, this costs only 256 bytes per palette animation frame (not taking into account the size of the enclosing epoch frame etc.). So fading costs only a few kb per caption which is not too much compared with the typical size of the RLE buffer.
Also from my experience, very large SUPs are not blown up by palette animations, but by garbage which is really completely useless. Obviously the tools used for commercial authoring are pretty crappy. I saw SUPs were the RLE buffer of about each and every frame is repeated (byte identical) for 4 or 5 times. Apart from increasing the stream size, I can't seem to find any sense in this.
That being said: there is a small chance that some future version of BDSup2Sub might be able to keep/recreate cropping and palette animations. Then again, it's surely no high priority issue and currently I somewhat don't feel like messing around with the parser after it's finally working so good.
alc0re
23rd April 2009, 02:03
Getting an error with the .sup from american gangster bluray.
Screen cap of error linked
http://www.mediafire.com/imageview.php?quickkey=tdynzjm2d2c&thumb=6
:thanks:
GZZ
23rd April 2009, 09:09
you should upload the subtitle, so it can be tested.
0xdeadbeef
23rd April 2009, 11:19
Yep, please upload the (zipped) SUP to a one click hoster and send me a PM. I'll have a look later - currently I have to earn my living (and we don't even have Java6 here) ;)
pleinlesyeux
24th April 2009, 10:44
Hi
I had a similar problem yesterday. The .sup would load, then when I specified the output res and click ok, got ugly java error messages I can't decipher at all.
I opened the .sup in supread, extract it to sup (yeah, doesn't make much sense to me)
Then BDsup2sub accepted it no problem. I'll test the backup today.
0xdeadbeef
24th April 2009, 10:52
Now really, what do you expect me to do with error descriptions like this???
Come on guys. How am I supposed to fix issues with SUPs if you don't give me the according SUPs???
Since obviously nobody reads it, let me quote the third paragraph of the initial posting in this thread:
To report problems with a SUP, please either post the SUP (if it is compliant with the forum rules) or upload it to a "one click hoster" and send me a PM with the link.
0xdeadbeef
24th April 2009, 17:10
24.04.2009 3.4.1 -> 3.4.2
Fixed: crash when the very last epoch was discarded because of missing ODS/PDS.
Mtz
26th April 2009, 02:38
Here is a m2ts sample from a HD camera: http://www.cstone.net/~dk/00009.m2ts
I extracted the streams, including subtitles with tsmuxer. When loading into BdSub2Sub, only 38 lines are processed. The PGS subtitle converted to SRT with SupRip resulted in 74 subtitles.
I saw in SRT, that in one second is displayed the same subtitle twice (0.5 sec.X2). In the BdSub2Sub processed SUP is one subtitle in one second, but not full 1 second, just half.
Requests:
- if is possible to export the same number of subtitles
- if is possible to move all subtitles to bottom-right corner. Now I can edit the frame, but the edited is not applyed to all. In move all captions I cant move X position, only Y.
Offtopic: strange is that the original m2ts played with no subtiles in MPC HC, but the remuxed m2ts with tsmuxer is showing the subtitles.
enjoy,
Mtz
0xdeadbeef
26th April 2009, 16:08
When loading into BdSub2Sub, only 38 lines are processed. The PGS subtitle converted to SRT with SupRip resulted in 74 subtitles.
Well, dunno what you were doing, but BDSup2Sub as well as as SupRip 1.14 both show 38 captions. Maybe you were using an older version of SupRip that processes multiple version of identical bitmaps differently.
I saw in SRT, that in one second is displayed the same subtitle twice (0.5 sec.X2). In the BdSub2Sub processed SUP is one subtitle in one second, but not full 1 second, just half.
Showing the captions twice is wrong, as replacing an image with the same image should be the same as keeping the image.
Therefore SupRip as well as BDSup2Sub keep the image and only update the end time.
Then again, it's true that SupRip creates longer display times (1s) than BDSup2Sub (0.5s) in this very special case. I'll have to take a closer look to see what's happening there, but I'd assume that this is probably a bug in BDSup2Sub.
Requests:
- if is possible to export the same number of subtitles
It is importing the same correct number as SupRip 1.14. Importing twice the captions would be wrong and for sure I won't consider to implement things that I know are wrong.
- if is possible to move all subtitles to bottom-right corner. Now I can edit the frame, but the edited is not applyed to all. In move all captions I cant move X position, only Y.
This is a very special use case and IMHO useless for movie captions. Dunno if I want invest time in stuff like this.
Offtopic: strange is that the original m2ts played with no subtiles in MPC HC, but the remuxed m2ts with tsmuxer is showing the subtitles.
The captions in the PGS are pretty uncommon. There's only one start epoch and then every new caption is appended as acquisition epoch. While this is allowed as far as I know, I have never seen this in a BD PG stream.
Also repeating the same ODS segment for every caption is useless at least and might lead to problems.
Tools creating SUPs usually create a simpler format that is easier to parse.
0xdeadbeef
26th April 2009, 18:32
26.04.2009 3.4.2 -> 3.4.3
Fixed: when merging equal captions inside an epoch, the end time was not always updated correctly.
SquallMX
26th April 2009, 20:09
26.04.2009 3.4.2 -> 3.4.3
Fixed: when merging equal captions inside an epoch, the end time was not always updated correctly.
Can you add to your ToDo list VobSub Input, please:o?, for people doing DVD2BD5 rips (You can put 2/3 480p movies in a single layer DVD with great quality) there is no way to keep subtitles unless you go the painful (and slow) "Vobsub-->OCR-->Spell Check-->TSMuxer" way. I now that DVD subtitles aren't that good looking because the 2-bit palette color but IMHO are better that OCR subs or no subs.
:thanks:
0xdeadbeef
26th April 2009, 20:59
If so, it would be really time for a new name. Who would guess that a tool that is called BDSup2Sub indeed converts Subs to BD-Sups ;) ?
choyu
27th April 2009, 12:26
@0xdeadbeef
Thanks for the great work.
Will it be possible later to add idx/sub(vobsub) input?
For me,I really hope that your great tool can convert idx/sub(vobsub) subtitles to BD sup,because I want to use this converted sup to mux with SD MPEG-2 video stream(720x480/576,VOB files) by tsMuxer and finally make it AVCHD playback in PS3 HDD.
Thanks again!
0xdeadbeef
27th April 2009, 18:31
Let's say I'm seriously considering it. Then again, don't expect anything to happen in the next days or so.
kikker
27th April 2009, 18:38
Would love the ability to input vobsubs as well and will wait patiently. Thanks, 0xdeadbeef
Mtz
27th April 2009, 20:20
That sample is from a HD cam and many people will buy HD cams. Some of them will want to keep their videos in HD format and want to see the date and time. Some of them will want to make a conversion including time code as subtitles.
Back ontopic:
SupRip 1.14 exported this srt because I unchecked "combine identical subtitles":
1
00:00:00,000 --> 00:00:00,565
MAR 11 2008 5:05:52PM
2
00:00:00,566 --> 00:00:01,065
MAR 11 2008 5:05:53PM
3
00:00:01,066 --> 00:00:01,566
MAR 11 2008 5:05:53PM
4
00:00:01,567 --> 00:00:02,066
MAR 11 2008 5:05:54PM
5
00:00:02,067 --> 00:00:02,567
MAR 11 2008 5:05:54PM
6
00:00:02,568 --> 00:00:03,067
MAR 11 2008 5:05:55PM
7
00:00:03,068 --> 00:00:03,568
MAR 11 2008 5:05:55PM
8
00:00:03,569 --> 00:00:04,068
MAR 11 2008 5:05:56PM
9
00:00:04,069 --> 00:00:04,569
MAR 11 2008 5:05:56PM
10
00:00:04,570 --> 00:00:05,069
MAR 11 2008 5:05:57PM
11
00:00:05,070 --> 00:00:05,570
MAR 11 2008 5:05:57PM
12
00:00:05,571 --> 00:00:06,070
MAR 11 2008 5:05:58PM
13
00:00:06,071 --> 00:00:06,571
MAR 11 2008 5:05:58PM
14
00:00:06,572 --> 00:00:07,071
MAR 11 2008 5:05:59PM
15
00:00:07,072 --> 00:00:07,572
MAR 11 2008 5:05:59PM
16
00:00:07,573 --> 00:00:08,072
MAR 11 2008 5:06:00PM
17
00:00:08,073 --> 00:00:08,573
MAR 11 2008 5:06:00PM
18
00:00:08,574 --> 00:00:09,073
MAR 11 2008 5:06:01PM
19
00:00:09,074 --> 00:00:09,574
MAR 11 2008 5:06:01PM
20
00:00:09,575 --> 00:00:10,074
MAR 11 2008 5:06:02PM
21
00:00:10,075 --> 00:00:10,575
MAR 11 2008 5:06:02PM
22
00:00:10,576 --> 00:00:11,075
MAR 11 2008 5:06:03PM
23
00:00:11,076 --> 00:00:11,576
MAR 11 2008 5:06:03PM
24
00:00:11,577 --> 00:00:12,076
MAR 11 2008 5:06:04PM
25
00:00:12,077 --> 00:00:12,577
MAR 11 2008 5:06:04PM
26
00:00:12,578 --> 00:00:13,077
MAR 11 2008 5:06:05PM
27
00:00:13,078 --> 00:00:13,578
MAR 11 2008 5:06:05PM
28
00:00:13,579 --> 00:00:14,078
MAR 11 2008 5:06:06PM
29
00:00:14,079 --> 00:00:14,579
MAR 11 2008 5:06:06PM
30
00:00:14,580 --> 00:00:15,079
MAR 11 2008 5:06:07PM
31
00:00:15,080 --> 00:00:15,580
MAR 11 2008 5:06:07PM
32
00:00:15,581 --> 00:00:16,080
MAR 11 2008 5:06:08PM
33
00:00:16,081 --> 00:00:16,581
MAR 11 2008 5:06:08PM
34
00:00:16,582 --> 00:00:17,081
MAR 11 2008 5:06:09PM
35
00:00:17,082 --> 00:00:17,582
MAR 11 2008 5:06:09PM
36
00:00:17,583 --> 00:00:18,082
MAR 11 2008 5:06:10PM
37
00:00:18,083 --> 00:00:18,583
MAR 11 2008 5:06:10PM
38
00:00:18,584 --> 00:00:19,083
MAR 11 2008 5:06:11PM
39
00:00:19,084 --> 00:00:19,584
MAR 11 2008 5:06:11PM
40
00:00:19,585 --> 00:00:20,084
MAR 11 2008 5:06:12PM
41
00:00:20,085 --> 00:00:20,585
MAR 11 2008 5:06:12PM
42
00:00:20,586 --> 00:00:21,085
MAR 11 2008 5:06:13PM
43
00:00:21,086 --> 00:00:21,586
MAR 11 2008 5:06:13PM
44
00:00:21,587 --> 00:00:22,086
MAR 11 2008 5:06:14PM
45
00:00:22,087 --> 00:00:22,587
MAR 11 2008 5:06:14PM
46
00:00:22,588 --> 00:00:23,087
MAR 11 2008 5:06:15PM
47
00:00:23,088 --> 00:00:23,588
MAR 11 2008 5:06:15PM
48
00:00:23,589 --> 00:00:24,088
MAR 11 2008 5:06:16PM
49
00:00:24,089 --> 00:00:24,589
MAR 11 2008 5:06:16PM
50
00:00:24,590 --> 00:00:25,089
MAR 11 2008 5:06:17PM
51
00:00:25,090 --> 00:00:25,590
MAR 11 2008 5:06:17PM
52
00:00:25,591 --> 00:00:26,090
MAR 11 2008 5:06:18PM
53
00:00:26,091 --> 00:00:26,591
MAR 11 2008 5:06:18PM
54
00:00:26,592 --> 00:00:27,091
MAR 11 2008 5:06:19PM
55
00:00:27,092 --> 00:00:27,592
MAR 11 2008 5:06:19PM
56
00:00:27,593 --> 00:00:28,092
MAR 11 2008 5:06:20PM
57
00:00:28,093 --> 00:00:28,593
MAR 11 2008 5:06:20PM
58
00:00:28,594 --> 00:00:29,093
MAR 11 2008 5:06:21PM
59
00:00:29,094 --> 00:00:29,594
MAR 11 2008 5:06:21PM
60
00:00:29,595 --> 00:00:30,094
MAR 11 2008 5:06:22PM
61
00:00:30,095 --> 00:00:30,595
MAR 11 2008 5:06:22PM
62
00:00:30,596 --> 00:00:31,095
MAR 11 2008 5:06:23PM
63
00:00:31,096 --> 00:00:31,596
MAR 11 2008 5:06:23PM
64
00:00:31,597 --> 00:00:32,096
MAR 11 2008 5:06:24PM
65
00:00:32,097 --> 00:00:32,597
MAR 11 2008 5:06:24PM
66
00:00:32,598 --> 00:00:33,097
MAR 11 2008 5:06:25PM
67
00:00:33,098 --> 00:00:33,598
MAR 11 2008 5:06:25PM
68
00:00:33,599 --> 00:00:34,098
MAR 11 2008 5:06:26PM
69
00:00:34,099 --> 00:00:34,599
MAR 11 2008 5:06:26PM
70
00:00:34,600 --> 00:00:35,099
MAR 11 2008 5:06:27PM
71
00:00:35,100 --> 00:00:35,600
MAR 11 2008 5:06:27PM
72
00:00:35,601 --> 00:00:36,100
MAR 11 2008 5:06:28PM
73
00:00:36,101 --> 00:00:36,601
MAR 11 2008 5:06:28PM
74
00:00:36,602 --> 00:00:00,-001
MAR 11 2008 5:06:29PM
http://img144.imageshack.us/img144/949/supripdate.th.jpg (http://img144.imageshack.us/my.php?image=supripdate.jpg)
The last line have the wrong time code and this is a known bug in SupRip. If not edited for example in 00:00:36,999, it will be skipped.
But the first time code is: 00:00:00,000 and this is very interesting because:
- if muxing the exported SRT with TSMuxer, in MPCHC the first subtitle will be this:
61
00:00:30,095 --> 00:00:30,595
MAR 11 2008 5:06:22PM
- if muxing the original MTS adding the exported subtitles by BDSup2Sub the first subtitle showed in MPC is:
MAR 11 2008 5:06:22PM
That is the same result as using SRT.
But if I edit the first line of SRT and put:
00:00:00,065 instead of 00:00:00,000, after remuxing with TSMuxer, all subtitles will be showed.
If muxing the original MTS with no changes the result will play all subtitles OK. And as I wrote, the original MTS played in MPCHC showed no subtitles, and I think TSMuxer is doing a good job.
I SupRipped the output subtitle from BDSup2Sub and the first time code was: 00:00:00,000 and maybe this is the reason why is not any subtitle showed until MAR 11 2008 5:06:22PM. But the question is: if the original SUP have the starting time code the same as BDSup2Sub export, why the original SUP from the exported TSmuxer M2TS is playing OK?
Also I saw some differences in the SupRip SRT file from the exported BDSup2Sub:
Original SRT:
1
00:00:00,065 --> 00:00:00,565
MAR 11 2008 5:05:52PM
2
00:00:00,566 --> 00:00:01,065
MAR 11 2008 5:05:53PM
3
00:00:01,066 --> 00:00:01,566
MAR 11 2008 5:05:53PM
BDSup2Sub SRT:
1
00:00:00,000 --> 00:00:00,541 (original is 565)
MAR 11 2008 5:05:52PM
2
00:00:00,583 --> 00:00:01,542
MAR 11 2008 5:05:53PM
3
00:00:01,584 --> 00:00:02,543 (original is 566)
MAR 11 2008 5:05:54PM
I see that 2 identical 500ms subtitles are intended to be "muxed" in 1000 ms subtiles by BDSup2Sub (but only 959ms achieved), but the interesting thing is that the 1 ms difference is in the starting AND finish timecodes as you can see on the red and blue marks.
Back to my requests, if is not possible to move all subtitles on the right corner, using BDSup2Sub for editing is useless, because original subtitles are displayed better than the actual output of BDSup2Sub. You can make a small test adding the exported BDSup2Sub subtitle with that file from my previous link and see:
- the position of timecode subtitles (personally I don't like that position, is a no brain position)
- not continuous play of the exported BDSup2Sub subtitle compared with the original. I agree is not correct to show twice the same subtitle but in HD cams example, the difference between 3 subpictures maybe to be 1ms to obtain a continuous play.
enjoy,
Mtz
turbojet
27th April 2009, 20:32
Another way for DVD to BD subs is to support dvd sup (http://www.sendspace.com/file/9u3dlo) input.
It saves a little time and quality over vobsub.
Outputting dvd sup format could be beneficial for BD to DVD conversions too.
0xdeadbeef
27th April 2009, 22:07
That sample is from a HD cam and many people will buy HD cams.
Which doesn't mean that all of them will create crappy PGS streams like this.
SupRip 1.14 exported this srt because I unchecked "combine identical subtitles":
Still, this doesn't make sense. If there's an update in an epoch and the ODS stays identical, there should be no gap visible. So merging the identical captions is correct.
But the first time code is: 00:00:00,000 and this is very interesting because:
- if muxing the exported SRT with TSMuxer, in MPCHC the first subtitle will be this:
61
00:00:30,095 --> 00:00:30,595
MAR 11 2008 5:06:22PM
Which is wrong.
- if muxing the original MTS adding the exported subtitles by BDSup2Sub the first subtitle showed in MPC is:
MAR 11 2008 5:06:22PM
That is the same result as using SRT.
Not surprising. Bug in either tsMuxer or MPC-HC. Who knows.
If muxing the original MTS with no changes the result will play all subtitles OK. And as I wrote, the original MTS played in MPCHC showed no subtitles, and I think TSMuxer is doing a good job.
Well, either tsMuxer or MPC-HC isn't.
I SupRipped the output subtitle from BDSup2Sub and the first time code was: 00:00:00,000
That's the first time stamp inside the original stream and it is preserved by either method.
But the question is: if the original SUP have the starting time code the same as BDSup2Sub export, why the original SUP from the exported TSmuxer M2TS is playing OK?
Hard to follow you here as you already claimed the opposite:
strange is that the original m2ts played with no subtiles in MPC HC, but the remuxed m2ts with tsmuxer is showing the subtitles.
Also I saw some differences in the SupRip SRT file from the exported BDSup2Sub:
If you read the online help, you'd knew that BDSup2Sub synchronizes time stamps to the output frame rate.
Back to my requests, if is not possible to move all subtitles on the right corner, using BDSup2Sub for editing is useless,
Then don't use it.
shon3i
27th April 2009, 22:24
Another way for DVD to BD subs is to support dvd sup (http://www.sendspace.com/file/9u3dlo) input.
It saves a little time and quality over vobsub.
Outputting dvd sup format could be beneficial for BD to DVD conversions too.
Outputing DVD sup will be ideal because all DVD mastering tools (IfoEdit, Muxman, etc) accept's only .SUP, to be hornest i newer saw any mastering DVD app that use SUB/IDX? correct me if i wrong, also since converting between SUP <-> IDX/SUB sometimes isn't possible, because only app can do this (SubtitleCreator) can properly open IDX/SUB files maded by BDSup2Sub.
SquallMX
27th April 2009, 22:34
Another way for DVD to BD subs is to support dvd sup (http://www.sendspace.com/file/9u3dlo) input.
It saves a little time and quality over vobsub.
Outputting dvd sup format could be beneficial for BD to DVD conversions too.
Second that:D!!!
Mtz
28th April 2009, 07:13
I wrote this:
the original MTS played in MPCHC showed no subtitles
and this:
the original SUP from the exported TSmuxer M2TS is playing OK
This mean that if only I open the M2TS in tsmuxer and just export it, it will play in MPCHC.
Even if the output framerate wasn't OK there is still a gap between subtitles:
2
00:00:00,583 --> 00:00:01,542
MAR 11 2008 5:05:53PM
3
00:00:01,584 --> 00:00:02,543
MAR 11 2008 5:05:54PM
But I found the good gap for the red and blue timings (1ms). Please check the reading/export timecodes in your program, because I think there is a bug.
Regarding the 00:00:00,000 problem, maybe you can add a hack that will put some value (for example 50ms) if the first subtitle start with 000 because will not hurt in any way the subtitles display.
I know in the first SRT example the FPS output was not correct but my observations are still valid even on a 29.970 FPS output regarding the red and blue. Same subtitles lines:
2
00:00:00,567 --> 00:00:01,533
MAR 11 2008 5:05:53PM
3
00:00:01,568 --> 00:00:02,534
MAR 11 2008 5:05:54PM
Correct timmings should be:
2
00:00:00,566 --> 00:00:01,566
MAR 11 2008 5:05:53PM
3
00:00:01,567 --> 00:00:02,567
MAR 11 2008 5:05:54PM
I hope at least to find the timming bugs and to implement the little 000 hack even if you don't want to make possible to move the subtitles on some corner. All I want is to help you with this nice application.
enjoy,
Mtz
0xdeadbeef
28th April 2009, 11:26
Even if the output framerate wasn't OK there is still a gap between subtitles:
Two captions can't be displayed at once. So when synchronizing the time stamps to the frame rate, one caption has to end one frame before the next one is displayed. That's not a gap as there's no frame without a caption.
I hope at least to find the timming bugs
AFAIK there are none.
Mtz
28th April 2009, 11:39
It seems that I can't explain better, sorry for my english. I will try again:
In the original SUP, these are the subtitles and the timmings:
2
00:00:00,566 --> 00:00:01,065
MAR 11 2008 5:05:53PM
3
00:00:01,066 --> 00:00:01,566
MAR 11 2008 5:05:53PM
4
00:00:01,567 --> 00:00:02,066
MAR 11 2008 5:05:54PM
5
00:00:02,067 --> 00:00:02,567
MAR 11 2008 5:05:54PM
Your program will join (which is correct) the 2 and 3 and of course, 4 and 5. But the resulted timmings must to be:
2
00:00:00,566 --> 00:00:01,566
MAR 11 2008 5:05:53PM
3
00:00:01,567 --> 00:00:02,567
MAR 11 2008 5:05:54PM
enjoy,
Mtz
0xdeadbeef
28th April 2009, 11:42
No, re-read my above posts.
Mtz
28th April 2009, 11:51
OK, I'll give up. I just hope that someday you will understand that I'm right. Also the SupRip join feature have this bug. Working with text subtitles for more than 5 years and I saw over that 3000 srt subtitles, checking them for errors with subtitles workshop and also I helped the author of that program for fixing some minor bugs and translating the program in my language.
Good luck! You are making a very nice job, but seems that sometimes not looking deep in some posts.
Edit: just for fun, play these 3 subtitles test with any video: http://uploaded.to/file/d4bo9v Will cost you 1.30 minutes.
enjoy,
Mtz
Ulf
28th April 2009, 12:55
- if is possible to move all subtitles to bottom-right corner. Now I can edit the frame, but the edited is not applyed to all. In move all captions I cant move X position, only Y.
If you open your SUP in BDSup2Sub and save it as XML/PNG you'll get a XML file you can edit to achieve what you want. Part of the XMl file will look as this:
<Event InTC="00:00:00:00" OutTC="00:00:00:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0001.png</Graphic>
</Event>
<Event InTC="00:00:00:17" OutTC="00:00:01:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0002.png</Graphic>
</Event>
<Event InTC="00:00:01:17" OutTC="00:00:02:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0003.png</Graphic>
</Event>
<Event InTC="00:00:02:17" OutTC="00:00:03:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0004.png</Graphic>
</Event>
<Event InTC="00:00:03:17" OutTC="00:00:04:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0005.png</Graphic>
</Event>
<Event InTC="00:00:04:17" OutTC="00:00:05:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0006.png</Graphic>
</Event>
<Event InTC="00:00:05:17" OutTC="00:00:06:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0007.png</Graphic>
</Event>
<Event InTC="00:00:06:17" OutTC="00:00:07:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0008.png</Graphic>
</Event>
<Event InTC="00:00:07:17" OutTC="00:00:08:16" Forced="False">
<Graphic Width="576" Height="36" X="896" Y="900">00009_0009.png</Graphic>
</Event>
You can for example change all occurences of X="896" to X="1194". Increase Y if you want to move your subs further down. Then you import your XML to BDSup2Sub and save it as a SUP.
From what I can see from the XML file, BDSup2Sub handles the in/out timings completely correctly (frame accurately). The timings in a XML file are in the format HH:MM:SS:FF, where FF is frames. The timings in a XML file are somewhat confusing - they are given as if the frame rate is 30 fps when the frame rate is actually 29.97 fps.
One benefit is that the timings are completely unambiguous.
Note that there is no frame missing a subtitle, they all go out in on frame 17 and out on frame 16.
Ulf
29th April 2009, 10:27
0xdeadbeef,
Could you please make it an option in BDSup2Sub to merge/not merge identical subtitles if they are separated in time.
I have an example where the same subtitle is shown twice, with a short brake in between. If you look at the movie, it's quite clear that they are meant to be shown like this. BDSup2Sub (v3.4.3) are merging the two into one.
If I export the original SUP to XML/PNG by SUPread, one can see that the two identical subs are separated in time (three frames with no subtitle shown):
<Event InTC="00:49:44:11" OutTC="00:49:47:05" forced="False">
<Event InTC="00:49:47:09" OutTC="00:49:49:14" forced="False">
whereas BDSup2Sub merge the two:
<Event InTC="00:49:44:11" OutTC="00:49:49:14" Forced="False">
If InTC for the second (identical) subtitle was InTC="00:49:47:06", it would be no gap in time and merging would be OK.
0xdeadbeef
29th April 2009, 14:48
Currently BDSup2Sub uses a fixed time difference (200ms) to decide whether to merge identical captions or not (at least if there is a gap at all). BTW: merging is only implemented for BD-SUPs, as multiple repetition of the very same bitmap with short/no gaps is a common problem of this format (only).
The main reason for not letting the user set this value was that it's already needed during parsing. So I'd either need an additional dialog before loading the file or you'd need to reload the file after changing the option. Both seems awkward. The only proper way would be to move the merging from the parsing code to the scanning code, but this is a lot of effort.
The only quick'n'dirty solution I could offer was to make this (only) a command line option for the moment.
Honestely, I don't see any benefit in this anyway. In 99.99% of the cases where identical subtitles have a gap < 200ms, it's an authoring fault. And really: IMHO it seems strange to insist on getting a short flicker instead of a constant display.
So, in a nutshell: while it's not impossible that some future version will implement this (as GUI option), this is about as low in priority as can be. Indeed chances are it will never happen as rewriting the parser and scanning code just for this doesn't sound very appealing to me.
Ulf
29th April 2009, 15:39
The only quick'n'dirty solution I could offer was to make this (only) a command line option for the moment.
It would be great if one could set the "gap time" as a command line option!
turbojet
29th April 2009, 20:45
These bdn xml subs (http://www.mediafire.com/download.php?knl1nkzh3oz) crashes the gui after loading, error log is included in the zip.
The bdn xml subs were created with avs2bdnxml (http://forum.doom9.org/showthread.php?t=146493). BDSupEdit loads and outputs them correctly.
0xdeadbeef
29th April 2009, 22:13
These bdn xml subs (http://www.mediafire.com/download.php?knl1nkzh3oz) crashes the gui after loading, error log is included in the zip.
Nope. The Java Virtual Machine crashes on your PC. This is not a crash of BDSup2Sub and the sample XML works ok for me.
I'd assume it's a bug in the 64bit implementation of the JVM - at least that seems to be the most likely solution if your PC is stable otherwise.
turbojet
29th April 2009, 22:30
Must be 64 bit jvm, I wonder how I'd go about reporting that. Any ideas?
Edit: Also I noticed the vobsub output can't be joined with VobSubMuxer (http://www.trustfm.net/divx/SoftwareVobsubMuxer.php?page=VobsubMuxerDownload&b2=1) but it works with dvd subs from gabest vobsub and subtitlecreator. Is there a chance BDSup2Sub vobsub output could be changed to support it?
Edit2: I found out what's causing it.
If you change these BDSup2Sub lines:
# Language
langidx: 0
id: en, index: 0
# Vob/Cell ID: 1, 1 (PTS: 0)
to what gabest vobsub tools produce:
# Language index in use
langidx: 0
# English
id: en, index: 0
# Decomment next line to activate alternative name in DirectVobSub / Windows Media Player 6.x
# alt: English
# Vob/Cell ID: 1, 1 (PTS: 0)
It works so the commented lines must have some meaning.
micha019
1st May 2009, 11:17
Hello,
BDSup2Sub is a fantastic tool.
Will there be soon a support to convert *.idx back to *.sup?
Or is it already possible and I can't find the option to load *.idx/sub files?
0xdeadbeef
1st May 2009, 12:01
It works so the commented lines must have some meaning.
Well, a comment is a comment and while it's ok to parse comments to get additional info, I would call a tool buggy that insists on certain comments instead of taking them for what they are.
Still, while I'm not really keen on adding workarounds for bugs in other people's tools I can add that in the next version.
Will there be soon a support to convert *.idx back to *.sup?
Or is it already possible and I can't find the option to load *.idx/sub files?
Currently, there is no support to load SUB/IDX. Then again, chances are that there will be.
turbojet
1st May 2009, 12:25
Well, a comment is a comment and while it's ok to parse comments to get additional info, I would call a tool buggy that insists on certain comments instead of taking them for what they are.
Still, while I'm not really keen on adding workarounds for bugs in other people's tools I can add that in the next version.
Thanks as I have a feeling VobsubMuxer development is dead and while the same type of error had been mentioned in the forum over there in february, all that was offered was a workaround by running it through vobsub resync.
mrr19121970
3rd May 2009, 15:01
I tried what you suggested:
http://forum.slysoft.com/showpost.php?p=194612&postcount=5
but even on my machine it's in:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
I think it's best for the user to locate their own RTE.
Thanks anyway.
0xdeadbeef
3rd May 2009, 16:52
but even on my machine it's in:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
This is a general issue of 64bit versions of Windows XP/Vista but shouldn't have an influence on applications reading the key. See e.g.:
http://www.insidetheregistry.com/regdatabase/browse.asp?keyid=387
Anyway, the registry key and the suggested approach both are correct.
http://java.sun.com/javase/6/webnotes/runtime_windows.html
0xdeadbeef
3rd May 2009, 20:16
Changed too much, tested too little. So chances are I messed some things up. Side note: some (multi packet) VobSubs created by versions < 2.1 can't be imported (since they were indeed partly corrupt). Also the support for VobSub import is pretty basic currently. No detection of fading and other fancy things (yet).
03.05.2009 3.4.3 -> 3.5.0
Changed: added support for importing VobSub (SUB/IDX)
Changed: forced flags are preserved when exporting to VobSub
Changed: added/changed comments in IDX files to workaround bug in VobsubMuxer
Changed: added command line switch (/tmerge) for setting the maximum time for merging (BD-SUP) captions
Changed: end time of one frame can be start time of the next frame (no forced gap of 1 frame any more)
Fixed: assumed number of pixels in odd/even RLE buffers was wrong for captions with odd line numbers
Fixed: scaling of very small captions (like 3x3) could still lead to crashes when using filters with large radius
SquallMX
3rd May 2009, 22:18
Changed too much, tested too little. So chances are I messed some things up. Side note: some (multi packet) VobSubs created by versions < 2.1 can't be imported (since they were indeed partly corrupt). Also the support for VobSub import is pretty basic currently. No detection of fading and other fancy things (yet).
03.05.2009 3.4.3 -> 3.5.0
Changed: added support for importing VobSub (SUB/IDX)
Changed: forced flags are preserved when exporting to VobSub
Changed: added/changed comments in IDX files to workaround bug in VobsubMuxer
Changed: added command line switch (/tmerge) for setting the maximum time for merging (BD-SUP) captions
Changed: end time of one frame can be start time of the next frame (no forced gap of 1 frame any more)
Fixed: assumed number of pixels in odd/even RLE buffers was wrong for captions with odd line numbers
Fixed: scaling of very small captions (like 3x3) could still lead to crashes when using filters with large radius
Hi, :thanks::thanks::thanks::thanks::thanks:, but I found a bug for VobSub input, the timecodes for the input and output files are totally wrong:
http://www.imagechile.net/img/img6_1241384968w.png
http://www.imagechile.net/img/img8_1241385416f.png
Sample Sub:
http://rapidshare.com/files/228836683/Bourne.rar
According to subtitlecreator the timecode for the first subtitle is: 00:00:02,102 --> 00:00:04,139, and for the next subtitle is 00:00:04,238 --> 00:00:07,014, ¿bad timecode parsing?
:helpful::helpful::helpful:
0xdeadbeef
3rd May 2009, 23:41
Yeah, didn't test that much ;)
03.05.2009 3.5.0 -> 3.5.1
Fixed: VobSub: delay was read from wrong position of control buffer (-> wrong end time).
turbojet
3rd May 2009, 23:59
Thanks for the new version.
VobsubMuxer now accepts vobsub output.
shon3i
4th May 2009, 16:18
@0xdeadbeef, what about DVD SUP (+IFO palete) I/O ? VobSub isn't common format for many DVD muxers?
0xdeadbeef
4th May 2009, 17:47
I hate to disappoint you, but this is very unlikely to happen.
SquallMX
4th May 2009, 18:29
@0xdeadbeef, what about DVD SUP (+IFO palete) I/O ? VobSub isn't common format for many DVD muxers?
Most DVD SUP can be converted to VOB/IDX using Subtitle Creator 2.2+, and vice versa.
turbojet
5th May 2009, 07:44
Is there much of a difference outside of headers between BD and DVD sup's?
I would think it would be easier to implement then vobsub actually.
@0xdeadbeef: Great program, very handy for BD to DVD conversions. One thing though: On VobSub-Export, could you use a Padding Stream (i.e. 0x000001BE) instead of just stuffing 0xFF's till the pack end?
0xdeadbeef
5th May 2009, 11:34
Is there much of a difference outside of headers between BD and DVD sup's?
Both formats have more or less nothing in common. IMHO HD-DVD-SUPs are closer to DVD-SUPs, but still very different.
I would think it would be easier to implement then vobsub actually.
My understanding is that the DVD-SUP stream format should be pretty close to the SUB file of SUB/IDX, but reading the start times from the SUP, determining which the real start and end of the caption and handling the IFO for the palette make quite a difference. Regarding export, writing the palette to an IFO seems very messy.
@0xdeadbeef: Great program, very handy for BD to DVD conversions. One thing though: On VobSub-Export, could you use a Padding Stream (i.e. 0x000001BE) instead of just stuffing 0xFF's till the pack end?
I'm not sure if I can follow you here. The packets/segments are aligned to 0x800 so unused part of a package is filled with padding bytes. In all the samples I saw, 0xff is used as padding byte - probably as this is also the end command.
Deadbeef, this is about the calculation of stream lengths. Let me show a subtitle pack (this is from DVDLab, as displayed by VobEdit):
[Pack Header]
[0000] Pack identifier (start code) 442 [000001ba]
[0004] SCR (System clock reference) 68 2 156 173 181 99 [44 02 9c ad b5 63 ]
SCR 02725302.177
[000a] Program Mux Rate: 25200 (1260000 BPS) (10080000 bps) 1 137 195 [01 89 c3 ]
[000d] Pack stuffing length: 0 248 [f8]
[Private Stream 1]
[000e] Private Stream 1 start code 445 [000001bd]
[0012] Length 1728 [06c0]
In this particular stream, the private stream doesn't use up all of the 2k of the pack, but just 0x6C0 bytes, putting the end position to 0x6D4 relative to the start of the pack. Unfortunately some parsers expect the next Header Prefix (0x00 0x00 0x01) to follow immediately. If you just put a bunch of 0xFF here, there is no more Header and Stream/Pack-Parsing may crash. The correct way to pad to the pack end is to use a Padding Stream (as shown below). It has the Prefix (0x00 0x00 0x01) and stream ID 0xBE. Add the length (0x126, the remainder to the end of the pack) and then finally pad 0x126 bytes (usually 0xFF as you have seen in most streams).
[Padding Stream]
[06d4] Padding Stream start code 446 [000001be]
[06d8] Length 294 [0126]
You may also encounter streams, where the remainder to pad is less than 6 bytes (what you would actually need to place a padding stream header). If this is the case, fill the Pack Stuffing field of the Pack Header with the byte count of the padding (Byte 13, Bits 0-2)
turbojet
5th May 2009, 13:30
My understanding is that the DVD-SUP stream format should be pretty close to the SUB file of SUB/IDX, but reading the start times from the SUP, determining which the real start and end of the caption and handling the IFO for the palette make quite a difference. Regarding export, writing the palette to an IFO seems very messy.
Oh I forgot dvd sup relies on ifo for palette. While input from dvd sup would be badly colored you do have the option to change palette within the program or with vobsub. Also the ability to get colors from an ifo would help.
As for as export I agree writing an ifo would be a mess but there's an alternative at least with pgcedit by importing/exporting raw clb or rgb txt files. (http://www.mediafire.com/download.php?jtmnxdvmkdd)
Changed: end time of one frame can be start time of the next frame (no forced gap of 1 frame any more)
Thank you! If is not difficult, I hope you can force 100-300 ms for the first subtitle if the starting value is: 00:00:00,000
So, if first line start with: 00:00:00,000, to have in the saved SUP: 00:00:00,300 In my tests with MPC-HC and tsmuxer are some problems and also my TViX refuse to play this file and I suspect the problem is that 000 ms. 300 ms can't harm the reading of a subtitle.
enjoy,
Mtz
0xdeadbeef
5th May 2009, 17:16
Deadbeef, this is about the calculation of stream lengths. Let me show a subtitle pack (this is from DVDLab, as displayed by VobEdit):
[...]
I still don't get what this has to do with SUB/IDX export. AFAIK DVDLab doesn't export SUB/IDX and VobEdit doesn't import SUB/IDX for sure. So it seems to me that you confuse VobSub (as synonym for SUB/IDX) with VOB. As the SUB file contains snippets from the SUP stream embedded in the VOB, there are some similarities of course but still it should be clear that a SUB file from SUB/IDX is not a transport stream that can be used directly for muxing.
In this particular stream, the private stream doesn't use up all of the 2k of the pack, but just 0x6C0 bytes, putting the end position to 0x6D4 relative to the start of the pack. Unfortunately some parsers expect the next Header Prefix (0x00 0x00 0x01) to follow immediately.
I'm still not convinced that you're talking about VobSub (aka SUB/IDX) here. A SUB/IDX parser would be pretty much braindead to expect the header prefix after a complete caption as the offset to the next caption is defined in the IDX file. Again: are you sure you're talking about VobSub = SUB/IDX and not about VOB or DVD-SUP???
If you just put a bunch of 0xFF here, there is no more Header and Stream/Pack-Parsing may crash. The correct way to pad to the pack end is to use a Padding Stream (as shown below). It has the Prefix (0x00 0x00 0x01) and stream ID 0xBE. Add the length (0x126, the remainder to the end of the pack) and then finally pad 0x126 bytes (usually 0xFF as you have seen in most streams).
Indeed I'd bet that most tools featuring SUB/IDX import would plain crash if I did so.
0xdeadbeef
6th May 2009, 18:30
06.05.2009 3.5.1 -> 3.5.2
Changed: VobSub: wrong packet length is detected and fixed (-> now SUB/IDX files exported before 2.1 can be imported)
Changed: VobSub: improved luminance threshold detection when importing SUB/IDX files.
it seems to me that you confuse VobSub (as synonym for SUB/IDX) with VOB.
No, I'm pretty much aware of the differences, although after discussing this with you I'm not too sure if my assumptions about VobSub are correct. Until now I have perceived .sub as a multiplexed program stream with a private stream inside - a subtitle stream according to DVD specs - and the .idx for a bunch of additional information as to e.g. timing, palette, file positions and some other things. Given the fact that .sub looks very much like a program stream, coming with pack and stream headers and all that stuff, I was confused why the packs ended early (because, from a parser's view, after the end of a stream there is either another stream or the end of the pack). Obviously VobSub doesn't care about PS-conformity. Some VobSubs are padded in a PS-conform way (e.g. those generated from DVB-Subtitles by ProjectX), others just fill up with 0xFF (as I have seen in VobSubs created by SubtitleCreator)
VobEdit doesn't import SUB/IDX for sure
You'd be amazed what VobEdit will import. Contrary to its name it will edit any program stream you feed it (but indeed, it will crash on displaying packs #2-n of a .sub that doesn't use a padding stream).
Indeed I'd bet that most tools featuring SUB/IDX import would plain crash if I did so.
You mean if the VobSub used a padding stream? Why do you think so? Anyway, I'd wager against it. :) I'm convinced that a VobSub-Import would simply ignore anything after the end of the pack's subtitle stream (including a padding stream or plain 0xFF-Padding), and will look for the next stream at the file position given from .idx. At least BDSup2Sub and SubResync will import a VobSub + padding stream without problems.
0xdeadbeef
7th May 2009, 11:34
Hm, I would assume that by adding the padding bytes, the SUB would get very close to a (DVD-)SUP. I never really examined the DVD-SUP format closely enough to tell for sure. I kinda fear that if I go in that direction people will jump onto the bandwagon and insist that the SUB is a 100% consistent and muxable DVD SUP stream. And this idea honestly gives me headaches.
BTW: Did you test if tools like MKVMerge and SubtitleCreator accept SUB files with padding? If so, I might consider adding the padding (and it rhymes, too).
0xdeadbeef,
BDSup2Sub only treats a "PAL" XML file correctly on import if the video format is specified as "576p" in the XML file. If the video format is specified as "576i" (which is the correct way to specify the format), BDSup2Sub seems to assume that the import format is 1080p.
Could you correct this?
I guess it's the same thing with "480i", but I haven't tried it.
0xdeadbeef
7th May 2009, 15:48
Admittedly, I kinda didn't care much about interlaced formats up to now. Now regarding the BDN XML format the question arises if a frame (for the time stamp) is an interlaced frame or a progressive frame.
mrr19121970
7th May 2009, 17:47
Do you think it would be possible, when executing say:
java.exe -jar BDSup2Sub.JAR '*.sup' '*_FORCED.sup' /res:1080 /forced
to not stop when
#> 1542 (01:38:51.217)
ERROR: No forced subtitles found.
Press any key to continue . . .
is found, but to continue to the next file ?
that would be great.
0xdeadbeef
7th May 2009, 18:42
Yep, will be changed in the next version. Indeed the try/catch-block is already inside the loop, but currently each error exits the program.
mrr19121970
7th May 2009, 18:45
is this likely to happen soon, otherwise I'll change clown_bd - but I'm sure you're faster than me ;)
0xdeadbeef
7th May 2009, 18:59
Just two quick fixes, untested. Ulf, mrr19121970 please have a look.
07.05.2009 3.5.2 -> 3.5.3
Changed: when converting multiple files from the command line, a fatal error will not quit the program but just skip the file.
Fixed: BDN XML: 576i and 480i are used for PAL and NTSC instead of 576p and 480p.
mrr19121970
7th May 2009, 19:24
great, works 4 me. thanks.
Fixed: BDN XML: 576i and 480i are used for PAL and NTSC instead of 576p and 480p.
Thanks 0xdeadbeef - works fine! :)
HeartWare2
8th May 2009, 07:53
Thank you for this excellent program. It works fine, but... (there's always a "but" :-))
I have tried - unsuccessfully - to use this program to deliver something that I can process further with SubRip to do OCR scanning of the subtitles, but so far without any luck. I have tried 720p SUB/IDX, which kinda works, but for some pics SubRip seems to not be able to decode the file properly (shows garbage).
The PAL output seems to be processable, but due to the resizing, it is quite often that SubRip can't recognize the same letter as being such, which leads to an awful lot of manual entering of letters.
1080p SUB/IDX doesn't seem to be supported at all by SubRip.
I have also tried the PNG output, which I then converted to BMP using PMView (again 720p), but these files doesn't seem to be properly read by SubRip either.
Would it be possible to have your program output SUB/IDX files in a format compatible with SubRip (f.ex. without RLE encoding or something like that?).
Or if anyone knows about another utility that can du OCR processing on the SUB/IDX files created by BDSup2Sub (preferably the 1080p versions, as these should be clearer and thus easier to do successful OCR processing on).
0xdeadbeef
8th May 2009, 10:31
SupRip?
HeartWare2
8th May 2009, 12:16
Thanks for the suggestion. It's a great step on the way, but the parser is not as good as SubRip's (fails to find spaces between words and doesn't in many cases recognize letters already specified). It may be that I can make a post-processing tool that - via a dictionary - can detect the "missing spaces" problem.
Anyone know of a big dictionary of various languages? I need it as a large text file with an alphabetic list of known words in correct spelling, preferably with several languages available.
Or if I could make SubRip work it probably would be better...
BTW: Did you test if tools like MKVMerge and SubtitleCreator accept SUB files with padding?
Both MKVmerge and SubtitleCreator accept and process .sub with padding stream. .mkv-Playback with VLC correctly displays the subs.
0xdeadbeef
8th May 2009, 15:51
I'm not so much concerned about the additional padding, but about the stuffing bytes (in case the padding size is < 6 bytes). I'd assume that some tools with SUB/IDX import consider them to be always 0.
0xdeadbeef
8th May 2009, 18:42
@prenz:
Hm, it seems my worries were not unfounded. SubtitleCreator doesn't open SUB/IDX streams with stuffing bytes (no crash, no warning, just behaves as nothing was loaded) and VobSub Resync simply doesn't display captions that use stuffing bytes in the packet header.
So while adding padding packets doesn't seem to hurt, using stuffing bytes obviously does. Or maybe I messed up the implementation. But I rather don't think so.
Besides, VobEdit doesn't seem to be much happier with the SUB using padding/stuffing. It displays more or less the same crap as for any other SUB. My impression is that even with the padding/stuffing, the SUB file is still too far from being a valid transport stream to allow VobEdit to parse it correctly.
Just for you (prenz) for testing, this is not an official release:
http://www.sendspace.com/file/7k2i9i
If you can't tell me that my implementation is buggy, I guess I won't take over these changes in the next release as they seem to make the created VobSubs incompatible to any application reading VobSub.
0xdeadbeef,
Something happened with v3.5.3 regarding 720p XML import - BDSup2Sub assumes 1080p on import.
mrr19121970
9th May 2009, 14:50
@0xdeadbeef
I have a couple of small requests for the log file:
1. show the incoming command line
2. for each of the converted files new name, old name (before or after the block of texts)
as this might be of interest when using wildcards like:
java.exe -jar bdsup2sub *.sub *-NEW.SUB
&
3. suppress warning etc that do no apply, for example when using /forced you don't need to see mesages about animations that weren't even extracted.
thanks...
0xdeadbeef
10th May 2009, 16:21
Something happened with v3.5.3 regarding 720p XML import - BDSup2Sub assumes 1080p on import.
Yep, unfortunately a side effect of my quick hack for 576i and 480i. Will be fixed in the next revision.
1. show the incoming command line
The whole command line is not available for a Java program. Only the arguments passed to the Java program are (and the path of the JAR can be determined with some tricks). I can print them out, but I don't think that makes much sense, as every option passed to BDSup2Sub is commented on anyway ("OPTION").
2. for each of the converted files new name, old name (before or after the block of texts)
as this might be of interest when using wildcards like:
java.exe -jar bdsup2sub *.sub *-NEW.SUB
I don't quite get this either. The source and target file names are already printed in the console (Loading xxx, Writing yyy) and the wildcarded names should be known to the caller anyway. Then again, this happens only in verbatim mode (since I introduced this), so I guess I should print this even in silent mode.
3. suppress warning etc that do no apply, for example when using /forced you don't need to see mesages about animations that weren't even extracted.
This is not easily possible as these warning are printed during the first parsing of the SUP, when also the "forced" flags are determined. Besides, the "export only forced" option could be changed later from the GUI again.
0xdeadbeef
10th May 2009, 17:37
10.05.2009 3.5.3 -> 3.5.4
Changed: VobSub: control header now can be split over two packets. Seems to increase compatibility with SubtitleCreator.
Changed: some more info is printed in the non-verbatim output mode (loading/writing files)
Fixed: BDN XML: due to the last fix in 3.5.3, 720p was not recognized any more
I am receiving an error ("Invalid end sequence offset") with the latest release (3.5.4) when loading a VobSub idx file. Here is zip file containing the problematic files.
www.mirror.adubvideo.net/VIDEO_TS.zip
0xdeadbeef
11th May 2009, 11:35
Did it work with older versions? Does with work with other programs such as SubtitleCreator or VobSub Resync?
Anyway, it will take a while until I can have a look. Maybe not before tomorrow.
0xdeadbeef
11th May 2009, 18:23
Ok, I had a look. The error message is somewhat correct since not a single captions in this sample has a valid end sequence in its control buffer. Then again, I'm not 100% sure if this is allowed, so I'll add a workaround in the next version.
Anyway, since the end sequence is missing, also the end times are missing. This is also visible when opening the file with VobSub Resync.
mrr19121970
11th May 2009, 21:22
This is a general issue of 64bit versions of Windows XP/Vista but shouldn't have an influence on applications reading the key. See e.g.:
http://www.insidetheregistry.com/regdatabase/browse.asp?keyid=387
Anyway, the registry key and the suggested approach both are correct.
http://java.sun.com/javase/6/webnotes/runtime_windows.html
Here is a standalone checker, the same function I've installed in Clown_BD:
JAVA Version Check (http://www.clownbd.com/JAVA Version Check.exe)
I've tested on Vista & XP x32 & x64. Should be 'future proof', assuming JavaxFamily is derived from CurrentVersion 1.x
Thanks for the HD DVD to BD conversion. I was fed up using conversion to srt. I have only used it twice but it worked great each time. Also, using mrr19121970's Clown_bd makes the conversion even more effortless.
0xdeadbeef
12th May 2009, 18:41
I'd be really interested under which circumstances the created BD-SUPs display on a standalone and under which they don't.
Anyway, a minor update again:
12.05.2009 3.5.4 -> 3.5.5
Changed: VobSub: added padding packets (and stuffing bytes via PTS length) to the exported stream.
Changed: VobSub: invalid offset to end sequence only throws a warning, but import continues.
Fixed: VobSub: entries in 4 color frame palette were truncated to two bits during import.
Fixed: VobSub: padding by manipulating the PTS length was not always processed correctly during import.
Jaja1
13th May 2009, 13:58
Yesterday I revisited some problematic sup files. Suprip and supread can't read them at all and earlier versions of BDSup2Sub weren't able to give correct sup => sub conversions. However BDSup2Sub has now grown to a mature status, it gives great results on all these pain-in-the-ass .sups. Very much appreciated.
A question about the situation that there are more English .sups in a movie. For instance the main .sup, commentary and forced .sup. When I playback for instance a m2ts file with external subs (.sup converted to .sub in Zoomplayer or MPC-HC) it is impossible to see which one is which. I only see three subtitles all named "English". Would it be possible to give them a meaningfull name? This is possible with .srt files. Or is another party (vobsub?) responsible for this.
0xdeadbeef
13th May 2009, 16:55
Yesterday I revisited some problematic sup files. Suprip and supread can't read them at all and earlier versions of BDSup2Sub weren't able to give correct sup => sub conversions. However BDSup2Sub has now grown to a mature status, it gives great results on all these pain-in-the-ass .sups. Very much appreciated.
Nice to hear. Anyway: from my experience, SupRip is handling much more (probllematic) SUPs correctly than SupRead. Both don't handle transparency animations though.
A question about the situation that there are more English .sups in a movie. For instance the main .sup, commentary and forced .sup. When I playback for instance a m2ts file with external subs (.sup converted to .sub in Zoomplayer or MPC-HC) it is impossible to see which one is which. I only see three subtitles all named "English". Would it be possible to give them a meaningfull name? This is possible with .srt files. Or is another party (vobsub?) responsible for this.
AFAIK the information about language etc. is not located inside the M2TS transport stream, but inside some BD structure (probably MPLS). E.g. if you use EAC3TO to print out information about an M2TS transport stream, it doesn't name the subtitle tracks etc., while it does so when you use EAC3TO on the BD structure or a playlist ( like "1)" ).
So indeed this information is lost after demuxing (or even when copying only an M2TS from a BD folder to a new location) if it's not stored somewhere else. That's why it's usually a good idea to name the demuxed subtitle streams according to the info EAC3TO displays. Indeed if you demux all streams, EAC3TO automatically names the SUP files in this way.
Anyway, the file name is the only thing that BDSup2Sub can use to determine the (possible) language of a SUP file. That's why it scans the file name for language names (like "English", "German", "French") and preselect the language. When storing a format that includes language info (like VobSub or BDN XML), this language will be used if nothing else is selected in the export dialog.
Arshad07
13th May 2009, 23:48
I cant get it to open with java. Its opening with my Nokia Application file :( Any help please
Thanks
Use the command line.
Simply type:
java -jar my/path/to/my/application
Arshad07
14th May 2009, 00:04
Getting this error
http://i39.tinypic.com/260qudx.png
0xdeadbeef
14th May 2009, 00:07
Sure that Java is installed correctly?
Try this (http://clownbd.techxt.com/Downloads/JAVA%20Version%20Check.exe) to check.
If a JRE 1.6 is installed then most probably the JAR extension was associated to another application. But it looks like Java is not installed correctly.
Arshad07
14th May 2009, 00:08
Sure that Java is installed correctly?
Try this (http://clownbd.techxt.com/Downloads/JAVA%20Version%20Check.exe) to check.
If a JRE 1.6 is installed then most probably the JAR extension was associated to another application. But it looks like Java is not installed correctly.
http://i42.tinypic.com/28gqpsw.png
Yea, it was associated with my Nokia Application s/w
0xdeadbeef
14th May 2009, 00:19
This should work if you replace "your path" with your installation path for BDSup2Sub.
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar "your path\BDSup2Sub.jar"
Anyway, something went wrong with your Java installation as neither the PATH nor the association seems to be set up correctly.
Maybe you should consider deinstalling Java and reinstalling JRE 6 from here (http://java.sun.com/javase/downloads/index.jsp).
Arshad07
14th May 2009, 00:24
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar "your path\BDSup2Sub.jar"
Yea this works. Thanks. But should I do this everytime i need to open BDSup2Sub? :confused:
Arshad07
14th May 2009, 00:25
Maybe you should consider deinstalling Java and reinstalling JRE 6 from here (http://java.sun.com/javase/downloads/index.jsp).
which one to download? :confused:
0xdeadbeef
14th May 2009, 00:31
Yea this works. Thanks. But should I do this everytime i need to open BDSup2Sub? :confused:
Well, you could create a Desktop link. Or you could repair the file association for JAR manually. Or you could reinstall Java.
which one to download? :confused:
JRE 6 Update 13 (it's somewhat in the middle)
Arshad07
14th May 2009, 00:35
JRE 6 Update 13 (it's somewhat in the middle)
I installed this^ and it works now! Thanks a lot mate! keep up the great work :)
Hello Ox,
SubtitleCreator still refuses to import the 720x480 sub/idx your latest version created. Still saying something like "improper format" unsupported...
I have ajusted nothing regarding threshold this and that, just adjusted the 23.976 fps. Surely I am missing something? Would you or anyone else explain to a layman like me what those dropdowns/thresholds mean?
I still have to use Sub2sup to generate the sup to be imported by DVDsubedit for final cleanup. Such as colors, de-emphasizing.
Sorry I don't know how to use technical terms to tell you.
TIA
0xdeadbeef
14th May 2009, 01:19
SubtitleCreator still refuses to import the 720x480 sub/idx your latest version created. Still saying something like "improper format" unsupported...
Well, all the VobSubs I tried lately were imported correctly by SC. So either you're doing something terribly wrong or there is a special problem with your file.
I have ajusted nothing regarding threshold this and that, just adjusted the 23.976 fps. Surely I am missing something? Would you or anyone else explain to a layman like me what those dropdowns/thresholds mean?
It's all explained in the online help. I you don't bother to read it, why would I bother to explain? Anyway, this has nothing to do with your import problem anyway.
Then again, if you had read at least the first posting in this thread, you'd know what to do to get help.
I still have to use Sub2sup to generate the sup to be imported by DVDsubedit for final cleanup. Such as colors, de-emphasizing.
And I still don't know heck what you're talking about.
Sorry I don't know how to use technical terms to tell you.
To spare you reading the first posting: just upload your (zipped) VobSub and send me the link.
Arshad07
14th May 2009, 01:55
It's all explained in the online help
What online help? :confused: I've looked everywhere but couldnt find it :confused:
Lol. Arshad07, there is a help file within the program. At least I know about that part.
Ox, one thing I am good at is to read and read. However your help file is just to techy for me, that's all.
The movie in question is "Body of Lies".
Well, I am going to try some more movies to confirm.
0xdeadbeef
14th May 2009, 07:24
Ox, one thing I am good at is to read and read.
[...]
The movie in question is "Body of Lies".
Well, most obviously you didn't even read my last answer completely. Else you'd know that a title doesn't help. If you want me to have a look at your file(s), upload it/them to a one-click hoster and send me the link.
deank
14th May 2009, 14:19
Thanks for this handy program. I included it in multiAVCHD for DVD to Blu-ray / DVD to AVCHD conversions.
Great work!
Dean
Arshad07
14th May 2009, 16:34
Am facing an issue here.....
First i load my SUP file into BDS2S
http://i39.tinypic.com/2s6274i.png
then i save it as idx/sub....and when i load it into subrip to OCR it, am getting this
http://i40.tinypic.com/908w8k.png
Any help please
thanks
It may be due to the fact that Subrip has some issues when loading straight from an IDX/SUB. Are all of your subtitle's like that? Or is there just a couple of parts? If so, then just use the "skip" options to move past the bad subtitles.
0xdeadbeef
14th May 2009, 17:13
Am facing an issue here.....
[...]
then i save it as idx/sub....and when i load it into subrip to OCR it, am getting this
[...]
Any help please
I think this was discussed before (last page of this thread) and while I don't use SubRip myself, I got the impression that SubRip can't handle SUB/IDX with more than PAL/NTSC resolution (and you most obviously created a VobSub in 1080p resolution). Indeed nearly no program supporting SUB/IDX does support hires VobSubs, as this format is closely related to DVDs which are limited to PAL/NTSC resolution. This is also discussed in the online help btw.
So if you need to OCR, you should either export to PAL/NTSC resolution or use SupRip directly on the BD-SUP.
Thanks for this handy program. I included it in multiAVCHD for DVD to Blu-ray / DVD to AVCHD conversions.
Thanks for telling me. That makes at least three conversion tools by now that use BDSup2Sub for caption conversion.
Arshad07
14th May 2009, 17:14
It may be due to the fact that Subrip has some issues when loading straight from an IDX/SUB. Are all of your subtitle's like that? Or is there just a couple of parts? If so, then just use the "skip" options to move past the bad subtitles.
all the way its like that.
But it works fine with an older version of Subrip :confused: although the characters are too big. But still it works, i just have to change it to NTSC in BDS2S....and the texts become smaller. Then OCR it.....but it seems all the characters have different structures. I have to OCR ALL CHARACTERS....plus my matrix file doesnt work for this older version :(
0xdeadbeef
14th May 2009, 17:55
But still it works, i just have to change it to NTSC in BDS2S....and the texts become smaller. Then OCR it.....but it seems all the characters have different structures.
That is mainly because the width/height of a 1080p screen is not an integer multiple of a NTSC/PAL screen. E.g. 1080/480 = 2.25, so one pixel in the NTSC equals 2.25 pixels in 1080p, so the same character is usually sampled differently at two different locations.
Then again, also the neighboring pixels influence each pixel when scaling, so even when scaling down by a factor of 2 or three, an "e" next to an "i" will be look slightly different compared to an "e" next to a "w" after scaling.
Anyway, this seems to an issue of SubRip with hires Vobsubs, so if SupRip is not an option, you should try to convince the author of SubRip to either allow 1080 resolutions for VOB/SUB or to implement import of BDN XML format, which is essentially only a PNG bitmap for each caption and an XML file with all the timing/additional info. Compared to parsing a typical binary transport stream, this is a piece of cake, so maybe he is willing to implement this.
Besides, I'm a little puzzled that none of the people here at Doom9 came up with the idea to tinker a script/Delphi Tool/whatever that OCRs the PNGs from an BDN XML export with a professional OCR tool and then puts together an SRT from the OCR output and the info inside the Xml.
prenz
14th May 2009, 20:52
@prenz:
Hm, it seems my worries were not unfounded. SubtitleCreator doesn't open SUB/IDX streams with stuffing bytes (no crash, no warning, just behaves as nothing was loaded) and VobSub Resync simply doesn't display captions that use stuffing bytes in the packet header.
So while adding padding packets doesn't seem to hurt, using stuffing bytes obviously does. Or maybe I messed up the implementation. But I rather don't think so.
Sorry for responding late. I've checked multiple .subs (and fiddled a lot with them using some quick-hack-C++) , and I agree that header stuffing causes serious problems. Also I don't see any problems with your implementation; header padding is done the way it's supposed to be. Obviously SubtitleCreator simply doesn't give a damn about the header stuffing and goes for a stream header straight away.
I still have to figure out, how ProjectX deals with such situations, where the needed padding is less than 6 bytes. So far, none of my ProjectX-VobSubs has used any header padding (and for my own implementation of inserting padding streams, it turns out I screwed up and put the header padding at the end of the pack, not the end of the pack header... D'oh!)
Anyway this probably means I've lost our bet - you were right: program stream conformity actually hurts VobSub when using header padding.
0xdeadbeef
14th May 2009, 22:01
You may have noticed that I decided to introduce padding anyway in 3.5.5. After analyzing several SUB files with padding I came to the conclusion that (for whatever reason) the 6 remaining bytes are not handled by stuffing bytes but by increasing the PTS length.
Both SC and VobSub Resync accept SUBs with an increases PTS length, so that seems to be the way to go.
deank
14th May 2009, 23:18
Hi again!
I have the following problem:
Decoding frame 11/1037 at offset 0x0000a800
Decoding frame 12/1037 at offset 0x0000b800
Decoding frame 13/1037 at offset 0x0000c800
Decoding frame 14/1037 at offset 0x0000d800
Decoding frame 15/1037 at offset 0x0000e800
Decoding frame 16/1037 at offset 0x0000f800
Decoding frame 17/1037 at offset 0x00010800
ERROR: Corrupt buffer offset information
BDsup2Sub imports all subpictures but won't export them to SUP - stops with the error and the rest is not included.
Let me know if I can be of any help with this.
Here (http://multiavchd.deanbg.com/dvddump.rar) is a link to the problematic pair, extracted with mencoder from my Y Tu Mama Tambien DVD.
http://multiavchd.deanbg.com/bdse.jpg
Dean
0xdeadbeef
15th May 2009, 00:46
Hm, ok, I analyzed it and the problem stems from an invalid size entry at offset 0x1081d:
0x10800:
000001BA pack ID
400000000000 (invalid) system clock reference
000000 (invalid) multiplexer rate
00 (invalid) stuffing info
000001BD subpacket ID
07EC (valid) packet length
8080 packet type
05 210241F0C1 PTS
20 Stream ID
07E4 (invalid) Subpicture size in bytes (offset: 0x1081d + 0x7e4 = 0x011001)
07C6 (valid) Offset to control header
Apart from the fact that the info in the pack header is invalid (which is irrelevant for the subtitle info though), the main problem is that the subpicture size given (0x7e4) is simply one byte too large. That's why BDSup2Sub assumes that the control buffer is incomplete and continues with the next pack which is however the wrong decision in this case.
Anyway: although IMHO this is a bug in the stream, the next version will have a workaround for this issue. Already works locally but it's nearly 2 o'clock in the morning around here and I'm too tired to release an update right now, so you'll have to wait a few hours while I get a nap.
If you can't wait, you could also try to patch the size at offset 0x1081d from 0x7e4 to the correct value of 0x7e3. Haven't tested this, but in theory, this should work with the current version of BDSup2Sub.
deank
15th May 2009, 09:38
Thanks.
It seems there are a lot of problem streams and this particular generates 200-300 warnings... If it is possible to make bdsup2sub to ignore the erroneous segments (not to include the subpictures) and add all it can decode it will be nice (if it doesn't do it already).
I'll try with patching the value, just for a test.
***
Yes, it worked but stopped again at another offset with "Corrupt buffer offset information". I suspected it will happen - probably the subtitle stream is not authored properly and has a lot of errors, but if your tool can skip/fix those it will be great!
0xdeadbeef
15th May 2009, 11:02
Most of the warnings are due to missing end times. Though this is allowed in the DVD caption transport stream AFAIK, this currently gives a warning in BDSup2Sub as my original understanding was that in a VobSub, each control buffer needs an end sequence.
It's hard to tell if the main issue is an authoring fault, a bug in the demuxer or something that is on the edge of what is allowed.
To me this looks like a bug in either the authoring tool or demuxer that happens only if the pack is one byte too large. Instead of appending an additional pack for that one byte, it's simply dropped, but the size info is not decreased accordingly.
Anyway, here's the update:
15.05.2009 3.5.5 -> 3.5.6
Changed: VobSub: parsing of packet is now always stopped when reaching offset of next caption even if control buffer is incomplete.
deank
15th May 2009, 11:59
Thanks for the update!
I just converted a DVD and now all subtitles show fine!
:thanks:
0xdeadbeef
16th May 2009, 20:07
16.05.2009 3.5.6 -> 3.6.0
Changed: added editing of "forced" flags (via edit dialog)
Changed: added possibility to exclude single captions from export (via edit dialog)
Changed: added erasing of rectangular regions (via edit dialog)
Changed: VobSub: bitmaps are automatically cropped on import
deank
16th May 2009, 20:30
Changed: VobSub: bitmaps are automatically cropped on import
How does this change affect the import of VobSub (visually)? (asking just to be safe)
turbojet
16th May 2009, 20:38
Is there a way to change start and end time per sub? I tried editing but preview/re-edit/output kept the original times.
Also is there a way to specify a delay or change one subs start time and all others can be changed like vobsub resync?
If not, any plans for adding either of these?
0xdeadbeef
16th May 2009, 21:21
How does this change affect the import of VobSub (visually)? (asking just to be safe)
Only transparent pixels are cropped. E.g. in your sample VobSub, each caption was stored as (nearly) full screen image. Revision 3.6.0 crops that to the real bitmap.
If we want to be nit-picking, there might be minimal visual differences in the border pixels after scaling compared to the uncropped image (simply because additional half tone pixels could be created outside the cropping range when scaling).
Then again, as this also happens with typical captions which are already cropped, a general solution for this isssue is already on my list though.
Is there a way to change start and end time per sub? I tried editing but preview/re-edit/output kept the original times.
Well, there's an edit dialog for this since quite some time and it's described in the online help. If you either don't press return after editing or if you don't store the changes though (via "Save Changes" or "Ok" Buttons), they are not used of course. Hard to understand for me what is so complicated about this.
Also is there a way to specify a delay or change one subs start time and all others can be changed like vobsub resync?
Well, specifying a delay is in since revision 1.0. Again, I really dunno how to make this easier or clearer. You enter a value and press ok. In this (special) case, not even pressing return is needed. Though it generally never hurts to press return in any edit box of any application to give it the chance to validate the entered value.
turbojet
16th May 2009, 21:29
Well, there's an edit dialog for this since quite some time and it's described in the online help. If you either don't press return after editing or if you don't store the changes though (via "Save Changes" or "Ok" Buttons), they are not used of course. Hard to understand for me what is so complicated about this.
I change a frames time, save changes does not enable and ok button resets everything to original in preview/re-edit/output. After I press min/max/center/top/bottom or check forced/exclude the save changes button is activated but after pressing saving changes preview/re-edit/output are still identical, this is also the case with positioning. The only settings that stick are force and exclude. Oh 'return' has to be hit, very unusual but nevermind, solved now.
Well, specifying a delay is in since revision 1.0. Again, I really dunno how to make this easier or clearer. You enter a value and press ok. In this (special) case, not even pressing return is needed. Though it generally never hurts to press return in any edit box of any application to give it the chance to validate the entered value.
I was looking for it in edit frame settings but I notice it in the input window and it works, nevermind.
0xdeadbeef
16th May 2009, 22:00
I was looking for it in edit frame settings but I notice it in the input window and it works, nevermind.
It's a global conversion option, so it's in the conversion dialog. Why would you look for a global delay in the dialog to edit a single caption???
I change a frames time, save changes does not enable and ok button resets everything to original in preview/re-edit/output.
I'm pretty sure that the explanation in my last posting was already my 2nd trial to explain this, but ok, maybe third time is a charm:
If you enter a time or any other value in a text input field inside the edit dialog (or any other dialog), you have to press RETURN to allow BDSup2Sub to validate the value. After the value has been validated and has been found to be different from the original value, the save button is enabled.
Generally speaking, there are only three possibilities for a program to handle text edit boxes:
validate while typing: not (easily/if at all) usable to reformat/fix the input. Outside full featured syntax coloring text editors in the league of the Eclipse framework, this is only usable for the easiest of inputs (e.g. single characters).
validate when leaving the dialog: may lead to unexpected results if inputs are corrected or ignored, but the user is not informed. Also updates can't be processed while the dialog is active.
validate when pressing return: the user get's immediate feedback and sees if the value was fixed or invalid. Updates can be processed. Easy to implement and understand. Therefore the typical implementation.
So, in a nutshell, validating after pressing return seems to be the most (or even the only) sensible approach.
And again: these assumptions are not limited to BDSup2Sub. You're well advised to press return in any edit box of any tool if it's obviously not reacting during typing (which is something I personally hate in 99% of cases).
turbojet
16th May 2009, 22:22
It's a global conversion option, so it's in the conversion dialog. Why would you look for a global delay in the dialog to edit a single caption???
I'm used to changing a time of one and having it change other sub timings too. It's fine and probably makes more sense where it is but it's not what I'm used to so not where I expected.
I'm pretty sure that the explanation in my last posting was already my 2nd trial to explain this, but ok, maybe third time is a charm:
If you enter a time or any other value in a text input field inside the edit dialog (or any other dialog), you have to press RETURN to allow BDSup2Sub to validate the value. After the value has been validated and has been found to be different from the original value, the save button is enabled.
Generally speaking, there are only three possibilities for a program to handle text edit boxes:
validate while typing: not (easily/if at all) usable to reformat/fix the input. Outside full featured syntax coloring text editors in the league of the Eclipse framework, this is only usable for the easiest of inputs (e.g. single characters).
validate when leaving the dialog: may lead to unexpected results if inputs are corrected or ignored, but the user is not informed. Also updates can't be processed while the dialog is active.
validate when pressing return: the user get's immediate feedback and sees if the value was fixed or invalid. Updates can be processed. Easy to implement and understand. Therefore the typical implementation.
So, in a nutshell, validating after pressing return seems to be the most (or even the only) sensible approach.
And again: these assumptions are not limited to BDSup2Sub. You're well advised to press return in any edit box of any tool if it's obviously not reacting during typing (which is something I personally hate in 99% of cases).
This is the only gui, from what I can remember, where I've had to press 'enter' for a setting to stick while 'ok' and 'save changes' don't stick. Again I'm used to 'ok' and 'save changes' using the changes made. Come to think of it how would someone press 'enter' after changing this setting on a touchscreen?
0xdeadbeef
16th May 2009, 22:27
This is the only gui, from what I can remember, where I've had to press 'enter' for a setting to stick while 'ok' and 'save changes' don't stick. Again I'm used to 'ok' and 'save changes' using the changes made. Come to think of it how would someone press 'enter' after changing this setting on a touchscreen?
Hard for me to imagine that you really didn't understand it the third time. Then again: yeah well.
turbojet
16th May 2009, 22:44
Hard for me to imagine that you really didn't understand it the third time. Then again: yeah well.
I completely understand your text box pressing return assumption. It's just the only time I've ever seen this sort of text box behavior.
What is written in the help "The rest should be pretty self-explanatory. "Ok" stores the changes and returns, "Cancel" returns without taking over the changes, "Save Changes" stores the changes but doesn't close the dialog. "Prev" and "Next" skip to the previous/next subtitle without (!) saving the changes." and also what you wrote earlier today is not true in BDSup2Sub when typing in text boxes as 'enter' must be pressed however if text boxes are changed another way it is true.
But I got the program to do what I was trying to achieve from your first post which you claim I didn't understand so I'm done with this discussion.
0xdeadbeef
16th May 2009, 23:22
What is written in the help [..] and also what you wrote earlier today is not true [...]
*Sigh*. To the contrary, BDSup2Sub behaves exactly as described in the help and as I explained it several times. I even pointed out why this is more or less the only sensible way it could behave.
Then again, if you insist to claim the opposite, please don't expect that I'll bother to respond. I'm kinda tired to explain this again and again and again.
turbojet
17th May 2009, 00:56
No one asked you to explain it more then once, if it acted normally you'd never have to explain it at all.
Save generally means save, not save only if you hit enter after typing. The latter is exactly the rule in bds2up2sub. Imagine opening a text editor entering 1 line of text, save & close, reopen to find the line hadn't been saved because you didn't hit enter.
While it may be normal to you as you always hit enter after typing you can't expect every one else to do the same. By having this text box behavior and omitting any mention of having to hit 'enter' or 'return' after editing a text box I'm led to believe you expect every one else presses enter after editing. WYSINWYG
deank
17th May 2009, 01:55
Only transparent pixels are cropped. E.g. in your sample VobSub, each caption was stored as (nearly) full screen image. Revision 3.6.0 crops that to the real bitmap.
I'll give it a try tomorrow. I was thinking about the sample I sent you, because subpictures (as it seems - generated in full-screen) are placed too high in the video area, and the new option will make them go @ the bottom, which is really nice.
Dean
edit: Just tested it and it is perfect! Thanks!
Hello Ox,
Your most ardent supporter here. :D
Right upto your last version...still no luck inputting into Subtitlecreator...with 3 titles so far...2 avc and 1 vc1.
Load demuxed Sup by Tsmuxer.
Source NTSC, 23.976....target 720x480, same fps.
Did not touch anything! Hi-low, medium thresholds, nothing!
Save.
Load...no go.
How about chasing me away with a new sddvd compliant SUP output instead of the roundabout sub/idx? :D
TIA
0xdeadbeef
17th May 2009, 10:06
Right upto your last version...still no luck inputting into Subtitlecreator...with 3 titles so far...2 avc and 1 vc1.
And I still can only repeat the same advice I gave you several times: upload your samples (e.g. SUP and VobSub) to a one-click hoster and send me the link. I'm not quite sure what you expect in ignoring this advice several times and instead posting the same stuff over and over again.
Generally speaking (and repeating myself as well), compatibility to SC was always good: I tried hundreds of VobSub created by BDSup2Sub in (VobSub Resync) and SC and none ever completely refused to load. Before 3.5.4, some VobSub weren't displayed correctly (only) in SC (e.g. only half of the captions were displayed). Due to the changes in 3.5.4, I'm yet to find a VobSub that didn't display every caption correctly in SC.
Anyway, just for the sake of it, I just converted a few complex SUP to VobSub (NTSC, 24p) and loaded them in SC 2.2 and SC 2.3rc1. Both loaded the VobSubs without any glitch and showed all of the captions.
hubblec4
17th May 2009, 10:26
hello
here is a new sample (http://rapidshare.com/files/233938135/sup.rar.html) and a question to.
Some captions are colored but in the sub/idx-mode are all captions white.
I saw in SC you can choose different colors for the captions.
Is it possible to keep the Sup-color in the vobsub.idx-file?
hubble
0xdeadbeef
17th May 2009, 10:52
Some captions are colored but in the sub/idx-mode are all captions white.
I saw in SC you can choose different colors for the captions.
Is it possible to keep the Sup-color in the vobsub.idx-file?
Sometimes I wonder if anybody ever even had a look in the online help at all. Keep in mind that every minute of my life that I have to answer questions that could be easily answered by reading the manual and/or experimenting a little on your own, is a minute that is lost for BDSup2Sub development.
But yeah well:
When converting the 256 color palette of a BD/HD-DVD-SUP to a "4 out of 16" colors VobSub palette, BDSup2Sub looks for the brightest opaque color which is used for the most pixels. It then selects the closest color from the default VobSub palette than can be displayed and edited via the "Edit Vobsub Palette" menu entry.
In your example, the yellow is very light and thus closer to white than to the yellow in BDSup2Sub's default VobSub palette. You can edit the yellow color in the VobSub palette though as described in the online help. You can even save and load your own custom palettes.
There are some limitations however: due to the restriction to a 16 color palette and BDSup2Sub's (minimum) antialiasing approach for VobSubs which needs a light and a dark tone for each color, there are only 6 colors than can be adjusted (plus white/grays). So if there are more colors used in the SUP, some colors will be always wrong.
Besides, due to the limitation to 4 colors (where one is transparent) in one caption, having two primary colors in one caption will always lead to (at least partially) wrong colors.
hubblec4
17th May 2009, 11:06
sorry for wasting your time. but its not easy. some captions keeps the color other not.
yes the "help" is very usefull!
ok. its not so important for me this small issue....
Thanks for the new version. I love it.
hubble
SquallMX
17th May 2009, 17:08
sorry for wasting your time. but its not easy. some captions keeps the color other not.
yes the "help" is very usefull!
ok. its not so important for me this small issue....
Thanks for the new version. I love it.
hubble
I was having a similar problem using Windows 7 Build 7100, after using Windows XP SP3 everything works fine, but since BDSup2Sub is a Java program, the responsible for this problem seems to be Subtitle Creator+Windows 7, some captions are fine but others have diferent color, no transparency, or dont display at all.
I will post a few samples tomorrow, but I think the problem is not a BDSup2Sub bug.
:helpful:
Hello Ox,
Indirectly you've solved MY problem. I was using an old version of the SubtitleCreator, ver 2.0 !! Your last reply made me obtained the latest v2.23rc1 since 07/2008...voila!
You may want to update your 1st post to caution this similar pitfall...
Cheers!
0xdeadbeef
18th May 2009, 20:40
Another major (though it might not look like it) update. I changed even more things than in 3.6.0 and tested even less, so give it a try, but don't be surprised if I screwed up some things.
18.05.2009 3.6.0 -> 3.7.0
Changed: added free scaling factors (x,y) to resize captions independently of resolution changes.
Changed: all text fields react while typing and use background colors to give status feedback.
Fixed: when converting from HD-DVD-SUP to BD-SUP it was not guaranteed that each last palette entry was transparent.
deank
19th May 2009, 14:44
Hi again :)
Here (http://multiavchd.deanbg.com/tssubs.rar) is a pair extracted from .ts file.
I have no idea what format is inside - can you take a look when you find some spare time?
Dean
0xdeadbeef
19th May 2009, 16:53
I have no idea what format is inside - can you take a look when you find some spare time?
Well, even the IDX looks like crap:
id: xx, index: 0
timestamp: 4294967284:4223384455:4294967266:000, filepos: 000000000
timestamp: 4294967284:4223384455:4294967267:000, filepos: 000005800
timestamp: 4294967284:4223384455:4294967266:000, filepos: 000006000
First caption starts > 490293 years after the movie started. Hm, you have to be kinda patient and long-lived to enjoy this ;)
Anyway, even if we ignored this, the SUB seems to be completely corrupt as well. Obviously there's not a single valid control header offset in it and I couldn't find any sensible control header either. Instead, the whole file consists more or less of padding bytes. Each packet is only about 0x100 bytes long. So if there's an image encoded somewhere, it must be either very small or spread over a lot of packets without any obvious reason.
Dunno if it makes sense to look deeper into this. IMHO this looks like the export of a defective tool (no matter if it was the authoring tool or the demuxer). Both SubtitleCreator and VobSub SubResync crash on import. And really: this doesn't look like there's usable data in there anyway.
0xdeadbeef
19th May 2009, 17:37
19.05.2009 3.7.0 -> 3.7.1
Fixed: BD-SUP palette fix (when converting from HD-DVD-SUP) introduced in 3.7.0 didn't work reliably.
deank
19th May 2009, 18:15
Well, even the IDX looks like crap... First caption starts > 490293 years after the movie started. Hm, you have to be kinda patient and long-lived to enjoy this ;)
Sorry if it was a waste of time. :)
I extracted these "subs" from a .ts file, which mediainfo identified as "teletext". I used mencoder as I do for DVD extraction.
Thanks for the effort!
Dean
0xdeadbeef
19th May 2009, 18:26
Dunno too much about how teletext data is defined in a TS transport stream. I would be surprised though if if was encoded in a subtitle substream.
I would assume that e.g. the demuxer didn't know what to do with it and stuffed it into a subtitle stream, but then couldn't get the information to create a valid IDX file and the control headers inside the SUB.
Anyway, as far as I remember, I once extracted/converted a teletext subtitle stream from a DVB transport stream with ProjectX and then used it to create a DVD. So this would be worth a try.
deank
19th May 2009, 19:00
Yes, a user posted that he converted teletext-subs with ProjectX and then they can be used. I just tried the 'short cut' ;)
0xdeadbeef
21st May 2009, 19:22
Mainly improvements regarding import of VobSubs:
21.05.2009 3.7.1 -> 3.8.0
Changed: VobSub: added basic support for alpha fading detection (one LN_CTLI, one PX_CTLI per udpate, ignoring line&column).
Changed: VobSub: keeping existing palette is possible now if import and export format is VobSub.
Changed: VobSub: the active language index ("langidx:") is now parsed and only captions fitting this index will be used.
Fixed: VobSub: global offsets > 0 in IDX led to wrong image size (and wrong RLE decoding in some cases).
Fixed: target bitmap and palette where not updated at the same time leading to GUI redraw issues.
Fixed: erase patches were not updated correctly if free scaling was limited to screen size.
This (http://www.sendspace.com/file/a2ep4l) is a TS with 4 audio and 8 subtitles. You can play this file and change the audio or subtitles in VLC. Do you think is possible to extract the DVB Subtitles (with some tool) and convert them with your program? I don't know any tool which can extract DVB Subtitles. DGAVCIndex "saw" them as AC3. CCExtractor cannot extract them because are not Closed Captions. Closed Captions can be found and extracted with this tool in several formats if the video is MPEG2 in TS.
enjoy,
Mtz
edit: PS: thank you for the implementation of "overlaped subtiles". Now the date and time from HD cameras are displayed OK without any gap. Will be nice if possible to move them on horizontal, not only vertical
0xdeadbeef
21st May 2009, 23:14
Well, this seems to be more or less exactly what I just discussed with deank: this is a DVB transport stream with embedded teletext.
So you need ProjectX or any other tool that can extract teletext subtitles from a DVB transport stream. AFAIK ProjectX only exports to SUP/IFO, so you need another tool to convert that to VobSub. SubtitleCreator or DVDSubEdit should do the trick.
Kurtnoise
21st May 2009, 23:17
ProjectX doesn't support h.264 streams...
DVB Subtitles are teletext type (can be extracted in various formats with CCEXtractGui) or bitmaps (like in the sample).
enjoy,
Mtz
0xdeadbeef
21st May 2009, 23:23
The question was about extracting the captions and ProjectX can export the captions from that stream.
Besides: this is pretty offtopic, so please open a new thread if you wish to discuss extracting DVB transport streams any further.
When I saw that ProjectX cannot decode H264 I supossed that subtitles can't be exported.
The resulted subtitles from ProjectX can be loaded in your program (loading the idx).
enjoy,
Mtz
jokeli
22nd May 2009, 05:23
Well I sure don't intend to add OCR to SupToSub, so all I could offer would be an export to an easy to implement format. E.g. a bunch of GIFs plus a text file similar to the IDX of VobSub. Then maybe someone could set up a scripting tools to convert this to SRT or whatever.
Contactless POS (http://www.mpos.net/s/p1.asp)|Fingerprint POS (http://www.mpos.net/s/p2.asp)|Credit Card Terminal (http://www.mpos.net/s/p3.asp)|Point of Sale (http://www.mpos.net/s/p4.asp) a good stat
0xdeadbeef
22nd May 2009, 17:24
Hm, pretty quiet here lately. Probably I scared'em all away ;)
Anyway, one last small update before I leave for the weekend.
22.05.2009 3.8.0 -> 3.8.1
Changed: VobSub/BDN XML: transparent colors are assumed black to avoid scaling artifacts (same handling now for all formats).
Changed: introduced CLI option "/acrop" to set alpha value for cropping and patching color values to black.
Changed: edit dialog's preview window better matches the target resolution for less scaling artefacts in preview.
Changed: reworked limitation of selection window. Now based on unscaled coordinates to guarantee accuracy to single pixels.
OK, I'm prepared to be scared again: here (http://www.sendspace.com/file/ktzc52) is another TS sample with sub which can be extracted and the subtitle can be viewed in VLC.
After I extracted the DVB Subtitle with ProjectX and loaded the IDX file, for SUP conversion I have strange grey colors and I don't know how to modify these coloros to look the same way if I want IDX+SUB. For this subtitle is nice to see how the filters are acting.
I don't know how are working the colors for SUP subtitles but can be made some option to have some colors like: white subtitle, dark grey antialias and black outline? I think the most used subttiles are white with black borders, and sometimes yellow instead of white. Of course, the white to be a little grey.
enjoy,
Mtz
SquallMX
24th May 2009, 16:54
@0xdeadbeef The "Move All" option is not working properly in current release, some subtitles are moved, some are not.
:thanks:
0xdeadbeef
24th May 2009, 17:48
Yeah, I'm aware of this issue. Indeed I noticed it last Friday shortly before or after releasing 3.8.1, but I had no time to investigate this - maybe later today, but it's definitely the next thing on my list.
My impression was that this happened only on VobSubs though, not on BD-SUPs and HD-DVD-SUPs. My guess is that this is a problem that was introduced with cropping images - if so it would also exist for XML BDN, but not for SUPs. Then again, this is only a guess at this moment.
[EDIT]
As I assumed, this is a problem of cropping. So I know the problem and I think I know how to fix it, but this will not happen today and maybe not even tomorrow. If this is a blocking point right now, you could export VobSub to VobSub, then re-import the cropped VobSub and use "move captions" on it.
0xdeadbeef
24th May 2009, 18:20
OK, I'm prepared to be scared again: here (http://www.sendspace.com/file/ktzc52) is another TS sample with sub which can be extracted and the subtitle can be viewed in VLC.
After I extracted the DVB Subtitle with ProjectX and loaded the IDX file, for SUP conversion I have strange grey colors and I don't know how to modify these coloros to look the same way if I want IDX+SUB. For this subtitle is nice to see how the filters are acting.
I don't know how are working the colors for SUP subtitles but can be made some option to have some colors like: white subtitle, dark grey antialias and black outline? I think the most used subttiles are white with black borders, and sometimes yellow instead of white. Of course, the white to be a little grey.
The problem here seems to be that ProjectX simply writes wrong palette and alpha info. E.g. if you look at the first decoded frame (verbatim mode):
Palette: 0, 1, 4, 5
Alpha: 0, 2, 9, 13
The colors 1,4,5 in the palette from the IDX are all 1f1f1f, which is some kind of dark grey. Even worse, the transparency values seem to be wrong as well. E.g. "2" is nearly completely transparent, "9" is only about 56% opaque. So the only nearly opaque entry is the forth one.
Now even if I could somehow patch this frame to look ok, the next frame would need a completely different handling:
Palette: 0, 1, 3, 4
Alpha: 0, 2, 4, 9
And so on and so on.
In a nutshell: I don't really feel responsible to work around the bugs in other tools. Besides, it's not as easy as it might seem to you as the color information is simply lost and can't be easily restored if at all.
I'd strongly suggest to ask the authors of ProjectX to simply fix the VobSub export.
0xdeadbeef
25th May 2009, 19:04
25.05.2009 3.8.1 -> 3.8.2
Changed: VobSub: alpha of completely invisible captions is patched.
Fixed: alpha/luminance comboboxes were disabled since 3.8.0 when switching to VobSub output mode and palette mode was "keep existing"
Fixed: "move all captions" didn't work correctly for BDN/XML and VobSub imports (since 3.6.0) if a bitmap was cropped.
DiRTDOG
25th May 2009, 20:19
Hi I just tried your app to create a new .srt file to work with my Popcorn hour. I need to go from Sup to Srt. Your app worked great to make the sub/idx files but when I convert your sub to srt with SubResync to make the srt file there are space gaps in between the letters. Other srt files made with other programs do not do this so I think it has something to do with your program is there a way to adjust this so it doesnt happen?
Great tool, thanks for the hard work.
0xdeadbeef
25th May 2009, 21:06
Hi I just tried your app to create a new .srt file to work with my Popcorn hour. I need to go from Sup to Srt. Your app worked great to make the sub/idx files but when I convert your sub to srt with SubResync to make the srt file there are space gaps in between the letters. Other srt files made with other programs do not do this so I think it has something to do with your program is there a way to adjust this so it doesnt happen?
This is a pretty strange request as you seem to suggest that I change BDSup2Sub in some magic way to make a third party OCR tool work better. Even if I was able to do this (which I ain't of course), I wouldn't really consider this to be my task.
Anyway: as I already pointed out before, it's generally a bad idea to OCR a scaled down version of the bitmap. I'd suggest (and not the first time in this thread) to use SupRip on the BD-SUP directly or to persuade someone to write a script/tool/whatever that uses a real OCR approach on the PNGs exported by BDSup2Sub.
PassThePeas
25th May 2009, 21:58
This is a pretty strange request as you seem to suggest that I change BDSup2Sub in some magic way to make a third party OCR tool work better. Even if I was able to do this (which I ain't of course), I wouldn't really consider this to be my task.
Anyway: as I already pointed out before, it's generally a bad idea to OCR a scaled down version of the bitmap. I'd suggest (and not the first time in this thread) to use SupRip on the BD-SUP directly or to persuade someone to write a script/tool/whatever that uses a real OCR approach on the PNGs exported by BDSup2Sub.
I understand DiRTDOG's request (as every PCH user that wants to play BD-Rips with it) but I have to agree with 0Xdeadbeef's answer. You can't ask him to improve his tool in that way.
I would even suggest (if it's not already done) that you go the NMT Forums and find the thread that asks for PGS support in m2ts file and add your vote (as I've already done myself ;)) so that we could all (PCH users) enjoy that functionnality on the PCH.
Peas
Thunderbolt8
27th May 2009, 23:52
would it be possible to modify this tool that it can also output as .srt?
PassThePeas
27th May 2009, 23:59
would it be possible to modify this tool that it can also output as .srt?
modify ... like in "turning into an OCR" ???
Well, you can wait for 0xdeadbeef answer, but I'd bet on a negative one. There are other tools that do it more or less (read posts just above) ... but don't forget we're talking about OCR ... not an instant and automatic process ...
Peas.
0xdeadbeef
28th May 2009, 00:00
Adding any kind of OCR support is highly unlikely to say the least.
25.05.2009 3.8.1 -> 3.8.2
Changed: VobSub: alpha of completely invisible captions is patched.
Fixed: alpha/luminance comboboxes were disabled since 3.8.0 when switching to VobSub output mode and palette mode was "keep existing"
Thank you! Loaded the IDX subtitle from the canal plus sample. Playing in BDSup2Sub with SUP and SUB conversions and the Palette I observed this"
- if I'm using the IDX and create new palette the result is in white (grey) subtitles outlined with black
- if using the SUP setting, the subtitles are grey
So if I want SUP white subtitles outlined with black, first I'm exporting to SUB, then load again the resulted SUB and now is possible to convert it to SUP as desired: white with black outline.
Can be this done in one step? I found the workaround but maybe for other users will be hard to make it.
Regarding the changing of colors maybe I'm dumb, but I don't understand how is working. Maybe I need to learn more. But I saw in DVDSubEdit changing the colors is easy and I understand from the first time how to change the colors. I know the SUPs are more complex.
enjoy,
Mtz
0xdeadbeef
28th May 2009, 11:25
As I already explained, the color and alpha values exported by ProjectX are plain wrong in this case. When either converting to BD-SUP/BDN-XML or when converting to SUP/IDX in "keep existing" palette mode , BDSup2Sub will keep the original (wrong) colors and alpha settings.
In SUB/IDX "create new" mode, BDSup2Sub creates a new 4 color frame palette as explained in the online help. Indeed only 2 colors are really chosen while two are predefined, as are the 4 alpha values per frame.
While this might lead to correct colors in this case, this is more or less coincidental here as it's not the intention of the algorithm to fix wrong colors, but to find a primary text color and chose the other colors to get a bit of anti-aliasing, a black border and a transparent background.
turbojet
28th May 2009, 15:54
Are exporting dvd sup's off the table?
If so, could support for exporting 1 of 2 types of pgcedit palettes (http://www.mediafire.com/download.php?jtmnxdvmkdd) be a possibility at least?
It would save me and whoever else is doing BD to DVD quite a bit of hassle trying to find the correct colors to use in the palette when doing . I can manage doing bdsup -> vobsub -> dvdsup with subtosup fairly easily just a little loss in quality and one extra step.
0xdeadbeef
28th May 2009, 18:26
Are exporting dvd sup's off the table?
This was actually never on my list and chances are very, very low that I will ever add support for DVD SUPs.
If so, could support for exporting 1 of 2 types of pgcedit palettes (http://www.mediafire.com/download.php?jtmnxdvmkdd) be a possibility at least?
Well, especially the text format looks simple enough. I'm not quite sure though why a program would prefer importing a palette from a text file instead of the IDX. Besides, I'd guess you'd need about 5 lines of code to write a Perl (or whatever) script that converts the palette from the IDX into this format.
It would save me and whoever else is doing BD to DVD quite a bit of hassle trying to find the correct colors to use in the palette when doing . I can manage doing bdsup -> vobsub -> dvdsup with subtosup fairly easily just a little loss in quality and one extra step.
Well, I'm converting BDs to DVDs all the time and I never needed it. Also I'm a little puzzled why converting VobSub to DVD-SUP (or vice versa) should introduce a loss in quality. Both formats seem to share the exact same control header structure which controls display of the image including frame palette and alpha values.
turbojet
28th May 2009, 19:44
This was actually never on my list and chances are very, very low that I will ever add support for DVD SUPs.
Well, especially the text format looks simple enough. I'm not quite sure though why a program would prefer importing a palette from a text file instead of the IDX. Besides, I'd guess you'd need about 5 lines of code to write a Perl (or whatever) script that converts the palette from the IDX into this format.
I'm not sure but vobsub has never had much to do with dvd authoring in the past. I'll see if PGCedit will add it though.
Well, I'm converting BDs to DVDs all the time and I never needed it. Also I'm a little puzzled why converting VobSub to DVD-SUP (or vice versa) should introduce a loss in quality. Both formats seem to share the exact same control header structure which controls display of the image including frame palette and alpha values.
How are you doing BD to DVD subs?
Nevermind about the dvd sup vs vobsub quality. I'm used to using MPC-HC evr/directvobsub for rendering vobsubs and powerdvd/tmt3/standalone players for sups. The latter generally renders subs at noticably higher quality. Under the same renderer they look pretty much identical.
0xdeadbeef
28th May 2009, 22:31
I'm not sure but vobsub has never had much to do with dvd authoring in the past. I'll see if PGCedit will add it though.
AFAIK, a DVD SUP file contains exactly the same information as a VobSub SUB. Just the packet headers and structure are a little different. My main issue with DVD SUPs is the separate IFO though.
How are you doing BD to DVD subs?
What would you think? This is actually what I wrote BDSup2Sub for in the first place. As I'm doing the conversion only for family and friends which don't share my high quality demands ;), I'm using ConvertXtoDVD for creating the DVD.
Nevermind about the dvd sup vs vobsub quality. I'm used to using MPC-HC evr/directvobsub for rendering vobsubs and powerdvd/tmt3/standalone players for sups. The latter generally renders subs at noticably higher quality. Under the same renderer they look pretty much identical.
They should look absolutely identical (on the same renderer) as they share the same internal representation and format limitations.
turbojet
28th May 2009, 23:33
AFAIK, a DVD SUP file contains exactly the same information as a VobSub SUB. Just the packet headers and structure are a little different. My main issue with DVD SUPs is the separate IFO though.
Would creating a new ifo be useful for loading color palettes? PGCedit dev seems up to adding idx color import that might be a more logical way then to have an output pgcedit palette option when exporting idx\sub.
If you were ever to add dvd sup export with pgcedit color palette it would be very useful for some and it could open the possibility of exporting other dvd author software that supports external color palettes if any exist.
What would you think? This is actually what I wrote BDSup2Sub for in the first place. As I'm doing the conversion only for family and friends which don't share my high quality demands ;), I'm using ConvertXtoDVD for creating the DVD.
I don't have any experience with ConvertXtoDVD but it allows vobsub as input?
I really don't have much experience with dvd authoring/encoding outside of muxman, ifoedit, cce, hcenc and their frontends like DVD-RB and AVStoDVD.
They should look absolutely identical (on the same renderer) as they share the same internal representation and format limitations.
They probably do, I didn't find any noticeable differences in the few minutes I spent comparing. But it seems that sup > vobsub > sup isn't bit for bit identical to the source sup, bunch of changes, so I used nearly identical.
0xdeadbeef
29th May 2009, 12:41
Would creating a new ifo be useful for loading color palettes?
Well, for a DVD-SUP, the info missing in the SUP is usually stored in/read from the IFO (as the IDX files is used for SUB/IDX). I would suppose that this includes not only the palette, but also the video size. At least info about the video stream is part of the IFO.
If you were ever to add dvd sup export with pgcedit color palette it would be very useful for some and it could open the possibility of exporting other dvd author software that supports external color palettes if any exist.
I wonder where the sceen size would be stored then. How would an application that reads the SUP + palette know if the captions are meant for PAL or NTSC? Beside: more or less all the applications that import DVD-SUP need the IFO and won't accept anything else.
I don't have any experience with ConvertXtoDVD but it allows vobsub as input?
Yep. It's commercial and has some other drawbacks though, mainly lack of proper scaling (aliasing artefacts when scaling down due to lack of lowpass filtering) and only single pass encoding. Still, it's good enough for my purposes and I only need three tools in the whole process: EAC3TO, BDSup2Sub and ConvertXtoDVD. Besides, the version 4.x is said to implement better scaling filters and multi-pass encoding.
They probably do, I didn't find any noticeable differences in the few minutes I spent comparing. But it seems that sup > vobsub > sup isn't bit for bit identical to the source sup, bunch of changes, so I used nearly identical.
Most probably only the RLE buffers differ due to slightly different encoder implementation on different tools.
Anyway, I had a quick look at the IFO format and it might be easier to implement writing a fake IFO and reading colors/fps/resolution from the IFO then I originally thought. So let's say I consider importing/exporting SUP/IFO. This doesn't mean that you can expect it to be implemented any time soon, but it's kinda likely that this will be the next (and probably) last major feature that I will add. Might take a while though.
turbojet
29th May 2009, 17:04
Well, for a DVD-SUP, the info missing in the SUP is usually stored in/read from the IFO (as the IDX files is used for SUB/IDX). I would suppose that this includes not only the palette, but also the video size. At least info about the video stream is part of the IFO.
I wonder where the sceen size would be stored then. How would an application that reads the SUP + palette know if the captions are meant for PAL or NTSC? Beside: more or less all the applications that import DVD-SUP need the IFO and won't accept anything else.
This type of ifo would be helpful for DVDSubEdit. However for authoring I don't know of a program that could use it. I know muxman, ifoedit, dvdlab, dvdauthor can't. This responsibility lies in the dvd editor such as pgcedit/dvdremake. PGCedit can change colors through either of those 2 files I mentioned. I can't find out how to change sub colors in DVDRemake demo.
Yep. It's commercial and has some other drawbacks though, mainly lack of proper scaling (aliasing artefacts when scaling down due to lack of lowpass filtering) and only single pass encoding. Still, it's good enough for my purposes and I only need three tools in the whole process: EAC3TO, BDSup2Sub and ConvertXtoDVD. Besides, the version 4.x is said to implement better scaling filters and multi-pass encoding.
Oh ok I think I will stick to what I've been doing for now even with the extra few steps.
Anyway, I had a quick look at the IFO format and it might be easier to implement writing a fake IFO and reading colors/fps/resolution from the IFO then I originally thought. So let's say I consider importing/exporting SUP/IFO. This doesn't mean that you can expect it to be implemented any time soon, but it's kinda likely that this will be the next (and probably) last major feature that I will add. Might take a while though.
OK thanks, even with just the dvd sup export it would take out one step in my process, pgcedit file export would take out another. I could not use the ifo export at all. Ifo import could be quite a benefit for those doing DVD to BD conversions taking out 2-3 steps.
shon3i
31st May 2009, 10:26
Well VobSub format is usless for DVD Authoring, because none of DVD Authoring apps not suport it, we allredy talk about it, and only software (Subtitle Creator) which can convert bettwen SUP<->VobSub not work like should. btw ConvertXtoDVD is not DVD Authoring tool just like fast and easy bad quality MPEG2 Transocder
0xdeadbeef
31st May 2009, 12:36
Well VobSub format is usless for DVD Authoring, because none of DVD Authoring apps not suport it, we allredy talk about it, and only software (Subtitle Creator) which can convert bettwen SUP<->VobSub not work like should. btw ConvertXtoDVD is not DVD Authoring tool just like fast and easy bad quality MPEG2 Transocder
For real DVD authoring (i.e. creating DVD from scratch), VobSub is as useless as SUP/IFO, so that is no valid point. E.g. DVD-Lab (Pro) supports neither VobSub nor SUP/IFO. The only image based format it supports is SON/BMP, which however is a pretty crappy format that I don't intend to support. Moreover, SON/BMP import doesn't seem to work correctly in DVDLab anyway. As SUP/IFO is a proprietary format introduced by IfoEdit, support by commercial tools is and will be limited if at all.
Besides, your definition of a DVD authoring tool is worthy of discussion to say the least. I'm not gonna put a gloss on ConvertXtoDVD as I mentioned its shortcomings already, but calling it a MPG2 transcoder is simply bollocks (for a couple of reasons). Indeed, a real authoring tool typically doesn't even have an internal video encoder as it's just responsible for creating a valid DVD structure from video/audio/subtitle streams etc.
Anyway, I don't really get the intention of your posting, as I already said I'd look into implementing SUP/IFO support. If at all, pointless postings like this waste my time and surely don't motivate me to implement new stuff.
shon3i
31st May 2009, 23:15
Please don't get me wrong, really appreciate your effort and work, this is a great application for processing subtitles, and really would be good to get another very useful thing if it is technically possible. Not just for me, here on the forum a lot of people who know what i am talking about
Besides, your definition of a DVD authoring tool is worthy of discussion to say the least. I'm not gonna put a gloss on ConvertXtoDVD as I mentioned its shortcomings already, but calling it a MPG2 transcoder is simply bollocks (for a couple of reasons).Ok, there is no real Authoring tool which support of any format, but still many DVD Muxers support only SUP/IFO. ConvertXToDVD maybe have little authoring (custom menu) but is far away from quality.
Hello Ox,
Please don't get bullish...relax...we all appreciate your program tremendously.
Any self-respecting member here use HCenc & Muxman combo which requires the sup format.
So far we have to go around in circles to create that...
So, take your time, we patiently await thy implementation.
TIA
avivahl
1st June 2009, 02:55
+1 on that DVD Sup request. Will help many users, including me.
Thanks for all your wonderful work.
0xdeadbeef
1st June 2009, 10:29
Guys, I already said I'd look into it. There's no need to convince me after posting #439.
Then again, the IFO format is pretty complex and although I only need to fill out a few fields, it will be some kind of a trial and error game to figure out which application relies on which fields when importing SUP/IFO.
IMHO, it was a really bad idea to use IFO just for the palette and frame size/rate info and it's really beyond me why a program that imports SUP/IFO doesn't also import SUB/IDX where the same information is stored in a text file.
hubblec4
1st June 2009, 13:23
hello
there is a small step to convert sub/idx to dvd.sup.
use SubtitleCreater, there you can load the sub/idx and save it to dvd.sup.
hubble
0xdeadbeef
1st June 2009, 13:31
It doesn't seem to export the IFO though - so use lose palette, video size and frame rate.
turbojet
1st June 2009, 18:55
But how useful would exporting an ifo be?
Outside of DVDSubEdit I don't know of any use for such an ifo and DVDSubEdit could just as well work with an authored DVD. One of the two PGCEdit color files I linked to last week would be much more useful in every situation I can think of.
I'm not saying ifo output wouldn't be nice eventually. I'm just trying to justify the time it would take to do it.
0xdeadbeef
1st June 2009, 19:13
It's probably pointless to repeat the same info again and again, but the palette is not the only info missing in the SUP.
turbojet
1st June 2009, 19:32
It's probably pointless to repeat the same info again and again, but the palette is not the only info missing in the SUP.
I realize that but what use is there for resolution and framerate info without any software support?
DVDSubedit only gets the colors from ifo, nothing more.
Er I guess vobsub and vsrip does make use of fps in the ifo but vobsub is what everyone is trying to avoid having to mess with.
BTW pgcedit plans on adding color input from idx but there is a bug with vobsub that can't be worked around (http://forum.doom9.org/showthread.php?p=1291651#post1291651)
0xdeadbeef
1st June 2009, 20:31
I realize that but what use is there for resolution and framerate info without any software support?
"Without any" is a little exaggerated to say the least.
DVDSubedit only gets the colors from ifo, nothing more.
It would be damn brainless to do so, but I can't fix other tools.
Er I guess vobsub and vsrip does make use of fps in the ifo but vobsub is what everyone is trying to avoid having to mess with.
BTW pgcedit plans on adding color input from idx but there is a bug with vobsub that can't be worked around (http://forum.doom9.org/showthread.php?p=1291651#post1291651)
That's why I didn't like the idea of SUP/IFO support in the first place. It's a somewhat messed format which kinda begs for problems and incompatibilities.
Anyway: if I'll support SUP, it'll be SUP/IFO. BDSup2Sub won't export any incomplete crap or define new incompatible formats.
turbojet
1st June 2009, 20:44
"Without any" is a little exaggerated to say the least.
Well I edited it that vobsub can use the fps which can easily be altered but beyond that how useful is it really?
That's why I didn't like the idea of SUP/IFO support in the first place. It's a somewhat messed format which kinda begs for problems and incompatibilities.
Anyway: if I'll support SUP, it'll be SUP/IFO. BDSup2Sub won't export any incomplete crap or define new incompatible formats.
OK but I think you are really overestimating the importance of the ifo file. Frankly I would have no use for it, only pgcedit color files. While I've asked you many times what software can support such an ifo file I haven't gotten any response on the matter. I have pointed out 2 programs that can use it but I fail to see any benefit of this standalone ifo that doesn't point to any video over an authored one that does.
My intentions are to find out how useful that ifo file really is. So far I can't see any real use for it. If it stays that way is there any reason to spend time on coding something to output it?
0xdeadbeef
1st June 2009, 21:12
I think I made my point more than clear.
deank
3rd June 2009, 19:34
I just want to add that using BDSup2Sub for DVD2AVCHD / DVD2Blu-ray has made a lot of users happy.
Thank you so much for what you've created.
My tools use mencoder to extract DVD subtitles and they all work just fine in AVCHD / Blu-ray after processed with BDSup2Sub after the changes you made in your program (since 3.5.6).
Thank you once again!
Dean
0xdeadbeef
4th June 2009, 17:23
Thanks, you're welcome ;)
I especially appreciate this from a fellow coder. Although I never actually used multiAVCHD (yet), it sure looks pretty impressive. Dunno if you're aware of it, but there even was a small review (2/3 of a page actually) of it in the last issue of the very popular German PC mag "c't".
Anyway, unfortunately progress on BDSup2Sub slowed down quite a bit lately due to different reasons. While I already hacked in large parts of the functionality needed for SUP/IFO reading and writing, I don't think I will finish it before mid/end of next week.
turbojet
4th June 2009, 19:52
Anyway, unfortunately progress on BDSup2Sub slowed down quite a bit lately due to different reasons. While I already hacked in large parts of the functionality needed for SUP/IFO reading and writing, I don't think I will finish it before mid/end of next week.
Few weeks is plenty quick enough, it's actually very quick reaction time which I've always appreciated from you, But I'm not really sure how pgcedit would deal with an ifo that points to no video but I guess we'll see. If it does handle it ok that's great, if it doesn't are you planning on including an output for pgcedit palette file?
0xdeadbeef
4th June 2009, 20:21
If it does handle it ok that's great, if it doesn't are you planning on including an output for pgcedit palette file?
Implementing this is a piece of cake. It'll be more work to add the command line option and change the GUI. Still, it's not really a high priority topic on my list, so probably I'll release a version with SUP/IFO import/export and then later I might add the palette file.
laserfan
5th June 2009, 21:19
Tho my SO is hearing-impaired, she is not deaf, and I hear everything, so I like to edit SDH subs. But I'm finding this difficult to do and wonder if there's an easier way:
1. Click right-arrow upper right, get ST to edit
2. Click "Exclude from export", or Select Rectangle and Erase, and then click "Save Changes"
3. Move mouse upper right and click right arrow (which disconcertingly says "Lose changes and skip to next" in pop-up)
There's an awful lot of mouse-moving and clicking and I wonder if there is any easier way or if there are any hot keys I don't know about. Thanks...
P.S. Example of something that would help--when you click "Save Changes" go to next frame automatically.
Jaja1
6th June 2009, 22:51
I agree, all the mouse moving makes it not so easy to edit a .sup. Going to the next frame after saving changes would be an improvement.
And I guess if you just delete images, it wouldn't be necessary to save changes after every delete at all. I can understand that edits of the images are hard to cache, but commiting deletes can be postponed to a later time I suppose? If so, it would be nice to jump to the next frame after hitting the delete button. And as soon as real editing is done, you must save your changes after every edit.
laserfan
7th June 2009, 01:33
For a real exercise in frustration, try using BDSup2Sub for cleaning-up the English SDH in BD "Slumdog Millionaire". Easily a third of the 1400 subs are junk like:
[Hindi]
[Shouting in Hindi]
[Shouting]
[Screaming]
[Inaudible Dialog] (!!!!!!)
[Etc. Crapola]
Whoever did the subs for this one should be dragged across India behind an angry bull with diarrhea! My mouse hand still hurts after fixing these...
Sharc
7th June 2009, 10:25
You seem to have selected the sups for the hearing impaired.
I don't have this disk, but isn't there a regular sup included as well (means without these [annotations])?
laserfan
7th June 2009, 15:16
You seem to have selected the sups for the hearing impaired.
I don't have this disk, but isn't there a regular sup included as well (means without these [annotations])?Of course I looked for a non-SDH track and there is none, duh. This BD release is in fact remarkably lacking in both audio and ST options...
mrr19121970
9th June 2009, 09:29
in both the BD and DVD the subs are 'burned' into the film. it was really bad watching it on my parents 21" 4:3 CRT - you couldn't even read them they were so small.
laserfan
9th June 2009, 14:14
in both the BD and DVD the subs are 'burned' into the film. it was really bad watching it on my parents 21" 4:3 CRT - you couldn't even read them they were so small.I was not talking about the forced subs "burned into the film" though (and I can imagine these were hard to read on a 21" TV!). My posts are about the separate EnglishSDH subtitle track, which truly has every bloody line/grunt/song/sound-effect in the movie in its many [....] displays.
0xdeadbeef
11th June 2009, 19:00
Hi there, although I was kinda lazy lately and wasted more time reading through several books of Schlock Mercenary (http://www.schlockmercenary.com/) instead of coding or even doing something sensible, SUP/IFO support is nearly finished and working to some degree, but now I'd need a bunch of (free) reference tools for testing now.
So, apart from VobEdit, SubtitleCreator and DVDSupEdit: which (free) tools import/export SUP/IFO?
hubblec4
12th June 2009, 09:01
Hi there, although I was kinda lazy lately and wasted more time reading through several books of Schlock Mercenary (http://www.schlockmercenary.com/) instead of coding or even doing something sensible, SUP/IFO support is nearly finished and working to some degree, but now I'd need a bunch of (free) reference tools for testing now.
So, apart from VobEdit, SubtitleCreator and DVDSupEdit: which (free) tools import/export SUP/IFO?
SubRip and IfoEdit are free tools.
0xdeadbeef
12th June 2009, 15:13
Ok, it's time for a not so small update again. As usual, I haven't tested nearly as much as I should, so chances are that there'll be a 3.9.1 soon. Anyway, I implemented most of the latest requests, so give it a try.
12.06.2009 3.8.2 -> 3.9.0
Changed: introduced import and export of SUP/IFO.
Changed: Opening SUB/IDX files via the SUB file (instead of the IDX) file is supported (also via drag'n'drop).
Changed: added store+prev/next buttons to edit dialog.
Changed: added mnemonics/hotkeys for most menus/buttons/checkboxes (Windows: press Alt to see the mnemonics).
Changed: target palette can be exported to PCGEdit text format (via export dialog or CLI parameter "/exppal")
Changed: JAR contains (only the) sources which are released under the LGPL and Apache license.
0xdeadbeef
13th June 2009, 19:28
Hm, no bug reports? Kinda disappointing (after a fashion)...
Don't tell me you're all out in the aching sunlight ;)
13.06.2009: 3.9.0 -> 3.9.1
Changed: editing of imported DVD palette is now possible
Changed: exporting PCGEdit palette only possible if VobSub or SUP/IFO is exported.
Changed: alpha cropping, minimum merge time and PGCEdit palette export settings are stored in the ini now.
Changed: improved color edit dialog to allow editing colors by double clicking.
Fixed: updated embedded JavaDoc (forgot about this in 3.9.0)
hubblec4
14th June 2009, 00:22
For me works all very well.
thanks a lot.
deank
14th June 2009, 17:52
It is me again.
Can you take a look at this idx/sub pair. (http://multiavchd.deanbg.com/_mkv_vobsub_test.rar)
1) I used original dvd subtitles (those I sent you the first time).
2) Used mkvmerge to put these in a mkv so I can get S_VOBSUB
3) Extracted them again :) (with mkvextract)
4) Tried to load them in BDSup2Sub.
I get Invalid buffer error (#17)
I know it doesn't make sense to go back and forth, but it does for me atm. :)
I also know that somehow mkvmerge/mkvextract change something thus breaking something with bdsup2sub. I just hope that it is something easy to ignore/fix when parsing them.
They work when loaded by ffdshow and show correctly, but I can't convert them to sup.
I included both: those with underscores (__dvddump..._s-vobsub) do not work and the other (dvddump000) work.
Dean
0xdeadbeef
14th June 2009, 19:05
Hm, this subtitle stream is indeed more than a little weird.
Firstly, it uses stuffing bytes in the header (which most SUB/IDX tools don't support). This is probably the reason why SC doesn't load this at all. Most probably not wrong, but definitely a bad idea.
Secondly, the packet size for the packet starting at 0x10800 is wrong by one byte which results in a cropped command buffer. The packet size is given as 0x07E4, but it is really only 0x7E3 bytes in size. The missing byte is the last byte from the command buffer which is cropped off.
Now I can faintly remember that this happened before and I added a workaround. Unfortunately though, there is another issue here which renders the workaround useless.
Which brings us to the third problem: while the IDX file suggest that there's a subtitle at 0x10800 and the next one at 0x11800, the packet starting at 0x10800 indeed already ends at 0x10fff and there is a "garbage" fragment starting at 0x11000. This additional though useless packet spoils my workaround for the wrong size and leads to the crash.
So the stream is not only corrupt, it's corrupt in multiple ways. And while I could probably add another workaround, I don't really like where this is leading. It would clearly make more sense to fix the tool that creates this broken SUBs.
It's hard for me to tell which fault is introduced by which tool. I would assume that the wrong size info could really be an authoring fault. The garbage packet at 0x11000 seems to be introduced by one of the tools in your tool chain though. I suspect that this bug is really caused by the wrong size info in the original stream.
[EDIT]
Ok, I think I found an easy to implement (yet a little dirty) workaround. Still, I'd rather see the tools fixed which create this kind of SUBs.
deank
14th June 2009, 19:18
Now when you mentioned it... I think this one extra byte (in the original dvd subtitles) makes mkvmerge add another packet and then mkvextract reported (multiple times) that there is something wrong with the packet it is demuxing/writing (like... 'it is too large...').
I believe the problem came from mkvmerge which doesn't trim the packet (as your workaround does) and then it all goes wrong.
Thank you for looking into it!
It probably is an isolated case with my DVD title :) so it will probably work with other (properly muxed) subtitles :)
Dean
0xdeadbeef
14th June 2009, 19:46
Now when you mentioned it... I think this one extra byte (in the original dvd subtitles) makes mkvmerge add another packet and then mkvextract reported (multiple times) that there is something wrong with the packet it is demuxing/writing (like... 'it is too large...').
I believe the problem came from mkvmerge which doesn't trim the packet (as your workaround does) and then it all goes wrong.
Yep, this sounds plausible. Still, I decided to add (another) workaround (for the workaround):
14.06.2009: 3.9.1 -> 3.9.2
Changed: added another workaround for corrupted VobSub streams.
deank
14th June 2009, 20:10
Hah :) Thanks a lot... I don't want this to break something else!
I did another test:
1) Used another pair of DVD subtitles
2) muxed them into a mkv
3) demuxed with mkvextract
[22:07:41] Processing (D:\Downloads\__TEST\SGA_VOBSUB.mkv)...
[22:07:41] Detected frame reference count: 3 (max:9).
[22:07:41] Detected video: ID#1:V_MPEG4/ISO/AVC 1280x720, fps=23.976, ref=3
[22:07:41] Detected subtitles: ID#3:S_HDMV/VOBSUB Language: bul
[22:07:41] Detected subtitles: ID#4:S_TEXT/UTF8 Language: bul
[22:07:41] Detected subtitles: ID#5:S_TEXT/ASS Language: und
[22:07:41] Detected audio: ID#2:A_AC3 (48000Hz 6ch) Language: und
[22:07:41] Added audio: A_AC3, "D:\Downloads\__TEST\SGA_VOBSUB.mkv", track=2, lang=und, timeshift=50ms
[22:07:41] Extracting SSA/VOBSUB subtitle tracks.
[22:07:41] Plase wait - it may take a while!
[22:08:12] Converting to SRT/PGS...
[22:08:12] Converting D:\Downloads\__TEST\SGA_VOBSUB.005.und.ssa to SRT...
[22:08:12] Converting D:\Downloads\__TEST\SGA_VOBSUB.003.bul.idx to SUP (java:BDsup2sub)...
[22:08:16] *** Imported subpictures: 277/277
[22:08:16] M2TS stream split set at 3999MiB...
[22:08:16] Adding external subtitles (SGA_VOBSUB.005.und.srt) (und)
[22:08:16] Adding external subtitles (SGA_VOBSUB.003.bul.sup) (bul)
[22:08:16] Title is trimmed: 00:00:00 - 00:40:00 (default)
It went all okay (with 3.6.0).
I will now download 3.9.2 to test with.
Dean
:thanks:
***
Great again :) Thank you so much! It extracted and processed the subtitles which previously failed!
[22:17:01] Extracting SSA/VOBSUB subtitle tracks.
[22:17:01] Plase wait - it may take a while!
[22:17:35] Converting to SRT/PGS...
[22:17:35] Converting D:\Downloads\__TEST\dvddump000_s-vobsub.003.bul.idx to SUP (java:BDsup2sub)...
[22:17:48] !!! BDSup2Sub reported: 283 warnings!
[22:17:48] *** Imported subpictures: 1037/1037
[22:17:48] M2TS stream split set at 3999MiB...
[22:17:48] Adding external subtitles (dvddump000_s-vobsub.003.bul.sup) (bul)
turbojet
15th June 2009, 19:13
Thanks for the import/export dvd sup support.
The dvd sup export is muxing great with ifoedit/muxman and pgcedit palette is correct during my limited testing.
However I notice importing dvdsup gives an error. I tried 2 different DVD's so far and all 13 sub streams had the same issue. Any chance you can look at this?
avivahl
17th June 2009, 03:47
Just tried opening an idx/sub w/ 3.9.2 and it didn't open.
SubResync opened the file without any problem.
Will send you the idx/sub in a pm.
0xdeadbeef
19th June 2009, 20:31
My retarded ISP deleted my account last Monday morning for unknown reason and was not willing or able to repair this issue yet. So I was offline for the last week and will be at least for another week. And even then, my 25MBit VDSL connection will be crippled to a 6MBit ADSL connection for an undefined amount of time. Did I mention that I'm using IPTV for year or so? Being cut off from the Internet is much worse of course.
To be at least able to read my mail, I just bought a serial (!) 56k Modem since I threw away my last one more than ten years ago. It was kinda tough to find such a relict from former times and tricky to install since my PC doesn't even have a serial port by default. Better don't ask how this is feeling compared to my VDSL connection :(
So just a quick update, but please understand that my internet access is pretty limited currently and I can't respond to issues as usual. Apart from that I'm now off for the weekend.
16.06.2009: 3.9.2 -> 3.9.3
Changed: editing of frame palette/alpha values is now possible if the input is either SUB/IDX or SUP/IFO.
Changed: editing of imported DVD palette works on the source image now (seems to make more sense).
@turbojet: I didn't download your sample yet, but it looks like a (DVD) SUP only. The online help explains quite explicitly that and why DVD SUPs need an IFO to be loaded. A single DVD-SUP can't be loaded by BDSup2Sub as it's mistook for a HD-DVD-SUP (same packet header) as explained in the help.
turbojet
19th June 2009, 23:24
Yup loading in the sup was my problem. With the same dvd sup (http://www.mediafire.com/download.php?lunzdaonemo) (898 KB), I updated to include the ifo, when keeping the original palette the blue/yellow issue is back, swapping had no effect in this case.
Also when creating a new colorful palette while the DVD treats it correctly if you input the colorful ifo into bdsup2sub it looks funky. Is there any way to correct this?
0xdeadbeef
20th June 2009, 00:01
Well in short, BDSup2Sub uses the first color table in the IFO. So for a real IFO, this might be the wrong one.
Then again, since the imported palette as well as the frame palette/alpha for DVD based subtitles is editable now, it should be possible to fix this manually.
As a side note, by chance the "INI" format for palettes used by BDSup2Sub since quite some time is nearly the same as the text palette file used by PGCEdit. The main difference is the underscore ("color_0" instead of "color 0"). So by editing a PGCEDit text file and renaming it to INI, you can import the correct palette into BDSup2Sub even if it reads the wrong one from the IFO.
0xdeadbeef
21st June 2009, 17:21
@avivahl:
Ok, I had a look at the "dmd-sfchunli" sample. First thing to mention is that there are three languages in the IDX (English, French, Spanish). The default language is English (langidx: 0), so BDSup2Sub ignores all but the English captions.
This simple approach worked for all the multilanguage VobSubs I tried up to now, but unfortunately not for this one. The problem is that the the packets for the three languages are interleaved. I.e. the first English subtitle starts at 0x0000, followed by the first French subtitle at 0x0800, followed by the first Spanish subtitle at 0x1000. The 2nd English subtitle then starts at 0x1800. This still would be no issue, but at subtitle #177 (offset 0x141000 / timestamp: 00:17:53:451), the stream contains interleaved packages for a subpicture spread over multiple packets. So where BDSup2Sub expects the first extended packet of the English subpicture, it reads the start packet of a French subpicture which leads to the error.
The only way to fix this is to actually check the substream ID embedded into each packet (which I ignored up to now) and to skip packets with the wrong substream ID. I kinda fear though that there are some VobSub streams out there with inconsistent substream ID, but yeah well.
So this will be fixed and probably soon, but if you can't wait, I'd recommend to use VobSubs with only one language ID as a workaround for the moment (e.g. load and export in SC).
0xdeadbeef
21st June 2009, 22:28
Hm, fixing this was surprisingly easy.
BTW: did I already mention how much it sucks to have only a 56k modem until my DSL connection is fixed?
21.06.2009: 3.9.3 -> 3.9.4
Changed: VobSub: stream ID is used to skip packets to work around problems with interleaved streams.
Changed: added tooltips for most buttons, combo boxes etc.
avivahl
22nd June 2009, 02:05
Wonderful, thanks!
I love how you give such detailed problem analyzation for every bug report.
avivahl
22nd June 2009, 02:21
btw, I just finished looking over the code you included in the jar file and I must say it looks great.
You have a really good coding style.
Everything seems to be very modular and well commented (functions).
I think it would be great if you:
a) Open source it (completely). The available code looks great and easy to read. If the rest of the code is like this, it's already in good shape.
b) Add srt *import* support. Yes, that probably means adding SRT parsing and text rendering using fonts and such, but I'm sure it will be worth it.
Good job.
EDIT:
http://docstore.mik.ua/orelly/java-ent/jfc/ch04_09.htm
Gokumon
22nd June 2009, 17:26
b) Add srt *import* support. Yes, that probably means adding SRT parsing and text rendering using fonts and such, but I'm sure it will be worth it.
I think this is supposed to be a tool for editing bitmap-based subtitle formats and not a text-based format like SRT. Plus most of the options that this program provides would be rather useless since SRT contains no font or things like positional information in the format. It's really up to 0xdeadbeef to want to add such support but in case he doesn't and you want something to use in the meantime you might just want to grab a tool like Aegisub, Subtitle Workshop, etc.
avivahl
22nd June 2009, 19:31
Well, since it also supports exporting to many formats (including BluRay SUP), I think that SRT importing would be great. Would probably require a single class to act as a bridge between the text and bitmap. The rest of the program wouldn't even know it's a text source. The class would render the text and return a bitmap representation of it. I'm thinking about a dialog with font/style selection and such.
Btw, deadbeef, which GUI toolkit do you use? SWT? AWT? Swing?
Gokumon
22nd June 2009, 20:01
Well, since it also supports exporting to many formats (including BluRay SUP), I think that SRT importing would be great.
That's because SUP is a bitmap-based subtitle format and hence would fall under the scope of a program for allows you to "convert and tweak bitmap subtitle streams".
Would probably require a single class to act as a bridge between the text and bitmap.
Sure, but it would again go against the whole point of the program. If you want to edit text-based subs there are already numerous programs to do this.
The rest of the program wouldn't even know it's a text source. The class would render the text and return a bitmap representation of it. I'm thinking about a dialog with font/style selection and such.
Or you can just use this (http://www.videohelp.com/tools/srt2sup) or this (http://www.videohelp.com/tools/Txt2Sup) to do that already since you now seem to want an SRT to SUP converter.
Btw, deadbeef, which GUI toolkit do you use? SWT? AWT? Swing?
He uses AWT and Swing.
0xdeadbeef
22nd June 2009, 20:34
I wouldn't rule out the possibility that I might decide to add support for SRT import some day - yet I don't plan to right now. Mainly for the reasons that Gokumon already pointed out: There are other tools for this and BDSup2Sub is focused on bitmap subtitles.
About the source code: I sure plan to release all of it some day. What I released up to now is what I consider to be stable (in the sense of: I probably don't need to change this much more) and (more or less) well-designed. This is not necessarily the case for the rest of the sources ;)
About the GUI: yep, it's plain Swing (aka "Java Foundation Classes") which is based on the AWT. I don't use any AWT classes directly though.
SquallMX
26th June 2009, 01:21
Hi, i have a shameless request :rolleyes:
By default BDSup2Sub restores "hidden" subtitles in VobSub files (Invisible caption due to zero alpha - used alpha info of last caption.), would you create an option to keep them invisible (or simply exclude the subs from export)?
:thanks:
0xdeadbeef
27th June 2009, 21:57
27.06.2009: 3.9.4 -> 3.9.5
Changed: VobSub+SUP/IFO: fixing completely invisible subtitles is now disabled by default.
Can be enabled via command line (/fixinv) or via "Settings" menu.
Changed: CLI: Boolean parameters like "verbatim" can be switched on/off now with trailing +/- (e.g. "/verbatim-").
Changed: released Bitmap and Palette classes under the Apache License.
Fixed: GUI: default background color handling missing in "min time" textfield.
Chetwood
28th June 2009, 15:46
0xdeadbeef, let me thank you for providing such a great tool for the community. I'm not into HD material just yet but since your tool also processes idx/subs and given your expertise I hope you might be able to find out what's wrong with these sample subs (http://www.dvdshrink.info/chetwood/stuff/skipped.subs.rar).
I've ripped my original DVDs to HDD with DVD Fab and encoded them to avi with AutoGK. They run fine on my PC and DVD standalones but not on some of the HD media players I'm currently testing. Every other item or so is skipped. Opening them in BDSup2Sub results in this error message "WARNING: Language id en(index:1) inactive -> ignored" which got me confused since english is index 1 and available.
For a test I recreated an idx/sub by loading the AutoGK subs in Subtitle Creator and appending both to a new file. Again, I got the same error message from BDSup2Sub, only this time none of the subs would be displayed on my media player despite both languages being selectable with the remote. So I used VobSubStrip to rip only the german stream and this time there's no error message from BDSup2Sub and the sub is displayed just fine. Would be cool if you could find the time to shed some light on this. Thanks.
0xdeadbeef
28th June 2009, 18:17
Well, first of all there are two languages defined in your sample IDX and German is defined as default:
# Language index in use
langidx: 3
...
# English
id: en, index: 1
...
# Deutsch
id: de, index: 3
Since BDSup2Sub can only load one subtitle stream at a time and I was too lazy up to now to add a selection dialog, BDSup2Sub loads the language marked as default and outputs a warning that the other language(s) (in this case: English) was/were ignored. So selecting the German track is valid and BDSup2Sub behaves as described in the manual:
Note that BDSup2Sub ignores all captions but those after the id,index header that fits the language index defined via the "langidx" keyword.
So if you want to show/edit the English track in BDSup2Sub, you just need to change "langidx: 3" to "langidx: 1" in this case.
Note that when exporting such a Vobsub, BDSup2Sub exports only the language it imported.
But back to your problem:
Chances are that some tools or players ignore the langidx field completely and try to display all subtitles defined in the IDX. Since most English and German subtitles share the same display times or at least overlap, this would explain the erratic behavior.
Therefore I'd generally advise not to use VOBSUBs with more than one language if you don't have to and to split them into one Vobsubs for each language instead. This can be also done with BDSup2Sub: you just need to repeat the following steps for each language:
1) edit the "langidx" field manually to the next available language ID
2) load the VobSub into BDSup2Sub
3) export as Vobsub from BDSup2Sub (use same fps, resolution and the keep palette mode)
In the end you'll have one VobSub for each language.
Anyway, adding a language selection mode and command line option is on my list. Yet I dunno when I will implement it. Besides, this will only allow to select the language that is imported, but won't change the behavior of loading (and therefore exporting) only the loaded language track.
Chetwood
29th June 2009, 07:54
Alright, thanks for pointing out the RTFM, I've now changed the langidx to check out the english stream of the sub and I'm getting lots of new warnings: "WARNING: Offset to next fragment is invalid. Fixed to:0x00007000". First I thought, this might be causing trouble but the sub created with Subtitle Creator does not come up with such warnings and still does not run properly. So I'm inclined to believe that whatever is causing these problems stems from the sub file. Cause after VobSubstrip's rewrite of both idx and sub file the sub runs flawlessly.
Therefore I'd generally advise not to use VOBSUBs with more than one language if you don't have to
Problem is, I do have to cause contrary to my standalones with Mediatek chipset the HD media players with Realtek chipset do only load the first subtitle file and ignore the rest. Thus
Some.movie.avi
Some.movie.de.idx
Some.movie.de.sub
Some.movie.en.idx
Some.movie.en.sub
Some.movie.en.director's.comment.idx
Some.movie.en.director's.comment.sub
would display only the de sub with no option to cycle through the others. Since other 2 language subs I've encoded with AutoGK do run flawlessly as well, something else must be causing trouble. I've added a sample of this to the rar file (http://www.dvdshrink.info/chetwood/stuff/skipped.subs.rar). Can you think of anything else when looking at those samples? Thanks again.
0xdeadbeef
29th June 2009, 18:23
Alright, thanks for pointing out the RTFM...
You asked for it.
I've now changed the langidx to check out the english stream of the sub and I'm getting lots of new warnings: "WARNING: Offset to next fragment is invalid. Fixed to:0x00007000".
Yep, this a somewhat precise description of the problem. The (English) subtitle stream is corrupt, but BDSup2Sub fixed it. Unfortunately, there are quite a few tools out there that create corrupt streams. Sometimes even the stream on the DVD is already defective.
First I thought, this might be causing trouble but the sub created with Subtitle Creator does not come up with such warnings and still does not run properly.
So I'm inclined to believe that whatever is causing these problems stems from the sub file. Cause after VobSubstrip's rewrite of both idx and sub file the sub runs flawlessly.
Well, all that I can tell is that SC creates a valid subtitle stream. If it still doesn't work ok on your player, it's pretty likely that the player has issues.
Problem is, I do have to cause contrary to my standalones with Mediatek chipset the HD media players with Realtek chipset do only load the first subtitle file and ignore the rest.
And embedding them into the transport stream doesn't work?
I've added a sample of this to the rar file (http://www.dvdshrink.info/chetwood/stuff/skipped.subs.rar). Can you think of anything else when looking at those samples? Thanks again.
Dunno what to do with this. Seems to contain all the last samples plus a new one that doesn't have any issues at all.
Sorry, but I dunno if I get what you expect from me. Shall I analyze software bugs in your player by looking at valid streams it doesn't like? That is a bit optimistic to say the least.
Chetwood
30th June 2009, 06:11
You asked for it.
I wasn't being ironical.
And embedding them into the transport stream doesn't work?
I'm not sure I'm getting your point. What transport stream? I'm using avi as a container so I can playback my files on pretty much every player I have. Thus mkv won't do and I hate hardcoded subs.
Sorry, but I dunno if I get what you expect from me. Shall I analyze software bugs in your player by looking at valid streams it doesn't like?
Of course not, I was just hoping that given your expertise and likelyhood of being able to also look into the sub files rather than idx files only, you would notice some difference between the files that could explain why some of them work and some don't. What has changed between the AutoGK sub and the VobsubStrip sub?
Since all subs were done with AutoGK initially I thought it would be the one to blame cause I hadn't expected some DVD streams already being defective as you suggested but which is probably true. However, I'm still baffled that some subs don't get flagged as problematic in BDSup2Sub but still don't work on 2 hardware hd players (with different software implementations but apparently the same chipset).
Jaja1
8th July 2009, 09:59
I have two requests.
First, could you add an option to center all the subtitles in the lower part of the image with one keystroke.
Second, could you add an option to close the sup you are working on, so that it becomes unlocked for windows.
Thanks in advance. And BDSup2Sub is still working great.
0xdeadbeef
8th July 2009, 17:45
First, could you add an option to center all the subtitles in the lower part of the image with one keystroke.
Well, one keystroke is asking a bit too much, but I think adding a center (and maybe also left/right) button in the "move all" dialog would be possible.
Second, could you add an option to close the sup you are working on, so that it becomes unlocked for windows.
Hm, do you mean a simple "Close" item in the file menu? That should be possible of course.
Jaja1
8th July 2009, 18:13
Well, one keystroke is asking a bit too much, but I think adding a center (and maybe also left/right) button in the "move all" dialog would be possible.
Yeah, one keystroke sounds a bit heavy doesn't it :)
But adding a center button in the "move all" dialog is just what I meant. I should have phrased my request more precise.
Hm, do you mean a simple "Close" item in the file menu?Yip, that's it.
Nice to see that you can rephrase my questions in such a way that everybody can now understand them :)
And thanks for your great support.
0xdeadbeef
11th July 2009, 20:38
11.07.2009: 3.9.5 -> 3.9.6
Changed: Added "Close" menu item in File menu.
Changed: Added horizontal moving of captions (left, right, center)
Jaja1
11th July 2009, 22:59
I love you.
OptimusX
24th July 2009, 04:00
0x,
You're program is awesome, and your level of support admirable. Anyway, enough sucking up (I've waited a long time for a program like yours....really).
Now for the question:
I have been using MaestroSBT for a long time to make DVD subs. The subs that I make are for anime, which may include many types of overlapping subs (dialouge, music, karaoke, translations of a sign, etc.) that are going on all at the same time.
When using MaestroSBT as is, the subs cause an annoying flicker during an overlap, where subs have identical start/end times.
Example:
1. Subtitle A is onscreen. [A]
2. Subtitle B appears, with A. [AB] *flicker occurs
3. B ends with A still remaining. [A] *flicker occurs
Anyway, someone created a script to modify the sonic SST file to give infinite duration to the first sub. I am then given flicker free, overlapping subs.
However, when I generate subs via MaestroSBT (with "infinite timecode" script applied) and get them into BDSup2Sub, the program "fixes" the timecodes to give subs matching start/end times. When I playback the subs, the original "flicker bug" is back.
workflow is:
(MaestroSBT --> muxman with dummy video ---> extract w/ VobSub ---> import to BDSup2Sub).
(Using Subtitle Creator to convert an extracted DVD-SUP to SUB/IDX reintroduces the "flicker bug," since Subtitle Creator seems to "fix" the infinite timecodes as well).
Anyway, my question: is it possible to have BDSup2Sub *not* correct the infinite timecodes? It would be nice to have this functionality to preserve the "flicker fix" when going from sub/idx <--> DVD-SUP, although I am hoping the "flicker fix" will work for a BD-SUP as well.
If this is a concern you've heard before, I appreciate your input. If this is the first time you've heard about the "flicker bug," please compare these two SUB/IDX files. (http://rapidshare.de/files/47932682/To_Blink_or_Not_to_Blink.zip.html)
One is a flickering version, the other not. Either one processed to BD-SUP reintroduces the flicker. The subtitle that serves as a great example is around #10, right at the line "July 1999."
0xdeadbeef
24th July 2009, 20:06
Well, I kinda understand the request and indeed I played with the idea before to keep missing end times untouched. Yet this is not as easy as it may seem. When exporting subtitle streams, BDSUp2Sub uses a very simple packet structure to make things a little less complicated.
E.g. the RLE buffers for VobSubs and BD-Sups have to be split into several fragments if they exceed certain sizes and there are several inter- and intra-packet offsets that have to be adjusted across these fragments if the packet length of one packet differs.
Getting this to work was not really much fun and as I introduced a varying packet length (by only one byte) to support the forced flag in VobSubs, this became even worse. The idea to rework all this code for all (binary) export formats doesn't make me happy to say the least.
OptimusX
25th July 2009, 00:26
Thanks for taking the time to reply. I'm sorry to hear that the solution isn't as simple as I had hoped.
If coding for binaries is the major hurdle, I guess the simplest way this can be solved in the future (and I mean by the community as a whole, not at the expense of your personal time) is to see if a fix can be applied to an xml/png export. (I'm working on an AVCHD and authoring with BD-SUPs, which is the motivation for my initial post)
I'm no programmer, but I would guess a script that edits xml timestamps would be an easier solution than changing code for binary export. This would be essentially the same thing as the script that fixes MaestroSBT .sst output.
But I guess I'll have to wait for an authoring program that accepts xml/png input first.
Anyway, I'm just thinking out loud, I know I'm talking outside of the scope of your program
Anyway, great program, it's useful and really fun to use.
MattLx70
26th July 2009, 21:04
I apologize if these questions are answered. I read the thread and as a newbie to subs I have a couple questions:
Will it work to demux with tsmuxer or are there problems to be expected that way? I can certainly use eac3to and just want to avoid ripping the subs again if tsmuxer should work.
Bigger question: I'm not sure what output options I'm supposed to use. I have a h.264 m2ts file that contains video at 1920:1080p. I also have the .sup of the forced subtitles. I want to create a DVD and don't know if I should be creating .sub/.idx to match the video input file at 1920:1080p or ????
Oh... And will the color, size, and positioning tend to mirror the originals or do I have to get creative with those options?
Thanks in advance for any help.
0xdeadbeef
26th July 2009, 22:27
Will it work to demux with tsmuxer or are there problems to be expected that way? I can certainly use eac3to and just want to avoid ripping the subs again if tsmuxer should work.
The SUP files should be basically the same. Most of my personal examples are demuxed with EAC3TO, but I tested some demuxed with TsMuxer as well. The only difference should be some PTS/DTS time stamps inside the packets.
Bigger question: I'm not sure what output options I'm supposed to use. I have a h.264 m2ts file that contains video at 1920:1080p. I also have the .sup of the forced subtitles. I want to create a DVD and don't know if I should be creating .sub/.idx to match the video input file at 1920:1080p or ????
If you convert to DVD, you should chose either PAL or NTSC as output resolution. If you convert to PAL and use PAL speedup, you should convert frame rate in BDSup2Sub as well. Dunno of TsMuxer can do that, but EAC3TO can't.
Oh... And will the color, size, and positioning tend to mirror the originals or do I have to get creative with those options?
BDSup2Sub is a bitmap based conversion tool. If you scale down from 1080p to e.g. PAL, the size of the subtitles will be reduced according to the factor the screen resolution is reduced. So relative size of the captions won't change.
However sometimes it's a good idea to increase the (relative) scale of the subtitles by factor e.g. 1.2 to make them "prettier" and more readable. Then it also makes sense to use the "move outside" option.
About the colors: since DVD subtitles are limited to 4 colors out of 16 colors, a 100% reproduction of the original colors is usually not possible. The build in help describes the whole issue in detail.
BTW: what tool are you using to create the DVD? ConvertXtoDVD?
MattLx70
26th July 2009, 23:33
Thanks... So since I'm authoring a DVD using an m2ts at NTSC 1920:1080P, should I pick the same with the .sup conversion? It's really the resolution I'm confused on. Should the resulting .sub match the m2ts before I start the authoring?
Yes... I'll use ConvertX2DVD only because that's what I'm comfortable with.
It makes sense that the colors may/will often have to convert because the original file had more options. I'll read the help to try to learn more. Since I'm only dealing with forced subs (not many in the film), I don't want to get creative. If I choose NTSC and 1920:1080P and leave the rest alone, I'm thinking maybe it will be good enough.
0xdeadbeef
26th July 2009, 23:52
Thanks... So since I'm authoring a DVD using an m2ts at NTSC 1920:1080P, should I pick the same with the .sup conversion? It's really the resolution I'm confused on. Should the resulting .sub match the m2ts before I start the authoring?
A Video-DVD can only be NTSC (720x480) or PAL (720x576). So if your DVD will be NTSC, you need to select NTSC (720x480) as output resolution in BDSup2Sub.
Yes... I'll use ConvertX2DVD only because that's what I'm comfortable with.
ConvertXtoDVD has several issues, but I guess at this point I would confuse you more than I'd help you by telling you.
It makes sense that the colors may/will often have to convert because the original file had more options. I'll read the help to try to learn more. Since I'm only dealing with forced subs (not many in the film), I don't want to get creative. If I choose NTSC and 1920:1080P and leave the rest alone, I'm thinking maybe it will be good enough.
Well, NTSC and 1080p is not possible of course. NTSC should do. Anyway, the default options usually work quite well already.
As I said, when scaling down from Full HD to DVD SD, it usually looks a little better to select X/Y scaling factors of 1.2 and move the captions outside the cinemascope window. Mitchell is typically a pretty good choice for the scaling filter. For the rest of the options, the default values should usually work ok.
MattLx70
27th July 2009, 02:06
Thanks again for the help. Hopefully my last question... Is it normal that the sup ripped from a USA BD would default to PAL output? I changed it to NTSC and expect that will work for me.
0xdeadbeef
27th July 2009, 11:24
There's no way that BDSup2Sub could decide whether you want to convert 1080p to PAL or NTSC. All the info about region codes or languages is gone in the demuxed SUP stream.
Anyway, PAL is just the default setting as it's my default use case.
Nikos
3rd August 2009, 12:55
I ripped my original BluRay (1080p) and encoded to 720p .mkv.
For a test i created 2 vobsubs from .sup file, one without scale down and another with scale down from 1080p to 720p.
With media player classic and external directvobsub filter (vsfilter.dll) the subs have exactly the same size and almost the same position, but the quality without scale down is a little better.
Any explain for this?
Is there any problem if i don't scale down?
Thanks for your awesome program and support.
0xdeadbeef
3rd August 2009, 16:55
Well, if you don't scale down, the subtitles are a little too large and a little misplaced. In some cases, this can be still ok, in others parts of the subtitles will be cut off.
Generally, if you scale down the video, you should also scale down the subtitles accordingly to get the correct scale and position. With the appropriate settings, the visual differences of the characters should be pretty insignificant.
Nikos
3rd August 2009, 19:27
Thanks for the quick reply, i will post some screeenshots later.
Now a feature request:
Sometimes the BluRay movies have black bars left and right, i believe it's a good idea to add Crop Offset X option in the move all captions tab.
For example the "DR Strangelove" movie, have about 66 pixels left and 66 pixels right black bars. Also all 4:3 movies have big black bars left and right.
:thanks:
0xdeadbeef
3rd August 2009, 21:02
Sometimes the BluRay movies have black bars left and right, i believe it's a good idea to add Crop Offset X option in the move all captions tab.
For example the "DR Strangelove" movie, have about 66 pixels left and 66 pixels right black bars. Also all 4:3 movies have big black bars left and right.
It's not the movie that has black bars but the 16:9 TV uses black bars to show the 4:3 image without zooming or other tricks. There is nothing that could be cropped here. Cropping only makes sense if the cinemascope bars are encoded into the stream which is the case for some divx movies or TV captures.
Nikos
4th August 2009, 00:10
Here a screenshot from Great Expectations movie (1080p).
http://users.chan.sch.gr/nikos_ch/files/pictures/Great.Expectations.jpg
The whole screen is 1920x1080 pixels, but movie's "real" resolution is about 1472x1080 pixels.
Here if i don't crop the black bars before encoding the TV don't add black bars because the whole screen is 16:9
If i crop the black bars "Crop(224, 0, -224, -0)" before encoding then the TV add black bars right(224) and left(224).
Gokumon
6th August 2009, 19:35
It's not the movie that has black bars but the 16:9 TV uses black bars to show the 4:3 image without zooming or other tricks. There is nothing that could be cropped here. Cropping only makes sense if the cinemascope bars are encoded into the stream which is the case for some divx movies or TV captures.
All content on Blu-Rays that are not perfectly 16x9 (such as 4:3, 5:4, and anything 1.85 and wider) will have black bars encoded into the stream in order to fit it into the 16x9 frame. In an ideal world they would use all the available resolution but mark it with a flag saying 4:3 or 16x9, etc so that upon playback it would be resized and the TV would then add the bars as needed, but that doesn't happen.
thewebchat
6th August 2009, 23:28
In an ideal world, they would use a dynamic resolution (maybe define a max pixels/frame) and not fixed resolution hacks like anamorphic video (eww) and letterboxes (wasteful).
Gokumon
7th August 2009, 01:16
In an ideal world, they would use a dynamic resolution (maybe define a max pixels/frame) and not fixed resolution hacks like anamorphic video (eww) and letterboxes (wasteful).
What's wrong with anamorphic video? You can use all available resolution the medium and then resize as needed to fit the display's resolution which will provide maximum quality across all TVs. Your dynamic resolution isn't going to give you any better quality and would just add more complexity than a simple flag would.
mrr19121970
8th August 2009, 11:09
I've written a little app for converting SRT to XML/PNGs for importing into BDSup2Sub. You can see some details here:
http://forum.slysoft.com/showthread.php?t=32826
http://clownbd.com/Clown_SRT2XMLSUB_1.jpg
.
hubblec4
8th August 2009, 23:47
mrr19121970 well done. very nice work.
Zelos
11th August 2009, 15:18
great tools !
nice work , thanks guys :goodpost:
hamletiii
12th August 2009, 19:27
I choose the same framerate as input and output, both 29.97, how come the output timecode is slightly different than the input?
One example:
Input:
start: 00:55:28.070 end: 00:55:32.100
Ouput:
start: 00:55:28.058 end: 00:55:32.095
Also is there a way to not convert the images? I just want to extract the subpictures generated from PunkGraphicStream to png+xml.
0xdeadbeef
12th August 2009, 20:41
I choose the same framerate as input and output, both 29.97, how come the output timecode is slightly different than the input?
One example:
Input:
start: 00:55:28.070 end: 00:55:32.100
Ouput:
start: 00:55:28.058 end: 00:55:32.095
As described in the online help etc., BDSUp2Sub always synchronizes to the target frame rate.
Also is there a way to not convert the images? I just want to extract the subpictures generated from PunkGraphicStream to png+xml.
Yes and no. If you select the same resolution and frame rate and choose "keep palette", a plain subpicture is not altered.
Then again, if there are palette animations etc., BDSup2Sub will remove them. Then again, stuff like this is not supported by the BDN XML format anyway.
hamletiii
12th August 2009, 21:41
As described in the online help etc., BDSUp2Sub always synchronizes to the target frame rate.
So what is the benefit to "always synchronizes to the target frame rate"?
Is there a way to keep the timecodes as is? I noticed that this feature didn't get introduced prior to ver2.0.
0xdeadbeef
12th August 2009, 22:11
So what is the benefit to "always synchronizes to the target frame rate"?
To improve compatibility of course.
Besides: what possible benefit could it have to start or end a subtitle in between frames? Most obviously nothing can be displayed between two frames anyway.
Is there a way to keep the timecodes as is? I noticed that this feature didn't get introduced prior to ver2.0.
No, as this would make absolutely no sense.
rica
17th August 2009, 21:21
Hi,
to perform a frame rate conversion e.g. for pal speedup, will it be enough just to select "FPS Target" as 25 ?
(sorry i've been away for some time)
0xdeadbeef
18th August 2009, 01:36
No, you also need to check the "Change frame rate" checkbox and select/confirm the source frame rate.
micha019
18th August 2009, 16:33
Hello,
does anyone know which standalone player already supports vobsubs in mkv?
I already know that the wd-media player support it.
But I'm looking for a standalone player with network support.
So I tested the new player: Asus O!Play HDP-R1 and Xtreamer.
Both doesn't play vobsubtitles.
GZZ
18th August 2009, 17:55
micha019 please post this under Hardware players and not in here.
rica
18th August 2009, 21:10
No, you also need to check the "Change frame rate" checkbox and select/confirm the source frame rate.
Thx, it means it works and no need anymore any manual adjustment like on SubtitleWorkshop?
0xdeadbeef
18th August 2009, 21:26
Thx, it means it works and no need anymore any manual adjustment like on SubtitleWorkshop?
I use it all the time with 24p material that I speed up to 25p with EAC3TO (which simply patches the fps info field in the video stream). Works great for me.
rica
19th August 2009, 01:27
Thanks, i'll give it a go.
sneaker_ger
19th August 2009, 17:46
In the AVS2BDNXML (http://forum.doom9.org/showthread.php?p=1316234#post1316234) thread we discovered a problem that seems to be an error in BDSup2Sub.
The problem is that when doing a BDN XML to BR Sup conversion the subtitles sometimes appear and/or disappear 1 frame too late.
In this sample (http://www.mediafire.com/?mdwkiigiu4n) you'll see that while the subtitle should appear on frame 24 (timecode "00:00:01:00" in bdn xml notation, first frame being frame #0) it appears on frame 25 in the resulting .sup file. When re-converting the file you'll get the correct timing (timecode "00:00:01:00") in the resulting xml though.
Zachs
25th August 2009, 07:22
I'd like to run some effect filters over my subs (PGS sup files), such as drop shadow, brightness / contrast adjust etc.
BDSup2Sub probably doesn't do this yet but I'd like to see it implemented.
Ideally, I'd like to use the plugin filters written for Paint.NET.
mrr19121970
25th August 2009, 08:55
why not export them to XML/PNG and then whizz over your PNG files applying any affects you want. when you're done convert back to PGS.
,
Zachs
25th August 2009, 09:35
Hmm that's a good idea. Didn't think of that.
Thanks!
minerva.thegift
28th August 2009, 00:03
I just wanted to drop by and say thank you so much for this project/utility! My general philosophy on DVD and now Blu Ray archiving is that if the original disc has it, I want to archive it - including all the subtitles in languages that I don't even know how to read :P I had started looking at some .sup to .srt (text) tools that use OCR but that doesn't really work for me with languages like Arabic and Thai which don't use the Roman alphabet. I have successfully archived two blu ray movies so far (with all their subtitles in tact) to .mkv files and I used BDSuptoSub for the subtitles (and mkvmerge GUI in the mkvtoolnix to mux them back in to the mkv file.) I think I might even work on writing a guide and I'll be sure to include a link to this thread.
Thanks so much!:thanks:
Note: I have written a guide detailing how to create a digital archive copy of a Blu Ray movie and I included a section on using BDSup2Sub. It can be found here (http://forum.videohelp.com/topic372380.html#BDSup).
hamletiii
28th August 2009, 21:09
How to preserve the color when converting from BDSup to DVD idx/sub?
Here (http://i219.photobucket.com/albums/cc183/linkai8424/PS3%20MEDIA/bdsupcolor.png) is the picture:
The original sub has two colors, if I choose output as idx/sub, the preview only gives one color for both lines?
0xdeadbeef
30th August 2009, 16:15
How to preserve the color when converting from BDSup to DVD idx/sub?
The integrated help file answer this all. Expecially the chapter
"Some technical background / Palette Modes".
In an nutshell: multicolored text is lost when converting from 255 to 3 opaque colors.
sneaker_ger
30th August 2009, 20:43
In the AVS2BDNXML (http://forum.doom9.org/showthread.php?p=1316234#post1316234) thread we discovered a problem that seems to be an error in BDSup2Sub.
The problem is that when doing a BDN XML to BR Sup conversion the subtitles sometimes appear and/or disappear 1 frame too late.
In this sample (http://www.mediafire.com/?mdwkiigiu4n) you'll see that while the subtitle should appear on frame 24 (timecode "00:00:01:00" in bdn xml notation, first frame being frame #0) it appears on frame 25 in the resulting .sup file. When re-converting the file you'll get the correct timing (timecode "00:00:01:00") in the resulting xml though.
This error turned out to be an error in the AviSynth SupTitle plugin and not in BDSup2Sub.
deank
2nd September 2009, 07:33
@0xdeadbeef: Can you take a look at these (http://multiforum.deanbg.com/viewtopic.php?f=11&t=310&start=5) posts? The user will be able to post here @ doom9 in few days.
Dean
0xdeadbeef
2nd September 2009, 16:26
I answered over there.
Anyway, as usual, I need the sample to give a more useful reply.
deank
3rd September 2009, 00:27
Thank you!
Daniel_Lechu:
Hi, here´s 4 samples of subtitles ripped from Garfield and garfield 2 DVD.
http://www.megaupload.com/?d=WZRI5T09
Can u help me to learn how to fix the IDX, im new in subtitles and the only i know is extract from DVD to IDX/SUB or rip to STR with SubRip.
Thanks in advance :)
Edit with lastest responses: my subtitles are separated, only 1 subtitle/file.
Dean, Next Monday i´ll try to post in doom9 ;)
avivahl
3rd September 2009, 00:39
@0xdeadbeef: I have another IFO/SUP (dvd) that doesn't work w/ the latest version (3.9.6). DVDSubEdit opens it and shows the subs. BDSup2Sub opens it and gives a "buffer offset error" when "seeking" to another frame. Will send it over PM.
0xdeadbeef
6th September 2009, 21:09
@deank:
I answered in your forum. In a nutshell: the IDX files in these samples are broken in several ways and I don't feel like adding workarounds for this.
@avivahl:
Ok, I analyzed that sample and I guess the problem is that in some of the frames, the odd lines are located first in the RLE buffer instead of 2nd as usual. Admittedly, BDSup2Sub currently can't cope with that inverted field order.
It should be easy to add a workaround though. Hope to fix this within the next few days. I'm just too tired to do it right now and dunno if I will have time tomorrow.
0xdeadbeef
6th September 2009, 23:52
Ok, I defeated my weaker self.
07.09.2009: 3.9.6 -> 3.9.7
Fixed: Vobsub+SUP/IFO: files with swapped odd/even field order in the RLE buffer were not handled correctly.
avivahl
7th September 2009, 01:02
Wow. I couldn't expect a better answer than that. :)
hubblec4
9th September 2009, 16:37
Ok, I defeated my weaker self.
07.09.2009: 3.9.6 -> 3.9.7
Fixed: Vobsub+SUP/IFO: files with swapped odd/even field order in the RLE buffer were not handled correctly.
thanks for your work again
Atak_Snajpera
9th September 2009, 19:57
Could you add support for none standard resolutions? (sup -> sub/IDX) For example 1920x800. It would be great if we could crop top margin.
0xdeadbeef
9th September 2009, 20:29
Could you add support for none standard resolutions? (sup -> sub/IDX) For example 1920x800. It would be great if we could crop top margin.
Most probably I don't get the request but how is that different from using the existing cropping feature?
Atak_Snajpera
9th September 2009, 20:38
Most probably I don't get the request but how is that different from using the existing cropping feature?
What is command to crop top margin then?
0xdeadbeef
9th September 2009, 22:52
The online help says: "/cropy:<n> crop the upper and lower n lines - default: 0"
Then again, you could also open the "move all captions" dialog.
ps auxw
10th September 2009, 13:11
Could you add support for two Graphics in a single Event for BDN XML input? This would be quite useful for animated subtitles, since with big images the Presentation Graphics buffer can overflow. Using two smaller images, which still cover the subtitles, avoids this.
References:
http://forum.doom9.org/showpost.php?p=1321592&postcount=81
http://forum.doom9.org/showpost.php?p=1323369&postcount=91
Example:
<?xml version="1.0" encoding="UTF-8"?>
<BDN Version="0.93" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="BD-03-006-0093b BDN File Format.xsd">
<Description>
<Name Title="Undefined" Content=""/>
<Language Code="und"/>
<Format VideoFormat="720p" FrameRate="23.976" DropFrame="false"/>
<Events LastEventOutTC="00:00:53:19" FirstEventInTC="00:00:53:16"
ContentInTC="00:00:00:00" ContentOutTC="00:01:02:12" NumberofEvents="3" Type="Graphic"/>
</Description>
<Events>
<Event Forced="False" InTC="00:00:53:16" OutTC="00:00:53:17">
<Graphic Width="456" Height="75" X="139" Y="621">00001288_0.png</Graphic>
<Graphic Width="405" Height="167" X="759" Y="176">00001288_1.png</Graphic>
</Event>
<Event Forced="False" InTC="00:00:53:17" OutTC="00:00:53:18">
<Graphic Width="456" Height="75" X="139" Y="621">00001289_0.png</Graphic>
<Graphic Width="404" Height="167" X="759" Y="176">00001289_1.png</Graphic>
</Event>
<Event Forced="False" InTC="00:00:53:18" OutTC="00:00:53:19">
<Graphic Width="456" Height="75" X="139" Y="621">00001290_0.png</Graphic>
<Graphic Width="404" Height="167" X="759" Y="176">00001290_1.png</Graphic>
</Event>
</Events>
</BDN>
0xdeadbeef
10th September 2009, 19:17
Could you add support for two Graphics in a single Event for BDN XML input?
Short answer:
No!
Long answer:
I could add support for multiple pictures per frame to the BDN import, but internally, there will be (most probably) always only one picture due to the nature of the internal representation, to allow export to any other format and to not mess with the move/crop features. So when converting from XML to XML or whatever, all pictures of one frame will be merged to one.
Besides, implementation for PNGs using an 8bit palette would be a little tricky and "keep palette" would be impossible for different palettes.
This would be quite useful for animated subtitles, since with big images the Presentation Graphics buffer can overflow. Using two smaller images, which still cover the subtitles, avoids this.
I severely doubt this. The decoded object buffer for PGS objects is 4MB in size by definition. Since an 8bit palette mode is used for PGS, this means that a picture 1920*1080 in size fits twice in the buffer. So it is simply impossible to get an overflow there with only one composition object within an epoch.
IMHO the wish for having two composition object per frame is based on wrong assumptions and the way I could implement it without breaking the whole program would create the very same BD-SUP stream.
ps auxw
10th September 2009, 19:34
I severely doubt this. The decoded object buffer for PGS objects is 4MB in size by definition. Since an 8bit palette mode is used for PGS, this means that a picture 1920*1080 in size fits twice in the buffer. So it is simply impossible to get an overflow there with only one composition object within an epoch.
As much as I would like it, if this was true, it isn't. If you read the avs2bdnxml thread (http://forum.doom9.org/showthread.php?t=146493) you will find that Oleg Rode had trouble with flickering subtitles. Later PHD_1976 tried muxing these subtitles with Scenarist, which reported overflows (http://forum.doom9.org/showpost.php?p=1321154&postcount=69). After cutting down on image size, so no overflows occured, flickering stopped. It seems graphics are kept in buffer longer than should be necessary.
(Wait, looking at it, it is not the PGS buffer, that overflows, but the Decoded Object buffer, sorry.)
0xdeadbeef
10th September 2009, 19:43
As I said: while this is a nice theory this is technically impossible since even a full screen picture per epoch only fills half of the 4MB.
ps auxw
10th September 2009, 19:47
Maybe you have another way to explain that:
Subs were flickering. Scenarist complained about buffer overflow. Splitting the subs shut up Scenarist and got rid of flickering.
Since automatic splitting requires some ugly calculations, I'd be glad to get rid of it again, so another way to solve the problem would be more than welcome.
Oleg Rode
10th September 2009, 22:21
a full screen picture per epoch only fills half of the 4MB.
OK, can you help me? I got colorful and beautiful subs (xml+png). BDSup2Sub perfectly eats them. I can accept a little loss of quality in my subs. So, what settings do I need to set in your program to produce Blu-Ray standard compatible subs? I do something wrong and I receive flickering on big objects - especially from 00001288_0.png to 00001483_0.png
Here is a xml+png subtitles pack.
http://rapidshare.com/files/278292300/Valkyria.zip.html
Sorry for my English
0xdeadbeef
11th September 2009, 00:25
Firstly, you should rethink the idea of "Blu-Ray standard compatible" (in bold print!) subtitles. It's the authoring tool that is responsible for creating BD compliant streams in the end and only the authoring tool can e.g. guarantee bandwidth limits.
Unfortunately, since some muddlehead decided to leave all the DTS/PTS info from the original multiplexed stream in the SUP files, instead of invalidating or removing it as its the case for HD-DVD and DVD subtitle formats, current free multiplexers seem to assume that the information in the SUP is always valid. Which is a bold assumption to say the least.
This makes the BD-SUP (PGS) format an even more complex beast since in addition to the PGS bells and whistles, it also contains an awful amount of DTS and PTS time stamps which have to consider how long decoding of a composition object takes or how long it takes to render an object. While BDSUp2Sub tries to calculate all of these time stamps to my best knowledge, there is absolutely no checking done if e.g. the created PGS stream hits the bandwidth limits of a Blu-Ray or if there are too many frames to be rendered in a too short amount of time for the graphics processor of a standalone. I must admit that I somewhat doubt this is the case, but then again if you want to display a new 256 color near fullscreen picture every frame, chances are it is.
Apart from this, BDSup2Sub was created to convert typical simple subtitles, not to create fancy animations. It creates the most primitive type of epoch, but doesn't make any use of more advanced PGS features as palette and cropping animations, multiple windows or multiple composition objects per window. All of these features are of course also used to save bandwidth and distribute it more efficiently.
Anyway, chances are that the flickering you observe is caused by simpler causes. E.g. time gaps of a frame due to rounding errors when converting from/to the weird BDN time format. Yet it's also possible that the simple epoch format used by BDSup2Sub (and any other free tool creating BD-SUP format AFAIK) is just not the correct choice for animated subtitles.
Which brings us back to the original request: as far as I can tell, the only benefit of two composition objects per epoch would be a slightly reduced decoding and rendering time. Since these times are typically pretty short, this could only lead to problems if you're really pushing the PGS format to its limits by e.g. using large palettes and updating images at very high frequency.
E.g. the pixel decoding rate is 128e6 bit/s or 16 Million pixels per second. At 24p, this means that 667334 8bit pixels can be decoded per frame (if I didn't make any dumb calculation error). Unfortunately, this is quite a simplification though since also clearing of the screen buffer etc. has to be taken into account.
Anyway, even if saving a little bit of time would really help in some cases, it surely wouldn't fix the issue itself.
[EDIT]
Ok, I had a look at the sample. The problem is most probably really the combination of fading and large images. Firstly, fading in/out is not supposed to be done this way in any subtitle format since this cost too much bandwidth and needs too many updates in a too short amount of time for the graphics processor. Instead only the palette should be updated. However AFAIK there is currently no free tool chain available that will create BD-SUPs with palette animations. Also it would be very difficult to reverse engineer a palette fade from analyzing images, especially if they are truecolor ARGB images. Instead the fade would have to be defined in the XML format (e.g. alpha start value, alpha end value, fade period). Yet I dunno if there are even keywords defined for this.
Splitting the image into two composition objects would maybe really help in this case, yet the main problem is this brute force fading approach.
deank
11th September 2009, 14:10
I posted a week ago in easySUP's thread, but I'll repost here again:
edit: I also changed the default 'merge' and 'min display' times of bdsup2sub, so probably it will cause more smooth processing of animated subtitles and no flickering. Still I had no time to test it yet.
edit2: Ok, so I gave it a try with ASS subtitles uploaded by Oleg Rode. There is no flickering and subtitles show and disappear smoothly (fade in/fade out) with 23.976fps 1280x720 source. I was testing on PAL PS3 (60GB model) with firmware 3.00.
TMT also plays these fade in/out 'animation' just fine.
0xdeadbeef
11th September 2009, 16:42
Well, maybe there is no problem at all, but theoretically speaking: a software player running even at a not so fast PC will never have problems to render some subtitles in time. On a standalone things might look different.
deank
11th September 2009, 17:00
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
0xdeadbeef
11th September 2009, 17:39
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.
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?
deank
11th September 2009, 18:25
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
0xdeadbeef
11th September 2009, 19:05
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.
deank
11th September 2009, 19:13
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
deank
27th September 2009, 22:03
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.
twazerty
27th September 2009, 23:01
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!
0xdeadbeef
27th September 2009, 23:51
@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.
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.
deank
28th September 2009, 10:08
@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...
0xdeadbeef
28th September 2009, 11:17
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.
deank
28th September 2009, 11:42
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:
java -jar d:\multiavchd\tools\bdsup2sub.jar %1
But then everytime I need to manually select the resolution of the input file.
:-)
twazerty
28th September 2009, 15:03
....
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. :)
0xdeadbeef
28th September 2009, 21:42
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.
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.
deank
28th September 2009, 21:52
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.
0xdeadbeef
28th September 2009, 21:54
That's why I suggested:
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.
deank
28th September 2009, 22:10
Yes :) although you can implement /res:keep as default when using the GUI, instead of explicitly using the option.
0xdeadbeef
28th September 2009, 22:16
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.
saint-francis
29th September 2009, 01:36
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.
0xdeadbeef
29th September 2009, 11:28
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.
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.
Kratus
3rd October 2009, 10:21
Hello there,
I discovered your awesome tool a few weeks ago.
Thumbs up for your great work an level of support!:thanks:
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:
http://img16.imageshack.us/img16/2089/guiparameters.jpg
- 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. :confused:
http://img8.imageshack.us/img8/4315/frame59.jpg
- 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?
deank
3rd October 2009, 11:12
I tried your sample and the output is not corrupted - all captions are moved properly:
java -jar BDSup2Sub.jar "Sous titres_7_French_original-demuxed_by_EAC3.sup" output.sup /res:1080 /fps:keep /movin:2.4,10
I'd suggest you to use the proper name for your input and output subtitle files, instead of *.sup wildcard!
Kratus
3rd October 2009, 11:42
You are right!
I tried this (because I need to keep the wildcards):
java -jar d:\BDSup2Sub\BDSup2Sub.jar "*.sup" "output\*.sup" /res:1080 /fps:keep /movin:2.35,24and it worked properly
whyle this one:
java -jar d:\BDSup2Sub\BDSup2Sub.jar "*.sup" "*.sup" /res:1080 /fps:keep /movin:2.35,24did not.
Thanks a lot, Deank.
0xdeadbeef
4th October 2009, 01:18
I don't want to be picky, but indeed all of your CLI examples are wrong:
"'D:\HD-RIP\Largo Winch\*.sup' 'D:\HD-RIP\Largo Winch\*.sup' /res:1080 /movin:2.35,24 /verbatim+"
You're using the same path and name for input and output which begs for trouble. I'm kinda surprised that this works at all. I thought I had at least checked the identity of source and target.
"*.sup" "output\*.sup" /res:1080 /fps:keep /movin:2.35,24
This is wrong, because it doesn't enclose the whole parameter string in double quotes although wildcards are used.
"*.sup" "*.sup" /res:1080 /fps:keep /movin:2.35,24
This is double wrong since it combines same name/path for source and target with the wrong use of double quotes.
A correct way to do this would be:
java -jar d:\BDSup2Sub\BDSup2Sub.jar "*.sup *_exp.sup /res:1080 /fps:keep /movin:2.35,24"
Still, you must take care of course that the target file(s) can't have the same name(s) as one of the sources and thus overwrite it/them.
Using a different folder for the output is the safest solution of course, but it's not needed if you take care.
Note that double quotes around all parameters are needed if wildcards are used. Single quotes are only needed, if parameters within the double quotes use spaces. It doesn't matter if the filenames that are matched by the wildcards contain spaces or not.
Sample with spaces in parameters:
java -jar d:\BDSup2Sub\BDSup2Sub.jar "*.sup '* export.sup' /res:1080 /fps:keep /movin:2.35,24"
Kratus
5th October 2009, 06:12
Thank you for this quick and accurate answer, 0xdeadbeef.:thanks:
I must admit that this quotes-story is a little tricky.
0xdeadbeef
5th October 2009, 16:57
I must admit that this quotes-story is a little tricky.
Admittedly. Unfortunately, there's nothing I can do about this as it's a restriction of the Java launcher.
0xdeadbeef
7th October 2009, 20:00
Only a GUI update and one CLI option. Not too much testing done.
07.10.2009: 3.9.7 -> 3.9.8
Changed: reworked dialog for conversion options, added: store/reset defaults, stored defaults are automatically loaded in GUI mode
Changed: added "/res:keep" CLI switch to keep the resolution by default. Note that CLI switches overwrite GUI defaults.
Changed: appending "_exp" to the save file name is no longer done repeatedly but only once.
radius
12th October 2009, 22:56
Hi,
I needed something to extract forced subs and it's just perfect for what I needed :)
Btw could you please add an option to batch add / remove the "forced" flag ?
Thanks
0xdeadbeef
12th October 2009, 23:28
Hm, while I don't really understand why you would need this feature, I guess I could implement it. I won't have much time before the weekend though. Some hints why you need this?
radius
13th October 2009, 01:48
I'm muxing Blu-Ray stuff without menus and playing it on a PS3,
the problem is,
when using the PS3 menu for navigation / options you can't manually select a subtitle track without enabling it,
and that is what's required for a forced subtitle to show without the non forced ones,
actually to use forced subtitles I edit my Blu-Ray to select the subtitle track (but not enabling it) on the first playback,
but if I change the selected track on the PS3 then I can't go back and select the forced subtitles only (as you can't selected the track without enabling it).
now I'm using your nice tool :) to extract the forced subtitles as a new track,
it's no big deal but my request is just to say as I won't need the forced flag in any of the subtitles anymore,
it's cleaner to have no forced flags (and because I'm maniac ^^)
mrr19121970
18th October 2009, 11:03
@0xdeadbeef
Did you see Slumdog? The forced subs have the palette changed. Is this correct? See sample:
http://clownbd.com/Slumdog.jpg
http://clownbd.com/Subtitles_10_German.sup
0xdeadbeef
18th October 2009, 12:04
Did you see Slumdog? The forced subs have the palette changed. Is this correct? See sample:
http://clownbd.com/slumdog.jpg
http://clownbd.com/Subtitles_10_German.sup
The link to the picture ("http://clownbd.com/slumdog.jpg") seems to be invalid. And when I load the SUP into BDSup2Sub and choose a non-DVD destination, the result looks pretty much perfect:
http://www9.picfront.org/picture/9aSTRGpZR/thb/test.png (http://picfront.de/d/9aSTRGpZR/test.png)
So I'm a little puzzled what the problem is supposed to be.
mrr19121970
18th October 2009, 22:01
Strange http://clownbd.com/slumdog.jpg fails, but http://clownbd.com/Slumdog.jpg works.
I'm using Windows7 x64.
0xdeadbeef
18th October 2009, 22:10
Well, as I said, the colors look ok for any non-DVD mode. They look terrible for DVD modes of course but what did you expect when you convert a photo to 4 colors?
mrr19121970
19th October 2009, 22:58
OK, I changed the Output format from SUB/IDX to SUP(BD) and the colours came back. I didn't appreciate that, just saw the filesize of
3019324 bytes before and 2802220 bytes after and then opened in the GUI and assumed the palette got lost.
Ryu77
22nd October 2009, 12:10
Is there no way to tell if a subtitle stream has forced sections? I thought this tool might be able to do this as it can detect forced subtitles.
However, I am referring to subtitles that only have sections that are flagged forced, not the entire subtitle stream.
For example, an English subtitle stream that only comes on when foreign languages are spoken.
0xdeadbeef
22nd October 2009, 12:15
During the import, the last line that is printed to the console is the number of forced subtitles:
e.g.
Detected 24 forced captions.
Ryu77
22nd October 2009, 12:25
During the import, the last line that is printed to the console is the number of forced subtitles:
e.g.
Detected 24 forced captions.
Thank You! I can't believe I missed it. Now I can finally remove the guesswork and pre-screening before burning. :cool:
0xdeadbeef
25th October 2009, 17:22
I answer this here to don't mess the other thread:
2 questions regarding BDSup2Sub:
1. I've been playing with the colors a bit, but I can't seem to make it work. What I like, is change the white of the letters to a gray-er version. I have a Plasma tv, and bright white burns in very quickly.
If you load a SUB/IDX (or SUP/IFO) file, the menu item "Edit->Edit imported DVD palette" becomes enabled. If you select it, you can edit the 16 color palette. E.g. if you change white to light grey, it will also change in the (source and) target view.
2. If I select 720p (instead of Pal), the N200 mediaplayer shows the subtitles for about 5-10 secs, then the tv turns green-ish and (while you still hear the movie playing) evt returns to the main menu (thus stop playing). This could be a N200 issue though. Too bad, because 720p seems to give me sharper titles...
SUB/IDX was created with only PAL and NTSC in mind and if a player claims to support SUB/IDX, it doesn't mean that it does in higher resolutions. So yes, this is most probably an issue of the player.
BTW: I assume the video stream is in 720p, too? If not, you can't really expect this to work. You an use BDSup2Subs scaling features though to achieve a similar result. E.g. when I convert 1080p BDs to DVD, I usually slightly increase the size of the subtitles by using scaling factors of e.g. 1.2.
paulal
26th October 2009, 16:34
thx for redirecting (and the info)... I thought so much, but got excited in the process :)
- reg. colors: I did experiment with that, saw the colors change but no luck when played. I'll do some more work on this...
- 720p: bingo, logical and true: my movies are pal (or ntsc), not 720p. Sure, I'm asking too much :) I've got to stop watching those star trek movies...
pol
paulal
27th October 2009, 20:12
update on the colors !
I did some more experimenting, but no change. The N200 keeps it in white and black (if I load the subtitle in SC again, the colors have changed). So I assume that the N200 does not support colored subtitles, and substitute his own color palette.
maybe one day...
cheers,
pol
ps: I've uploaded "my experience" here: http://www.megaupload.com/?d=AXH8OITX
(if you are not happy with this or like to add your comments, 0xdeadbeef, just let me know)
Palmnut
29th October 2009, 07:45
I'm trying to use the tool to convert .sup subtitles written by ProjectX from a UK DVB-T transport stream (25 fps). The program seems to work well for the vast majority of the subs, except where it detects that the end time for a subtitle overruns the start time for the following subtitle.
As a specific example:
Frame 41 starts at 00:03:42.470 and ends at 00:03:46.884.
Frame 42 starts at 00:03:46.880 and ends at 00:03:51.101.
Frame 43 starts at 00:03:51.100 and ends at 00:03:55.503.
Frame 44 starts at 00:03:55.500 and ends at 00:03:57.388.
Now in this case I would expect the tool to simply shift the end-time of 42 to 0.001s earlier (or 43 later). What I actually get is:
Frame 41 ok, with slight tweaks after the decimal points.
The start time of Frame 42 changes to 00:03:51.080 (near-enough the original start time of Frame 43), the end time of 42 changes to 00:03:51.120 (i.e. a duration of one video frame).
The start time of Frame 43 changes to 00:03:55.480 (near-enough the original start time of Frame 44), the end time of 43 changes to 00:03:55.520 (i.e. a duration of one video frame).
WTF? This means that I don't get to see Frame 42 or 43 at all - in fact this effect seems to ripple down the entire sequence until we get a long break in the titles.
Methinks you might have two variable muddled up when you try to solve this case, as it seems that the start time of the subsequent frame is being written in as the start time of the current frame.
Peter
0xdeadbeef
29th October 2009, 10:18
The root cause of such a problem is usually not really visible by just looking at the times. This is probably a combination of several issues, e.g. missing end times and missing start times. So as always, a sample is mandatory to have a look.
Anyway, keep in mind that BDSup2Sub's main purpose is not to fix broken subtitles. For a correct conversion it needs to have consistent timing, but this is not necessarily the same as correct timing. Therefore it outputs a warning for any fix that is done and leaves it to you to do a manual check/correction.
DivxBr
4th November 2009, 15:17
Hi, I was trying to find a simple and quick tool to convert '.sup' subtitles (DVD extracted with pgcdemux) to '.sub/.idx' to mux into a mkv container. But everytime I try the bdsup2sub to load the sup file, I get an error message like this: 'Offset 1091309618 out of bounds for file 'xxxxxxxx.sup'.
Maybe its a pgcdemux problem, or I'm doing something wrong?
0xdeadbeef
4th November 2009, 18:04
If I may quote the integrated help on this:
Notes on SUP/IFO
The SUP/IFO format as defined by IfoEdit/VobEdit is supported since version 3.9.0 due to public demand. Internally (e.g. regarding RLE encoding, palette definitions etc.) it's virtually the same as SUB/IDX. Note that there are some limitations to this format though. Firstly, the palette and the screen size are stored inside an IFO file. BDSup2Sub needs a valid IFO file for each SUP file and both have to share the same file name (except the extension of course). If you e.g. exported a file "english.sup" from a "VTS_02_1.VOB" and the according IFO is "VTS_02_0.IFO", then you need to copy the IFO and rename it to "english.ifo" to make BDSup2Sub accept it as input. Note that BDSup2Sub recognizes the extension "IFO" for SUP/IFO, but not "SUP". The reason is that BDSup2Sub can differ between BD-SUP and HD-DVD-SUP during import only because both format have different packet identifiers. Unfortunately, HD-DVD-SUP and DVD-SUP use the same (outer) package structure so they can only be distinguished between during parsing of the command buffer. At this time, BDSup2Sub already decided to treat a SUP with that package header as "HD-DVD-SUP" and will throw an error. When exporting, you should be aware that there are only PAL and NTSC resolutions defined in the DVD format (and therefore in the IFO).Thus hires or cropped formats will lead to major problems, even when importing these files back in BDSup2Sub. I'd strongly suggest to use VobSub in such cases.
If you don't have an IFO, you can use more or less any IFO as dummy replacement. Note though that the palette is loaded from the IFO.
makmalimak
4th November 2009, 21:17
I cannot see Turkish characters. What should I do?
0xdeadbeef
5th November 2009, 01:23
I'm undecided if this is a very strange posting by a human or an actually nearly brilliant posting by a spambot.
Anyway, I'm left puzzled.
DivxBr
5th November 2009, 22:28
If I may quote the integrated help on this:
If you don't have an IFO, you can use more or less any IFO as dummy replacement. Note though that the palette is loaded from the IFO.
Thanks very much!
One more question: the ifo file has only one palette or there's one for each pgc or one for each subtitle? IF it has more than one, which one bdsup2sub uses?
0xdeadbeef
6th November 2009, 00:35
One more question: the ifo file has only one palette or there's one for each pgc or one for each subtitle? IF it has more than one, which one bdsup2sub uses?
Well, this was a quick hack, but as far as I remember, there's one palette per PGC and BDSup2Sub uses the palette of the very first PGC. The dummy IFOs it creates are more or less empty apart from this one palette and some video attributes for PAL/NTSC.
As a quick way to get an IFO, you can load an SUB/IDX, edit the palette as you wish and store it as SUP/IFO. Then you can use this IFO as base for further palette edits.
MadMonkey57
10th November 2009, 21:12
Hi,
I am converting idx/sub to BD sup files:
- via GUI:
--> checking "Convert resolution to 1280x720"
--> change framerate from 25fps to 23.976
--> choosing "Mitchell" filter
...and it works fine.
via CLI: /res:720 /fps:25p:24p /filter:mitchell
OPTION: set resolution to 720p (1280x720)
OPTION: convert framerate from 25fps to 23.976fps
OPTION: set scaling filter to: Mitchell
Converting SUP(BD)
Loading FR_FORCED.idx
# 1
# 2
# 3
...
# 11
Detected 0 forced captions.
Writing FR_FORCED_CMD.sup
Decoding frame 1/11 at offset 0x00000000
Decoding frame 2/11 at offset 0x00001000
...
Decoding frame 11/11 at offset 0x00009800
... and fps seem to be NOT OK, still 25fps
Am I missing anything ?
Thanks
0xdeadbeef
10th November 2009, 22:31
via CLI: /res:720 /fps:25p:24p /filter:mitchell
... and fps seem to be NOT OK, still 25fps
Am I missing anything ?
I fear you got me on this one. Indeed the source fps value given via command line is obviously overwritten later when the input stream is read. I guess I already found the problem and a solution, yet I want to fix this only after a little more investigation.
So probably no fix before the weekend.
MadMonkey57
11th November 2009, 09:56
I fear you got me on this one. Indeed the source fps value given via command line is obviously overwritten later when the input stream is read. I guess I already found the problem and a solution, yet I want to fix this only after a little more investigation.
So probably no fix before the weekend.
Looking forward to testing it.
:thanks:
0xdeadbeef
15th November 2009, 20:31
15.11.2009: 3.9.8 -> 3.9.9
Changed: added "auto" option for CLI switch "/fps:<x>,<y>", e.g. "/fps:auto,24p"
Changed: added "/forceall" CLI switch to set/clear all forced flags
Changed: reworked conversion dialog to allow setting/clearing all forced flags via GUI
Changed: added an application icon to get rid of that coffee cup (note: ICO and ICNS files are included in the JAR)
Fixed: source FPS given via CLI was overwritten by FPS read from stream
Fixed: source FPS detection for SUB/IDX and SUP/IFO was buggy and (nearly) always resulted in 24p
MadMonkey57
16th November 2009, 10:30
Thanks for this update. Especially...
15.11.2009: 3.9.8 -> 3.9.9
Fixed: source FPS given via CLI was overwritten by FPS read from stream
..is working fine now.
:thanks::thanks::thanks:
avivahl
16th November 2009, 11:26
1st run (no ini file in dir), Settings->Conversion Settings->Nothing happens. Do I need to open a subtitle first? Bug?
0xdeadbeef
16th November 2009, 12:38
Hm, the dialog should open without a stream loaded. If it doesn't show without an ini file, this might indeed be caused by a missing INI file. Did you try that from the command line to see exceptions thrown? I'll have a look at it this evening.
Then again it's discussible whether this behavior makes sense or not. After all there's nothing to convert yet and after loading a stream, the conversion dialog will be shown anyway. Indeed I already thought about disabling the dialog before a stream is loaded.
So if this is a bug, it's pretty unimportant one and I'll only fix it with the next release but won't create a release just for this.
[EDIT]
OK, definitely a reference to uninitialized object. However since it happens in the (initialization of the) dialog, the exception is lost somewhere in the Swing jungle. As a side note, the existence of the ini file is not the factor that avoids the access to the object, but the setting of the "convertResolution" entry in the ini. If the entry is true, then the object is not accessed and the dialog is shown. If it is false (which is also the default setting when there's no ini or the entry is missing in the ini), the object is accessed, the exception is thrown and the dialog is not shown.
Anyway, it's already fixed locally, so it will be corrected in 4.0.0 but when this version is released is another question.
avivahl
17th November 2009, 19:24
Alright then. Thx.
Any planned "big features" for 4.0? :)
0xdeadbeef
17th November 2009, 19:38
Not at all. My "not so well thought out" version numbering now forces me to call the next version 4.0.0 for whatever reason I need to update.
However, currently there are only two minor bugs to fix and to call that 4.0.0 is a little too pathetic even by my standards.
Sharc
8th December 2009, 00:28
Problem with subtitles positioning (using the GUI):
- Extracting subtitles from DVD
- Converting to 720p SUP (BD)
=> Works ok so far.
However when I continue
- Move all captions => 'move inside bounds' => Move all
- Save/Export
the subsequent subtitles are all moved to the top left corner of the active picture instead of center bottom.
Do I miss something?
0xdeadbeef
8th December 2009, 01:10
Hm, can't seem to follow you here. Tried loading a PAL SUB/IDX, scaled it up to 720p, moved inside bounds, saved it -> Everything looks fine. Now it gets a little vague ... what does "subsequent" mean exactly here? I tried to "move all" repeatedly, I loaded the same SUB/IDX or PAL SUP/IFO, then moved it and so on. Whatever I tried, everything looked ok.
So, sorry, can't reproduce this. Either this is an issue with your subtitle (then I need it) or the instructions to reproduce the issue are not detailed enough (then I need more detailed instructions) or I'm just too stupid to understand this problem (then I might need some sleep).
At a 2nd thought, I could imagine a scenario were the extracted subtitles are all full screen either due to bad authoring or a bad extraction tool. Maybe cropping, scaling and moving at the same time is a scenario I haven't really tested. I'd need the subs then.
0xdeadbeef
8th December 2009, 20:26
Update: in the meantime I found a SUB/IDX with too large bitmaps that are cropped to the visible part by BDSup2Sub. With this stream I could reproduce the problem. Indeed there are two issues:
1) When applying the "move all" command to a stream with subtitles that are cropped due to oversized images, all subtitles are misplaced that were not (decoded and) shown before.
2) The "move all" setting partly survives loading another subtitle (indeed it should, but not this way). So when loading such a problematic stream with oversized images after "move all" was used, all cropped subtitles but the very first (which is automatically decoded and displayed) are misplaced without even using "move all" again.
Though I haven't actually found the bug (or even started looking for it), I'm pretty sure where to look. Unfortunately this is the most unpleasant part of the whole code, so fixing it will be probably slightly annoying. Then again, this will be fixed in the 4.0.0 release of course. Dunno if I'll manage to do it this weekend though, but I'll try.
Until then I can provide a temporary workaround: load the problematic stream into a freshly started instance of BDSup2Sub, then save it and load the saved stream. Moving should work ok now. Note that cropping itself works fine and when you save the stream before applying the move command, the cropped subtitles are saved with correct positions. Now if you load this fixed stream, the problem doesn't occur any more.
Sharc
8th December 2009, 20:29
Thanks for your reply and efforts to reproducing the case. I was probably a bit vague with my description because I assumed the problem would be easy to reproduce - which is apparently not the case.
The DVD subs are extracted with VSrip.
By 'subsequent' I mean:
The current subtitle which is displayed in the GUI is correctly moved to within the bounds. So it looks as as expected. When I however step through the next subtitle(s), they are moved to the top left corner.
When I Save / Export the 720p sups and reload the saved file again in BDSub2Sup, they are all top left aligned.
I am not sure if it happens in all cases, but I had this at least with 2 or 3 discs. I try to find a sample. It's really a minor issue though of a very nice tool.
Added: ... while I typed.... you were faster. Thanks
Added 2: The workaround helps. No rush to fix the issue.
0xdeadbeef
14th December 2009, 23:40
14.12.2009: 3.9.9 -> 4.0.0
Changed: BDSup2Sub is now open source (see integrated HTML help for details about repository and license)
Changed: reworked built-in HTML help.
Changed: added "recent files" menu.
Changed: output format is now persistent. Changed order of output formats in listbox.
Changed: added option "apply move settings" to conversion dialog that let's you choose whether to apply the existing "move all" settings or not when a new stream is loaded.
Changed: "move all" decodes/scales each frame before moving. Added a progress bar since this takes a little longer now.
Changed: added tooptip for the links in the HTML help. Also anchors inside the document are now supported.
Changed: added chapter entries in context menu of built-in HTML help.
Changed: built-in HTML help can now be opened in external browser (via context menu). "copy" only enabled if text selected.
Changed: the cancel button in the conversion dialog now cancels loading a stream.
Fixed: moving subtitles that are cropped during import could result in erratic subtitle positions or inappropriate warnings.
Fixed: conversion settings dialog didn't open when no subtitle was loaded and INI file was missing or the item convertResolution in the INI was either missing or set to false.
Fixed: erasing the extension in the file browser of the export dialog could lead to erratic behavior if the path contained dots. Generally, path separators were ignored when stripping the extension from file names.
Jaja1
15th December 2009, 11:33
Thanks a lot, Oxdeadbeef. I use BDSup2Sub very often and it works great.
Sharc
15th December 2009, 22:13
Fixed: moving subtitles that are cropped during import could result in erratic subtitle positions or inappropriate warnings.
:thanks:
hubblec4
15th December 2009, 23:18
You are the best one.
Thanks alot
avivahl
17th December 2009, 06:35
Time to thank you again for all the wonderful work. You've created a wonderful tool.
0xdeadbeef
17th December 2009, 10:29
Four thanks in a row without a single "but". Feels like Xmas ;)
Kratus
17th December 2009, 20:39
:thanks:And I want to thank too.
(without a but!)
Paddy97
19th December 2009, 18:23
This is a life saver. Recording with DVB-S subtitles I demux them and then run them through your gem of a tool to create "proper" SUP files that Suprip can read to OCR.
This is the first and only tool I've been able to correctly read and export DVB-S subtitles.
Thanks! Great job!
radius
24th December 2009, 02:08
Hey,
just updated from 3.9.6, thanks for adding the set / clear forced flag :)
Keep up the good work :)
0xdeadbeef
24th December 2009, 13:34
You're welcome!
Anyway, I'll be away for a few days and will have only limited internet access.
So Merry Xmas to all of you!
24673583
25th December 2009, 09:17
can`t open this web page in this time..
please check url !
thanks!
avivahl
25th December 2009, 18:03
can`t open this web page in this time..
please check url !
thanks!Both the javaforge project page and the download link are working fine here.
medp7060
6th January 2010, 04:00
I tested Current version: 4.0.0 (14.12.2009):
1. When open a SUP file ("test.sup"), it failed. If via "test.sup.IFO", it aksed "test.sup.SUP"). ProjectX created these two files: "test.sup.IFO" and "test.sup", , i.e. I have to rename "test.sup" as "test.sup.SUP". Is this a bug, or I did sth wrong?
2. Is there a way to use a single clour scheme for all the subtitles? In this case 3 subtitles are not readable at all, no matter how I adjusted the thresholds.
Samples included:
http://rapidshare.com/files/330992836/test.sup.rar
0xdeadbeef
6th January 2010, 19:29
1. When open a SUP file ("test.sup"), it failed. If via "test.sup.IFO", it aksed "test.sup.SUP"). ProjectX created these two files: "test.sup.IFO" and "test.sup", , i.e. I have to rename "test.sup" as "test.sup.SUP". Is this a bug, or I did sth wrong?
Of course both files have to use the same name. Only the extension must differ (e.g. "test.sup" and "test.ifo").
The reason why you need to load the IFO is described in the help file:
http://bdsup2sub.javaforge.com/help.htm#Notes_on_SUPIFO
2. Is there a way to use a single clour scheme for all the subtitles? In this case 3 subtitles are not readable at all, no matter how I adjusted the thresholds.
You can keep the original colors by using the palette mode "keep existing" as described here:
http://bdsup2sub.javaforge.com/help.htm#Palette_Modes
Also, you can use the same frame palette for all frames as described here:
http://bdsup2sub.javaforge.com/help.htm#Editing_the_Frame_Palette_and_Alpha
medp7060
7th January 2010, 23:08
Thanks for your reply.
But how can I make lines 21 and 22 in the example visible? I tried many combinations setting, still failed.
0xdeadbeef
8th January 2010, 01:13
While think I already answered (http://bdsup2sub.javaforge.com/help.htm#Editing_the_Frame_Palette_and_Alpha)this:
The quick and dirty solution would be to select "Edit DVD frame palette" for the first line, then click "Set All". While this works here, this is not guaranteed to work for any other sample. Keep in mind that the same color might be represented by a different color index in a different frame.
The other option would be to edit only the DVD frame palette for line 21 and 22. E.g. set all 4 colors to different colors and all alphas to 15. Then you can easily identify which color/alpha index represents which pixels and change it to a more fitting setting.
REDtoLINE
8th January 2010, 01:20
Does anyone have the Blu-ray PGS (.sup) english subtitles for Iron man? Either the entire english subtitles or forced only would be fine. If you have it please let me know. Thanks.
y168
11th January 2010, 17:42
Hi,
When I used multiAVCHD to convert VIDEO_TS folder to AVCHD folder, the subtitles are often not converted. I have tracked down the problem which is related to BDSup2Sub. I am hoping that you can help me determine what's wrong.
In multiAVCHD, the subtitles of the VIDEO_TS folder are extracted using mencoder. The syntax is something like:
mencoder.exe dvd://1 -dvd-device "Z:\DVD\VIDEO_TS" -vobsubout "dvddump002" -sid 0 -nosound -o "dvddump.tmp" -ovc frameno
The error often occurs when BDSup2Sub loads the extracted subtitles. The error messages I got when I loaded the subtitles manually are:
===================================================
WARNING: Control buffer size inconsistent.
WARNING: RLE buffer size inconsistent.
WARNING: Invalid end sequence offset -> no end time
WARNING: Invisible caption due to zero alpha (not fixed due to user setting).
# 674
ERROR: Invalid control buffer size
===================================================
Do you know how to fix this problem? I have uploaded some subtitles here that you can use to debug.
http://www.mediafire.com/?yggdecmuimj
Thanks for you help.
0xdeadbeef
11th January 2010, 23:07
Hard to tell for me if the problems in this stream are caused by an extraction tool or by the original stream. Anyway, the posted stream is defective and the error message given by BDSup2Sub is correct.
There are two captions with completely invalid packet size and wrong control offset. I fixed both manually to see if there are more problems.
Unfortunately, there are. Indeed exactly 10 subtitles are also damaged, but I didn't have the motivation to investigate any further. By commenting out these 10 lines in the IDX, the SUB/IDX becomes fully readable (well, the 10 lines are missing of course):
http://www.sendspace.com/file/eaw8jy
sneaker_ger
12th January 2010, 15:35
Are there any plans on supporting split subtitles produced by avs2bdnxml in an attempt to prevent the buffer from overflowing? I tried a conversion and tested the result with the suptitle plugin but it seems that BDSup2Sub only outputs one bitmap per frame.
0xdeadbeef
12th January 2010, 20:29
I still think that this so called "buffer overflow" is a misconception based on an implementation bug in the PS3's PGS decoder.
The only real constraint is bandwidth and splitting images reduces the bandwidth only slightly due to the run length encoding used to compress the bitmap. You could probably even construct cases where the overhead due to the 2nd object increases the bandwidth.
So in a nutshell: it is very unlikely that I will add such a workaround for bugs in some players.
sneaker_ger
12th January 2010, 20:54
Didn't know the subtitles were compressed, but it doesn't really matter if the PS3 is bugged or not since the authoring softwares already throw error messages because of the excessive bandwidth usage exceeding the bitrate limits of Blu-Ray.
And it's not that you have to create a workaround - this is already implemented in avs2bdnxml - it's just that BDSup2Sub doesn't read the files correctly.
But I have to admit that I don't have any knowledge about how the buffer is calculated so I don't know if ps auxw's attempts to reduce overflows by splitting and cropping subtitles (for example a line shown on the top and a line on the buttom will produce one very large bitmap while with the splitting the 2 bitmaps will be very small) are futile or not.
y168
13th January 2010, 19:13
Hard to tell for me if the problems in this stream are caused by an extraction tool or by the original stream. Anyway, the posted stream is defective and the error message given by BDSup2Sub is correct.
There are two captions with completely invalid packet size and wrong control offset. I fixed both manually to see if there are more problems.
Unfortunately, there are. Indeed exactly 10 subtitles are also damaged, but I didn't have the motivation to investigate any further. By commenting out these 10 lines in the IDX, the SUB/IDX becomes fully readable (well, the 10 lines are missing of course):
http://www.sendspace.com/file/eaw8jy
Thanks! I am wondering if it's possible to modify the codes so that those bogus lines are ignored. I do not mind if I miss 10 lines out of 2000, but now the program just stops and no subtitles are converted at all. If you can program to ignore the errors and just process the good ones, that would be wonderful.
0xdeadbeef
14th January 2010, 00:51
Thanks! I am wondering if it's possible to modify the codes so that those bogus lines are ignored. I do not mind if I miss 10 lines of out 2000, but now the program just stops and no subtitles are converted at all. If you can program to ignore the errors and just process the good ones, that would be wonderful.
Yep, I guess this should be possible in most cases. Consider it considered.
avivahl
14th January 2010, 12:13
Regarding the source code...
ToolBox:
public static String trim(final String s) - why not use String.trim()?
public static int getInt(final String s) - why not use Integer.parseInt()?
public static double getDouble(final String s) - why not use Double.parseDouble()?
avivahl
14th January 2010, 12:15
btw, would you consider accepting an SRT import patch?
If I'll make one, I'll make sure to:
1. Allow different fonts to be used.
2. Properly document everything.
3. Allow font aliasing (using Graphics2D's capabilities).
4. Use/implement your interfaces. (not doing ugly hacks)
EDIT: Another question... do you use eclipse?
Also, why call the directory bin_copy instead of simply "bin"?
0xdeadbeef
14th January 2010, 17:59
Dunno if discussing coding issues here is such a good idea since this is supposed to be mainly a support thread for users. Maybe we should discuss detail via PM. Anyway, this time I'll answer here:
About trim/parseInt
The ToolBox parse functions mainly catch the NumberFormatException and return a -1 instead. The trim function could most probably be replaced by String.trim() though. Can't really remember or explain why I did it this way ;)
Regarding SRT:
Well, if this doesn't involve a major increase of the JAR size or the integration of code parts with restrictive licensing, I have no problem to include your code. Indeed I though about it once, but then decided that it would be better to go for SSA/ASS instead, saw that this would be major work and dropped the idea again.
About Eclipse:
Yes, I'm using Eclipse. The problem with using "bin" is that Eclipse deletes this folder during a "clean". I tried to put the files in a "bin" folder in Subversion anyway, but this didn't seem like a feasible approach. So I decided for "bin_copy" to make clear that these files have to be copied to "bin" after a "clean".
rernst
20th January 2010, 04:52
Hi,
I wrote a Java frontend for mencoder for / mp4 box / mkvtoolnix (I really needed something that worked across platforms and was not Avisynth based). I am in the middle of adding Bluray support and while I am otherwise driving external code I see that you wrote this thing in Java to start with. I want to simply multiplex the subtitles in the end into the Matroska container (i.e. a trivial minor subset of what you do). Would you mind sharing the source code or at least the part that deals with the SUP->SUB/IDX conversion?
My stuff is open source/
sneaker_ger
20th January 2010, 07:10
The source is available under Apache License 2.0. Read the help for info on getting it.
0xdeadbeef
20th January 2010, 12:18
You can either decide to use the sources directly or use the JAR as a library. The latter way is already used by a few applications. Also the JavaDoc for the public interfaces is already included in the JAR. I can give you an example how this works later today if you wish.
0xdeadbeef
20th January 2010, 18:57
Ok, as promised, here is an example of how to use the JAR as library. It's the complete Eclipse project which should also display online JavaDoc for the public interfaces in the Jar.
http://www.sendspace.com/file/8lvcsa
Well, indeed it's just the main class used for CLI handling which uses the JAR instead of including all the source code. Still it should suffice as example as it shows the handling of all relevant cases (that can be used via CLI).
rernst
21st January 2010, 02:17
Just pulled it down and had a quick look at it. The jar file will work just fine - all the functionality I need is there without having to modify the source that actually manipulates the streams.
Thanks again,
Vielen Dank ...
0xdeadbeef
21st January 2010, 19:36
No sweat...
gonzus
27th January 2010, 05:40
I am using BDSup2Sub to convert SUP subtitles (from a BluRay disk) into SUB subtitles, so that I can merge them into an MKV containing the transcoded BluRay movie. Thanks for the great tool!
One quick question (and apologies if it is a stupid one): I noticed you can generate a PGCEdit palette file when creating the SUP subtitle. Is this of any use for an MKV file? I use mkvmerge to add the SUP subtitle to my MKV, and did not find any place to specify a palette. Any hints?
Thanks again and best regards.
0xdeadbeef
27th January 2010, 12:28
The PGCEdit palette file really makes only sense if you export to SUP/IFO and want to load the SUP (which doesn't contain the palette) in PGCEdit.
mrbass
2nd February 2010, 04:34
I am using BDSup2Sub to convert SUP subtitles (from a BluRay disk) into SUB subtitles, so that I can merge them into an MKV containing the transcoded BluRay movie. Thanks for the great tool! Subs in mkv work great on wdtv live.
Same here finally Mac users have 100% solution for bluray to mkv to 264 with subs (still forced subs detection is an issue though with makemkv). Now that we can extract them from the ripped mkv with mkvextract included with mkvtoolnix. Thanks 0xdeadbeef for awesome cross-platform subtitle tool.
http://membo.org/i/b1/macsubsextract.png
0xdeadbeef
2nd February 2010, 18:31
It's nice to hear it works well on the Mac. The JRE implementation on the Mac was always a bit behind the ones supported by Sun directly but it seems to have caught up.
While we're at it: does anybody actually use BDSup2Sub under Linux or Solaris?
laserfan
2nd February 2010, 23:35
Is there any way to keep the "conversion options" dialog pop-up from appearing every time I open a .sup?
0xdeadbeef
3rd February 2010, 01:16
Nope.
TheSane
12th February 2010, 11:08
Is there a chance that you comment the problems on the Popcorn Hour models with the BDSup2Sup output?
Here is a discussion about this: http://www.networkedmediatank.com/showthread.php?tid=35241
Thanks.
0xdeadbeef
12th February 2010, 12:25
How could I comment on the SUB/IDX implementation of the PCH side? Probably they just don't support hires SUB/IDX.
The hires modes for SUB/IDX are of course not supported by each application/medialayer that supports SUB/IDX, as this format stems from DVD, so this is a "do at your own risk and be happy if it works" feature.
However, there's nothing that I could do to fix the implementation in other software.
TheSane
12th February 2010, 12:44
Okay thanks, im don't have deeper knowledge in the specification. Your app is still the best to create sups (from my point of view), so i think it is understandable to have it working. :)
hubblec4
13th February 2010, 17:38
Hires sub/idx works perfect with the VSfilter.dll and MediaPlayerClassic.
jelockwood
4th March 2010, 00:29
Thanks for a great tool, even if it might not (yet) do exactly what I want :)
I would like to be able to extract subtitles from a standard VIDEO_TS folder, that is a DVD. As such it does not contain a sup file. Is there anyway to do this with 4.0.0, if not could this possibly be added to a future version?
I can do this with Windows utilities, but I am trying to find a Mac solution and BDSup2Sub does run fine under Mac OS X.
While we making a wish list :) how about also providing the ability to extract subtitles from a standalone VOB file (not part of a VIDEO_TS), or an MPEG2 or H.264 file. The later might contain DVB (Digital Video Broadcasting) subtitles which are very similar to DVD subtitles. ProjectX for example can extract DVB subtitles but does not make it easy to convert to a more useful IDX/SUB format.
Edit - It seems BDSub2Sup only works with a single subtitle stream (the first) in an IDX/SUB pair of files. It says -
WARNING: Language id en(index:1) inactive -> ignored
WARNING: Language id es(index:2) inactive -> ignored
Is there anyway to get it to work with multiple streams and/or select which one to process?
An example set of files can be downloaded from http://homepage.mac.com/jelockwood/.Private/examplesubs.zip
0xdeadbeef
4th March 2010, 00:44
BDSup2Sub is a subtitle conversion tool, not a demuxer or muxer. Honestly, I don't see any chance that this will ever change.
jelockwood
4th March 2010, 22:01
BDSup2Sub is a subtitle conversion tool, not a demuxer or muxer. Honestly, I don't see any chance that this will ever change.
I (sadly) suspected this would be the case. Unfortunately TSMuxer also does not seem to support demuxing subtitles either.
PS. My second issue regarding BDSup2Sub not seemingly supporting additional languages in IDX/SUB files (which it does support) would still seem valid and need addressing.
laserfan
15th March 2010, 17:21
It's not clear to me what aspect ratio the blue background represents when an individual frame is displayed (the frame where you change position, times, flags). Indeed the frame itself appears wider than 1.77...?
I would like to be able to change the blue background, i.e. to 1.85 AR or 2.40 or 2.20 so I know how to position my subs. Is that possible?
0xdeadbeef
15th March 2010, 18:26
It's not clear to me what aspect ratio the blue background represents when an individual frame is displayed (the frame where you change position, times, flags). Indeed the frame itself appears wider than 1.77...?
I would like to be able to change the blue background, i.e. to 1.85 AR or 2.40 or 2.20 so I know how to position my subs. Is that possible?
The blue area represents the visible area as defined in the "move all" dialog's "Aspect ratio" setting. The default setting is cinemascope 21:9 (2.333:1). If you change the value there, the blue area (or the black bars - depends on how you look at it) also change in the preview panels. This even works if you don't move anything at all by pressing "Cancel" or selecting "keep X/Y position" and pressing "Move all".
laserfan
15th March 2010, 19:44
Wonderful! I had not found that dialog yet. Just what I was looking for; thanks for your help! :)
mts1
19th March 2010, 03:59
Hi.
I'm trying to use this program and it works more or less as expected :)
However, there are some areas where I either don't understand the logic or there is some problem with image conversion.
For example, I convert my subtitles to sub/idx format. The standard white text with the black shadow stays as is without any problems, but the same white text on the big black opaque rectangle becomes green on black.
Any ideas?
Thanks
0xdeadbeef
19th March 2010, 19:34
Any ideas?Thanks
Read the integrated help?
mts1
19th March 2010, 20:42
Read the integrated help?
Hmm, interesting idea.
Any particular section or just entire help?
nurbs
19th March 2010, 22:05
Hmm, interesting idea.
Any particular section or just entire help?
"Color Palettes" probably.
laserfan
19th March 2010, 22:41
Hmm, interesting idea.
Any particular section or just entire help?It might help to copy/paste the contents of the Help window into something like notepad so you can search it. Only thing worse than an un-searchable Help file is no Help file at all! ;)
mts1
19th March 2010, 23:37
Thanks guys.
I know what is the "Color Palettes". But it doubt there will be some explanation in the help why one frame is white on black and the next one is green on black. Is it just because there are too much black?
0xdeadbeef
22nd March 2010, 12:42
It might help to copy/paste the contents of the Help window into something like notepad so you can search it. Only thing worse than an un-searchable Help file is no Help file at all! ;)
There is a built-in option in the context menu (right mouse ear) to open the help with the system browser. This seems more convenient than notepad.
laserfan
22nd March 2010, 15:56
There is a built-in option in the context menu (right mouse ear) to open the help with the system browser. This seems more convenient than notepad.Hmm I thought I tried that (right-clicking) but I'll look again. :)
BTW I wanted to re-work a subtitle track recently where I had made first an .srt, then a .sup file using EasySup from deank, and finally imported to BDSup2Sub to set a couple hundred (!) "Forced" flags. It was no fun mouse-clicking the "Forced" box and then tracking-up to the "Save and advance" button at the top of the window, then down to the checkbox time & again.
I realized 200+ forced subs is an unusually high number but wondered if you'd encountered anything like it yourself as it might inspire you to move the arrows down closer to where the checkbox is. Or maybe there is an easier way to do this that I don't know about... :o
0xdeadbeef
22nd March 2010, 20:05
Hmm I thought I tried that (right-clicking) but I'll look again. :)
It's the very first option in the context menu. Should usually work. Then again, it's a feature of the Java runtime which asks the System to open the file with the default system browser. There are obviously some circumstances where it doesn't work but I guess there's nothing I could do about it.
If everything fails, you can also access the help from the Javaforge archive (http://bdsup2sub.javaforge.com/help.htm).
BTW I wanted to re-work a subtitle track recently where I had made first an .srt, then a .sup file using EasySup from deank, and finally imported to BDSup2Sub to set a couple hundred (!) "Forced" flags. It was no fun mouse-clicking the "Forced" box and then tracking-up to the "Save and advance" button at the top of the window, then down to the checkbox time & again.
I realized 200+ forced subs is an unusually high number but wondered if you'd encountered anything like it yourself as it might inspire you to move the arrows down closer to where the checkbox is. Or maybe there is an easier way to do this that I don't know about... :o
While I admire your endurance, reading the online help could have saved you some time. See chapter Conversion Dialog (http://bdsup2sub.javaforge.com/help.htm#Conversion_Dialog), under "Global forced flags".
laserfan
22nd March 2010, 21:04
While I admire your endurance, reading the online help could have saved you some time. See chapter Conversion Dialog (http://bdsup2sub.javaforge.com/help.htm#Conversion_Dialog), under "Global forced flags".
You mean this?
Global forced flags
The listbox "Force All" let's you choose whether to keep the imported forced flags or to set/clear the flags of all subtitles in the output stream.
But there were no "imported forced flags" in my .sup file--that's why I was using BDSup2Sub in the first place, to be able to set those flags, which were lost when I created the .sup from the .srt file. :confused:
Maybe I wasn't clear: the couple hundred subs I needed to "Force flag" on were dispersed among a total of >1400 total subtitles.
0xdeadbeef
22nd March 2010, 23:41
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
laserfan
23rd March 2010, 14:57
...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.
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. :)
dfordham
25th March 2010, 05:07
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?
0xdeadbeef
25th March 2010, 18:20
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:
java -jar e:\src\java\BDSup2Sub\BDSup2Sub.jar "german test 3.sup" "test 3.sub" /forced
->
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.
dfordham
25th March 2010, 22:50
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!
0xdeadbeef
25th March 2010, 23:05
Oh well, it was late and I'm old. That's a bad combination.
Sounds familiar ;)
No sweat...
Inspector.Gadget
28th March 2010, 18:09
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? :cool:
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.
0xdeadbeef
28th March 2010, 18:48
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? :cool:
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.
Inspector.Gadget
28th March 2010, 18:52
Sure, will send ASAP. Is the SUP demuxed with eac3to sufficient or do you need anything else from the disc? Thanks.
layman66
1st April 2010, 13:05
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.
0xdeadbeef
2nd April 2010, 09:54
Well, in a nutshell you describe the problem of descenders (http://en.wikipedia.org/wiki/Descender) 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 (http://en.wikipedia.org/wiki/Ascender_%28typography%29).
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.
mrr19121970
12th April 2010, 12:51
@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.
sporic
13th April 2010, 07:30
Can BDSup2Sub do these things:
1) Delete a particular frame?
2) Move are particular frame? For example Frame #100 to position #5?
Thanks.
mrr19121970
13th April 2010, 08:36
@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
<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>
0xdeadbeef
13th April 2010, 16:56
Can BDSup2Sub do these things:
1) Delete a particular frame?
Yes, in the Edit dialog (http://bdsup2sub.javaforge.com/help.htm#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.
2) Move are particular frame? For example Frame #100 to position #5?
Not directly. You could however export to XML/PNG (http://bdsup2sub.javaforge.com/help.htm#Formats) and then move one "Event" block to another location (and edit the time). The result can then be imported in BDSup2Sub again.
sporic
15th April 2010, 14:53
What XML editor do use? using wordpad doesn't cut it. somehow cutting and pasting using Wordpad doesn't save formatting. Any recommendations?
0xdeadbeef
15th April 2010, 17:30
I used XML Notepad (http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en) 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 (http://www.pnotepad.org/) or Notepad++ (http://notepad-plus.sourceforge.net).
If you can live without the syntax highlighting, also Notepad should do.
layman66
21st April 2010, 11:57
@ 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!
MikeEby
25th April 2010, 00:56
:thanks: to 0xdeadbeef, Your app does a great job on Avatar.
http://www.acdnow.com/anothereac3togui/AvatarForcedSub.jpg
Mike
d4eRc
25th April 2010, 21:23
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?
0xdeadbeef
25th April 2010, 23:03
Dunno what Mike used there but obviously not a DVD format (SUP/IFO or SUB/IDX) as the subtitles definitely use more than 4 colors. Strange screen size and format btw. (900x491, which is something like 16.5/9).
When converting to DVD formats, chances are that a light yellow is converted to white. You can influence this by editing the default DVD palette (http://bdsup2sub.javaforge.com/help.htm#Editing_the_default_DVD_palette_for) and editing the light yellow ("Color 4 light") to a lighter one.
For MKVs, SUB/IDX should be the most compatible bitmap subtitle format - yet several players don't support it either or at least not in higher resolutions. Guess the most widespread format in MKVs is still text based SRT.
Killroy™
25th April 2010, 23:37
Those are the PGS subs from the Blu-ray converted to idx/sub and more than likely played back on MPC-HC since that is how they look to me too.
0xdeadbeef
26th April 2010, 00:04
If so, they're somehow processed by the player as there are dozens of colors in the subs. Even the main yellow color has a slight gradient. There's obviously alpha blending involved, but even this doesn't explain all the shaded colors.
Killroy™
26th April 2010, 00:12
These are the first subs that I have seen from a Blu-ray that looked that good and stylized. I was surprised when I first saw them. I have seen other PGS subs have effects before but none had them like these.
MikeEby
26th April 2010, 04:28
Those are the PGS subs from the Blu-ray converted to idx/sub and more than likely played back on MPC-HC since that is how they look to me too.
Yep...I just use bdSup2Sub...and Played on MPC-HC. I did use the command line options with the eac3to GUI I wrote, I was very empressed myself. :) They looked damn nice! I did crop a little out of the image. The screen grab had the mpc-hc status bar across the bottom, that's why the weird aspect ratio.
Mike
mrr19121970
28th April 2010, 09:21
@ 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!
Yes, you're right. You need to preview 1st, and then the slider position is taken into account. I changed this. Please download the version here
http://forum.slysoft.com/showpost.php?p=212826&postcount=1
until I have chance to upload it on the FTP server.
radius
30th April 2010, 22:41
Hi,
I'd like to modify sub colors for a BR from yellow text to white ...
I extracted the subs as XML / PNG but I can't edit 'em directly in photoshop because it does not handle the PNG8 indexed transparency or something :/,
Could someone tell if there's a possibility to do that ?
Thanks
0xdeadbeef
30th April 2010, 23:51
Paint.NET (http://www.getpaint.net/) handles the PNGs correctly and is for free. Should be also able to export a format that PaintShop can handle. When re-importing, BDSUp2Sub should also accept full color PNGs or even other standard formats like GIF or JPEG. Formats that don't use a palette will be automatically converted to a 255 color palette during import.
radius
1st May 2010, 03:38
Paint.NET (http://www.getpaint.net/) handles the PNGs correctly and is for free. Should be also able to export a format that PaintShop can handle. When re-importing, BDSUp2Sub should also accept full color PNGs or even other standard formats like GIF or JPEG. Formats that don't use a palette will be automatically converted to a 255 color palette during import.
Thanks, I'll have a look :)
Laurent
8th May 2010, 12:06
Hi.
Happy to be finally able to post on the forum. 6 days to wait, it was very long.
As my first post, I would like to say "bravo" to 0xdeadbeef for his great soft BDSupToSub.
I don't know whether it is me who does something wrong or whether it is a bug but I have a problem with the CLI mode. I use the following parameters "/fps:24p /scale:1.3,1.3 /filter:mitchell /movout:2.333,10". Scaling is not done. Moving of the subtitles is correctly done. I tried with different filters but no change. At the beginning of the traces, I can see that all the CLI parameters seem to be correctly handled.
Of course, scaling is working with GUI.
The "/scale" parameter seems to be never mentionned in this topic. I just find its existence in the software help page.
0xdeadbeef, any idea ?
Laurent
8th May 2010, 12:20
I have another question for mrr19121970 this time about another great soft Clown_BD. I hope it is not too much off topic but I have not found a thread dedicated to Clown_BD on the forum.
In batch mode, the call to BDSupToSub is done by this command line:
"%PathToCBD%" "Prepare_BDSup2Sub" "%PathToJAVA%" "%PathToDMX%" "_exp" "" ""
I discovered that I can use the last "" to pass parameters to BDSupToSub. Good. Would it be possible to put these parameters somewhere in the ini file for example ? That would be just to not have to edit the bat file each time in order to add these BDSupToSub parameters.
0xdeadbeef
9th May 2010, 15:30
I don't know whether it is me who does something wrong or whether it is a bug but I have a problem with the CLI mode. I use the following parameters "/fps:24p /scale:1.3,1.3 /filter:mitchell /movout:2.333,10". Scaling is not done. Moving of the subtitles is correctly done. I tried with different filters but no change. At the beginning of the traces, I can see that all the CLI parameters seem to be correctly handled.
That's a bug as it looks. Indeed it's possible to preset the scale that is used in the GUI from the CLI, but the scaling itself is not activated (any more). Thus on the command line, no free scaling is done.
I'm pretty sure this worked at some time, but I messed it with a GUI/persistence change later on. Will be fixed in the next release. Then again, my real life job keeps me pretty busy currently, so I can't promise anything.
radius
13th May 2010, 22:47
Hi,
dunno if it's on purpose but when exporting with "export only forced" subs in xml/png format, the xml files still contains all the entries while only the forced pictures are created
0xdeadbeef
13th May 2010, 23:34
Hm, sounds like another bug. I'm too tired now to have a look, but maybe I'll find some time next weekend.
AnryV
16th May 2010, 10:15
Open .xml
http://thumbnails16.imagebam.com/8074/c771c280737023.gif (http://www.imagebam.com/image/c771c280737023/)
???
0xdeadbeef
16th May 2010, 10:27
To quote myself again:
To report problems with a subtitle stream, please either post the zipped stream (if it is compliant with the forum rules) or upload it to a "one click hoster" and send me a PM with the link.
rack04
17th May 2010, 13:33
Is there a way to resize to custom resolutions? I want to resize the forced subtitles from Avatar to 640x360 for playback on my iPhone.
0xdeadbeef
17th May 2010, 18:20
Nope (for a couple of reasons).
What format do you intend to use anyway? Is there a player on the iPhone that actually supports a standard format like SUP/IFO? I would have assumed that it's some proprietary Apple stuff as usual.
rack04
17th May 2010, 19:04
Nope (for a couple of reasons).
What format do you intend to use anyway? Is there a player on the iPhone that actually supports a standard format like SUP/IFO? I would have assumed that it's some proprietary Apple stuff as usual.
I was going to burn in the subtitles using vsfilter.
Killroy™
18th May 2010, 17:32
I'm trying to take the blu ray subtitle source file from Avatar and include only the forced subtitles. I'm totally new at this and I've been sent here from the guys at HDConverttoX.
Is there an easy way to go through the subtitles and remove the non-forced ones and keep only the forced ones?
Save/Export---> check "Keep Forced Subs only". Done.
lotrmith
18th May 2010, 17:41
Save/Export---> check "Keep Forced Subs only". Done.
Damn that was easy. Thanks!
@0xdeadbeef:
Thanks for the REALLY good work. The tool is more powerful and had a much better stability than professional tools ... nice you share it in such a way.
One feature-request:
Often you have two subtitles from one language, one with normal captions an one with only forced captions.
My question is now: Is it possible to merge them ?
Mostly you have titles with combined normal and forced captions, my goal is to get such a combined file created from those two seperated files, but holding the forced-flag.
Regards
0xdeadbeef
19th May 2010, 22:19
My question is now: Is it possible to merge them ?
Mostly you have titles with combined normal and forced captions, my goal is to get such a combined file created from those two seperated files, but holding the forced-flag.
Well, BDSup2Sub is meant as conversion tool with some limited editing capabilities, not as full featured editor where you can add, move or merge subtitles. Honestly I don't think that I want to go in that direction. Also, if both subtitles are exported to XML/PNG, it should be pretty easy to merge the XML files or copy the forced flags via script.
showergel
22nd May 2010, 06:33
I'm curious if there is a way to specify an arbitrary output resolution - for example a number of videos I encode for iPhone/Pre are 480x320 (or some derivative of 480x"y"). Is this possible?
Trav
Majin3
2nd June 2010, 13:52
Hello,
would it be possible to add support for subtitles like THIS (http://www.mediafire.com/?n4yznmyvmyy)?
They give "WARNING: multiple PDS/ODS definitions: result may be erratic" and a lot of lines are missing as a result. I guess that's because there are multiple lines active at once, so only the "♫~" is displayed while the actual lyrics are missing.
A lot of my japanese Blu-rays have subtitles like this and there is no other way I know to include them into an .mkv...
twazerty
6th June 2010, 14:27
I did get a report for my AVCHDCoder that the subs didn't work. I have the original and converted sup file. After I mux them in an AVCHD structure and play the movie the sup created with BDSup2Sub doesn't work. The original does work.
Commandline:
java -Xmx256m -jar bdsup2sub.jar "original.sup" "converted.sup" /res:1080
Files for testing: Download (http://www.mediafire.com/?y5mnmiijjgy)
First time I have trouble with subtitles. This is a specific problem.
0xdeadbeef
6th June 2010, 15:40
Hm, it's a little hard (the nice way to say "nearly impossible") for me to say why some other program or player chokes on this specific subtitle though it has the very same structure as any other subtitles exported by BDSup2Sub.
A quick look at the example shows only two strange things: the first frame is very short and very empty and all the other subtitles are fullscreen (1920x1080).
I would recommend you to export the original subtitles to XML, then re-import the XML and convert it to the target format. This should truncate the images and reveal if the full screen pictures cause the issue in some way. If this still doesn't work, you could try to erase the empty frame(s) either via the built in feature or by editing the XML file.
twazerty
6th June 2010, 21:37
Hm, it's a little hard (the nice way to say "nearly impossible") for me to say why some other program or player chokes on this specific subtitle though it has the very same structure as any other subtitles exported by BDSup2Sub.
A quick look at the example shows only two strange things: the first frame is very short and very empty and all the other subtitles are fullscreen (1920x1080).
I would recommend you to export the original subtitles to XML, then re-import the XML and convert it to the target format. This should truncate the images and reveal if the full screen pictures cause the issue in some way. If this still doesn't work, you could try to erase the empty frame(s) either via the built in feature or by editing the XML file.
Removing the first empty subtitle "solves" the problem. But now the problem isn't actually solved: I use BDSup2Sub in AVCHDCoder via commandline. It is not possible to detect problems in playback in advance. And creating xml+png and doing frame analysis isn't a nice solution. Maybe you can add a fix? If first sub is empty --> remove frame.
0xdeadbeef
6th June 2010, 23:49
Hm, I understand that exporting to/importing from XML alone did not solve it?
Then again, I don't really get why an empty frame should work in the original stream, but not in the one exported by BDSup2Sub.
Have you tried to move the first frame to another time code (e.g. let it start at the 5th second and display it for 1 second).
If this doesn't help, the decoder in question obviously freaks out on how BDSup2Sub encodes an empty frame. Which is kinda weird in a number of ways.
I could maybe add something like an empty frame detection. Bad thing is, that I'd either need to decode all frames when a stream is loaded (which I currently don't) or I could only detect this during creation of the output stream, but then the frames would be deleted without giving the user a chance to fix/investigate it before.
Honestly, I'd prefer to find out what exactly the player in question doesn't like about how BDS2S encodes empty frames. So does this happen on a specific software/standalone player or on several players?
twazerty
7th June 2010, 01:38
Hm, I understand that exporting to/importing from XML alone did not solve it?
Then again, I don't really get why an empty frame should work in the original stream, but not in the one exported by BDSup2Sub.
Have you tried to move the first frame to another time code (e.g. let it start at the 5th second and display it for 1 second).
If this doesn't help, the decoder in question obviously freaks out on how BDSup2Sub encodes an empty frame. Which is kinda weird in a number of ways.
I could maybe add something like an empty frame detection. Bad thing is, that I'd either need to decode all frames when a stream is loaded (which I currently don't) or I could only detect this during creation of the output stream, but then the frames would be deleted without giving the user a chance to fix/investigate it before.
Honestly, I'd prefer to find out what exactly the player in question doesn't like about how BDS2S encodes empty frames. So does this happen on a specific software/standalone player or on several players?
I removed the frame with your GUI. Didn't try other things yet.
Myself I tried Arcsoft Total Media Theatre 3 and my user tried it on a stand-alone player and PowerDVD.
My user reported this: with PowerDVD he saw all subs in a fraction of a second. Like the timestamps are incorrect.
With TMT3 I see a sub but only at the end of the video.
You can test it too. Just grab a 1080p videofile and add both subs and mux them together with tsMuxer.
I'll do some more testing these days. I understand you want to know why it doesn't work. I'll help you with that.
You can make it optional: removal of empty frames.
jimdays2788
15th June 2010, 11:11
Suggestion: You software should extend (lengthen duration, not delay) all sub/idx subtitles in a movie. I could not find a method to do this when I looked at your software, or the documentation. For example, I would like to extend (lengthen duration) all subtitles in a movie by 0.3 second (and also automatically prevent overlapping, since if some some subtitles were extended, they would overlap with the next subtitle. In this case, those subtitles should only extend to the next subtitle.
Subtitle Workshop can easily do this with just a mouse click (edit>timings>time expander), but only on srt subtitles. I want to lengthen duration on all sub/idx subtitles in a movie.
As far as I know, there is no software that can do this (extend duration of sub/idx subtitles).
asarian
21st June 2010, 14:10
I'm trying to lower the forced subs on my Avatar Blu-Ray (Edit -> Move all Captions). Two issues:
1) Seems I can only set a positive Y offset (meaning: I can only move them up)
2) Even if I move them up, for test, they still remain at the exact same position.
I'm new to this program; so surely I misunderstood the process somehow. Can someone please tell me how to accomplish what I want?
Thanks.
Goldy
27th June 2010, 11:27
Hi, I was trying to find a simple and quick tool to convert '.sup' subtitles (DVD extracted with pgcdemux) to '.sub/.idx' to mux into a mkv container. But everytime I try the bdsup2sub to load the sup file, I get an error message like this: 'Offset 1091309618 out of bounds for file 'xxxxxxxx.sup'.
Maybe its a pgcdemux problem, or I'm doing something wrong?
Same problem for me. Any issue to fix that ?
The last empty frame causes the problem. But I can't remove it (open dialog with error).
Edit : It's ok, I found a way to remove it.
Skirge01
27th June 2010, 20:27
I'm having trouble getting this to run via double-clicking the jar file. Any time I try that I get a message of "Could not find the main class: C:\BDSup2Sub\BDSup2Sub.jar. Program will exit." If I place BDSup2Sub.jar in my java installation directory and open a command line, I can type "java -jar BDSup2Sub.jar" and it executes without issue. But, double-clicking the BDSup2Sub.jar file never works, nor does dropping it onto the java.exe or javaw.exe. I installed/reinstalled both the 32-bit and 64-bit JREs (Windows 7 Home Premium 64 bit), then tried installing them outside of C:\Program Files*, just to see if some security setting might be causing the issue. I also right-clicked the .jar and "unblock"ed it, since Windows said it came from another computer. I also edited the system paths for Windows to include the java directories and .jar extensions. Still nothing.
I've tried searching for the "could not find the main class" message, but have found nothing that seems to apply. All of the sites i found say that the manifest is wrong, but I'm quite certain I shouldn't have to be editing or creating that. This seems like a Windows issue, but I'm stumped.
Any suggestions? Thanks!
hoju3508
4th July 2010, 00:05
Is it necessary to change fps if my subtitle came from a 29.97fps DVD and I'm trying to use it with my 23.976fps Blu-ray?
:thanks:
stax76
4th July 2010, 06:02
Hi, on Win7 using system text size 150% (144 DPI, I have a 23" Full HD display) the application is hardly usable:
http://j.imagehost.org/0047/Unbenannt_4.png (http://j.imagehost.org/view/0047/Unbenannt_4)
jasonwc
14th July 2010, 00:38
Would it be possible to add an option to save move settings, so that one could set a default "move all" setting upon input of a subtitle? Currently, you must manually open the "Move all captions" option box, set your preferred setting, and then you can load subs with the "move all" checkbox. It would be easier if you could save the setting for future use.
For example, I would like to set a default setting of "Move outside bounds" for each subtitle I export.
Rack
18th July 2010, 20:30
Same problem for me. Any issue to fix that ?
The last empty frame causes the problem. But I can't remove it (open dialog with error).
Edit : It's ok, I found a way to remove it.
I'm having the same problem as well.
May I ask you how you managed to resolve this issue?
Regards,
deank
26th July 2010, 15:22
@0xdeadbeef:
Hi! I have a weird problem lately and I can't figure out what I'm doing wrong.
I'm creating xml+png, loading the xml to output SUP with BDsup2sub. The XML header is set to 23.976, BDsup2sup option set /fps:keep and the final sup gets wrong timecodes (like 24fps). The only way to get proper .SUP is to set the xml to 24 fps and then at the command line to parse /fps:23.976 - then I get it working properly.
//
And another question: does BDsup2sub process "Dropframe" xml tag?
laserfan
28th July 2010, 17:53
My spouse is somewhat hard-of-hearing, but I am not, so I like to massage subtitle tracks--if she needs them to understand the dialog, I want them to be as unobtrusive as possible e.g. get rid of the "Hearing Impaired" subs [CLEARS THROAT] [SCREAMING] [GUNSHOTS] etc. Well the other day I bought Inglorious Basterds BD (US version) and it must be the worst subtitle track in the history of subtitle tracks! This film has numerous, extended scenes with non-English dialog, and for these scenes has subtitles hard-encoded into the movie frame (not forced subs, lettering-in-the-video-frame). Well, the subtitle track ALSO has, for every one of these scenes, frequent [SPEAKING GERMAN] or [SPEAKING FRENCH] or [SPEAKING ITALIAN] appear constantly in the frame along with the hardsubs!! :eek:
Good grief, what a mess. But I was able with BDSup2Sub to quite easily step-through the subs and ALT-x (delete from export) all these subs, and other SDH titles, that clutter this film. Also used the Erase quite a bit while I was at it.
Great tool!!!
:thanks:
sneaker_ger
1st August 2010, 23:52
@0xdeadbeef:
Hi! I have a weird problem lately and I can't figure out what I'm doing wrong.
I'm creating xml+png, loading the xml to output SUP with BDsup2sub. The XML header is set to 23.976, BDsup2sup option set /fps:keep and the final sup gets wrong timecodes (like 24fps). The only way to get proper .SUP is to set the xml to 24 fps and then at the command line to parse /fps:23.976 - then I get it working properly.
Possibly a problem of drop vs. non-drop timecode notion.
DoctorM
2nd August 2010, 10:47
I've been using BDSup2Sub for doing full PAL DVD conversion to NTSC.
Correct me if I'm wrong, but I suspect there is a problem when resizing 720x480 (from 720x576) for DVD subs.
I think that subtitles are sized for the screen differently than video... so simply resizing from 576 to 480 distorts the aspect ratio of the subpictures.
I can't prove it, but I think I'm seeing that. Would it be more correct to reduce both the X and Y by 83% instead of just vertically?
DMD
14th August 2010, 10:52
Good day to all
I'm a crazy movie on Blu-ray, VAN HELSING.
Is the only film that I could not find the forced subtitles.
I tried using various tools, including tsMuxeR, once I extracted all the subtitles (4) in my language (ITA), and then I have analyzed BDSup2Sub.
3 files relate to special content and comments of the director, and one file refers to the full subtitles.
How to locate the file "Ghost"? :confused:
That this file exists, because when I play the movie, full decrypted with TMT3 forced subtitles are there and appears as the 5th selection.
Can you help or is it an anomaly?
THANKS
setarip_old
14th August 2010, 20:47
@DMD
Hi! I have analyzed BDSup2Sub. 3 files relate to special content and comments of the director, and one file refers to the full subtitles. And did you use BDSup2Sub to go through ALL of the subtitle streams, seeking any subtitles flagged as "forced"?
DMD
15th August 2010, 07:10
Yes! open them all and none contained forced (0 forced)
DoctorM
15th August 2010, 07:25
It seems like a silly question, but those subtitles aren't burned in are they?
DMD
15th August 2010, 07:56
These are all the subtitles demux with tsMuxeR
http://www.allfreeportal.com/imghost2/images/741560Screenshot 006.png (http://allfreeportal.com)
http://www.allfreeportal.com/imghost2/images/581931Screenshot 001.png (http://allfreeportal.com)
Then I tested them one by one with BDSup2Sub, as you can see nobody is forced :confused:
file 4608 (this is what the subtitle Full)
http://www.allfreeportal.com/imghost2/images/100186Screenshot 002.png (http://allfreeportal.com)
file 4609
http://www.allfreeportal.com/imghost2/images/791708Screenshot 003.png (http://allfreeportal.com)
file 4610
http://www.allfreeportal.com/imghost2/images/536001Screenshot 004.png (http://allfreeportal.com)
file 4611
http://www.allfreeportal.com/imghost2/images/327597Screenshot 005.png (http://allfreeportal.com)
Shows the disk TMT3, forced subtitles are regularly activated, and displaying the information of the player as they are fifth selection (ITA)
http://www.allfreeportal.com/imghost2/images/570731tmt3.png (http://allfreeportal.com)
lostclusters
23rd August 2010, 06:31
I have found another movie which does not show forced subs that has forced subs. Stargate Directors Cut is the movie that this utility does not show forced subs.
jmonier
23rd August 2010, 15:08
Occasionally, a movie will have a separate track for the "forced" subs rather than include them in a regular track and this track will NOT be flagged as forced. I know that "Gran Torino" is this way. For these, I just look for a track that is significantly shorter than the regular tracks.
hoju3508
23rd August 2010, 16:00
Would someone recommend a filter to use when converting from 720x480 to 1920x1080?
:thanks:
causemen
26th August 2010, 23:56
http://javaforge.com/displayDocument/icon_128.png?doc_id=76805
BDSup2Sub is a tool I wrote initially to convert captions...
Hi! First of all, thank you for the software. It's been the only tool that could do what I needed (framerate conversion). Really appreciated. However, the result could be better. The target titles become blue and difficult to read:
http://img706.imageshack.us/img706/2439/snapshotdvd004852201008.th.jpg (http://img706.imageshack.us/i/snapshotdvd004852201008.jpg/)
Any suggestions on what can be wrong?
Many thanks!
DoctorM
27th August 2010, 00:57
Hi! First of all, thank you for the software. It's been the only tool that could do what I needed (framerate conversion). Really appreciated. However, the result could be better. The target titles become blue and difficult to read:
http://img706.imageshack.us/img706/2439/snapshotdvd004852201008.th.jpg (http://img706.imageshack.us/i/snapshotdvd004852201008.jpg/)
Any suggestions on what can be wrong?
Many thanks!
I don't know from what to what you are converting, but are you setting Palette to "Keep Existing"? It's not the default.
http://img713.imageshack.us/img713/9162/bdsup2sub2.jpg
causemen
27th August 2010, 19:46
I don't know from what to what you are converting, but are you setting Palette to "Keep Existing"? It's not the default.
http://img713.imageshack.us/img713/9162/bdsup2sub2.jpg
Now everything's lovely! Many thanks!
shh
31st August 2010, 14:06
Could you please add support for DVD-SUPs without an IFO-file?
When I extract subtitles from a DVD with eac3to, it just saves .sup files without an .ifo.
SUPRead can cope with these DVD-SUPs (see attached log), but BDSup2Sub just shows "Unexpected command 0 at index 12".
Is an IFO-file really needed?
Example-sup: http://www.multiupload.com/XLX663QEM1
DoctorM
31st August 2010, 20:18
Could you please add support for DVD-SUPs without an IFO-file?
When I extract subtitles from a DVD with eac3to, it just saves .sup files without an .ifo.
SUPRead can cope with these DVD-SUPs (see attached log), but BDSup2Sub just shows "Unexpected command 0 at index 12".
Is an IFO-file really needed?
Example-sup: http://www.multiupload.com/XLX663QEM1
:search:
shh
31st August 2010, 22:58
Very intelligent comment!
Are you just checking out how to full-quote posts? Your post seem to lack any significant information. No time to type some additional characters I could use?!
> use search
On what keywords?
Do you really think I phrase out an answer here including further info on other programs, without checking FAQs?
But, I must beg your pardon, I haven't read all pages of this thread - perhaps you could point to the relevant message.
DoctorM
1st September 2010, 07:04
You're right. It would have been more helpful is I said: RTFM, but there's no emoticon for that.
Notes on SUP/IFO
The SUP/IFO format as defined by IfoEdit/VobEdit is supported since version 3.9.0 due to public demand. Internally (e.g. regarding RLE encoding, palette definitions etc.) it's virtually the same as SUB/IDX. Note that there are some limitations to this format though.
Firstly, the palette and the screen size are stored inside an IFO file. BDSup2Sub needs a valid IFO file for each SUP file and both have to share the same file name (except the extension of course). If you e.g. exported a file "english.sup" from a "VTS_02_1.VOB" and the according IFO is "VTS_02_0.IFO", then you need to copy the IFO and rename it to "english.ifo" to make BDSup2Sub accept it as input.
Note that BDSup2Sub recognizes the extension "IFO" for SUP/IFO, but not "SUP". The reason is that BDSup2Sub can differ between BD-SUP and HD-DVD-SUP during import only because both format have different packet identifiers. Unfortunately, HD-DVD-SUP and DVD-SUP use the same (outer) package structure so they can only be distinguished between during parsing of the command buffer. At this time, BDSup2Sub already decided to treat a SUP with that package header as "HD-DVD-SUP" and will throw an error.
shh
1st September 2010, 15:04
Hi!
I've built a fixed version, which works for me: http://www.multiupload.com/GEC5B91HYW
Actually I have just checked PAL-SUPs, so I can't tell if it works for NTSC-SUPs, too (BDSup2Sub defaults to 720x576).
Remaining Issue: Without an IFO BDSup2Sub uses the default DVD-palette, but that doesn't match most streams (my sub8.sup teststream has got green subtitles), so you need to edit the colors to some grey-values before exporting.
The missing language-detection from the IFOs isn't tragic, because BDSup2Sub just uses the language code of the first subtitle, what's English in most cases. Most people who use subs want a different language - that's why they actually need (forced) subs - so this procedure of BDSup2Sup is a little bit useless. But still the language-detection from the filename works, if you include e.g. German/English/French/Italian/Spanish/... in the filename.
Changes in Core.java:...
line 717 case READSUP:
try {
readSup(fileName);
} catch (Exception ex) {
Core.print("WARNING: Doesn't seem to be a HD-SUP. Trying to load as DVD-SUP...\n");
readSupIfo(fileName);
}
break;
case READVOBSUB:
...
line 1368 if (!fnS.endsWith(fnI)) // We've got SUPwithoutIFO: Don't del prev filename language detection
languageIdx = substreamDVD.getLanguageIdx();
...
Changes in SupDVD.java:...
line 93 delayGlob = 0;
languageIdx = 0;
srcPalette = new Palette (Core.getDefaultDVDPalette());
subPictures = new ArrayList<SubPictureDVD>();
try {
readIFO(fnIfo);
} catch(Exception ex){
Core.print("WARNING: Cannot find IFO-file.\n");
Core.print("WARNING: Using default resolution 720x576 and default DVD-palette.\n");
}
try {
...
DoctorM
3rd September 2010, 04:16
I'm not sure what the problem is, maybe the resize filters are just not very good, but no matter what filter I use to convert DVD subs from 576 to 480, the top and bottoms of the letters seem to flatten.
Would a Spline resizer work better or is the problem somewhere else?
Btw, has it been pointed out that the conversion should be between 478 for NTSC and 574 for PAL (not 480 and 576) (or has this already been accounted for elsewhere)?
Inspector.Gadget
28th September 2010, 03:08
Hey 0xdeadbeef, it appears to the casual observer that a certain shady software company might be ripping you off (http://forum.doom9.org/showthread.php?t=157070).
I am unable to find any license or copyright information relating to BDSup2Sub packed in the relevant installer or in the program itself, and this is consistent with their practice of ripping off libav* stuff as well. They mention following a U.S. standard for user data transfers from E.U. residents, though I believe that they are a Chinese corporation.
Deepanshu
1st October 2010, 08:25
any plans to open the source of the tool?
asarian
4th October 2010, 19:37
Any plans to compile this as a 64-bit AviSynth plugin? That would be awesome.
rernst
4th October 2010, 19:39
Avarian,
it's Java, it doesn't work that way.
asarian
4th October 2010, 19:45
Avarian,
it's Java, it doesn't work that way.
Sorry, my bad; I see I posted this in the BDSup2Sub forum; meant to go to the SupTitle thread, of course. :o
DoctorM
11th October 2010, 23:39
Anyone else finding that titles reduced in size, regardless of resize filter used, occasionally gets a jitter (like it's shuddering between scan lines)?
I recommend that Lanczos should be used preferentially, it is still the best resize filter.
Also, if you are converting something like PAL to NTSC, add a resize value (X and Y) of 1.2.
Otherwise the resizing distorts the text quite badly and effects legibility.
Does anyone know if this program is still being developed? There hasn't been an update in quite a while.
DoctorM
13th October 2010, 22:14
Hmm. Okay so the issue is weirder than I thought.
I found a thread that recommended moving the subtitles up 1 line if there is a jitter... this did not fix the issue, but revealed another problem.
Normally, when using DVDSubEdit to move subtitles, the pop-up preview is unaltered by an adjustment to the subpicture vertical position.
This is not true of titles resized with BDSup2Sub. The title will actually shake up and down by 1 pixel in the preview box as you adjust the position. Any odd pixel move causes the top of the subtitle to be cut off (and it may appear in many as random lines at the bottom of the subpicture's area on DVD playback).
Something is seriously wrong. I suspect overcropping around the subs might be the problem.
The top and bottom are cropped flat to the top most/bottom most pixels of the titles.
I'm not sure that explains jittering when I play back on standalone DVD players, or why the jitter can actually be duplicated manually in DVDSubEdit.
I could really use a suggestion here, because this is a deal breaker. If BDSup2Sub can't generate subtitles stable for all conditions, it's useless.
Scott R
16th October 2010, 21:35
I'm new to using BDSup2Sub and I ran into a problem on my first try. First, I used MakeMKV to rip Avatar from my Blu-ray disc. Then I used mkvtoolnix's mkvextract to extract the PGS subtitle track to a .sup file. That appeared to complete successfully. But when I try to read in that file using BDSup2Sub, the status bar zooms along and in a second or two, at about the halfway point, it bombs out with an error referring to "IndexOutOfBoundsException".
Any ideas? I tried re-extracting the PGS subtitle track twice (in case something got corrupted the first time), and tried BDSup2Sub on two different computers, but I still got the same results. I can confirm that the embedded subtitle track in my MKV file works when I play it via XBMC Dharma under Windows 7 (except for an XBMC bug which leaves the subtitles on-screen too long).
Killroy™
16th October 2010, 21:53
Use eac3to to extract the sup file.
Scott R
16th October 2010, 21:56
Use eac3to to extract the sup file.Can eac3to extract the track *from* an MKV file, or will I need to re-rip my movie again (using something like AnyDVD HD)? I don't currently have a license for AnyDVD HD, so I've been hoping to survive just using MakeMKV.
Killroy™
16th October 2010, 21:58
Can eac3to extract the track *from* an MKV file, or will I need to re-rip my movie again (using something like AnyDVD HD)? I don't currently have a license for AnyDVD HD, so I've been hoping to survive just using MakeMKV.
It can but I missed the MKV part... for MKV's I prefer to use MKVcleaver_v0500
DoctorM
16th October 2010, 22:03
Can eac3to extract the track *from* an MKV file, or will I need to re-rip my movie again (using something like AnyDVD HD)? I don't currently have a license for AnyDVD HD, so I've been hoping to survive just using MakeMKV.
If you extracted with MKV Extract... that's the file. BDSup2Sub's inability to load it is BDSup2Sub's bug.
Scott R
16th October 2010, 22:08
Based on a quick Google search, it sounds like MKVcleaver is just a GUI skin for mkvextract which, per my original post, is the tool I previously used to extract the .sup file, but which BDSup2Sub bombed out on. I'll try out eac3to later today, unless someone has other recommendations. At this point I don't know if my problem is that mkvextract is failing to properly extract the file, or BDSup2Sub is not working properly. It's also possible that whatever version of MakeMKV I was using at the time I originally ripped this movie didn't do something quite right with the subtitle data. Yesterday I did a lot of Googling on the subject, but didn't find anyone else reporting getting this IndexOutOfBoundsException error with this movie's subtitle track, so I'm not sure what could be wrong.
DoctorM
16th October 2010, 22:23
Hmm. It is possible MakeMKV is doing something weird to your subtitles, but I don't know, this is the first I've heard of it.
If you are willing to post the SUP file, I'll take a look at it (I can't guarantee I'll know what I'm doing though.)
Scott R
16th October 2010, 23:26
DoctorM, thanks for the offer. I figured I'd give eac3to a try first, but according to their wiki, I don't even see any claim that it's capable of extracting PGS/.sup subtitle data. If it can definitely do this, can someone provide me with the proper command line options for this, or point me to a web page that provides that info?
Edit: Nevermind, I figured it out. Trying it now. Will report back.
kevotinh
24th October 2010, 02:26
I used BDSup2Sub to change sub color, but after i save the idex sub. and play it with VLC, it have a transparents black box on it. ANyone know what i can do to not have that transparents box?
DoctorM
25th October 2010, 23:29
Since it doesn't look like there's any help coming, can anyone tell me if any older versions of S2S doesn't crop the subtitles so closely on import?
Edit: For that matter, is anything older than 3.9.6 even available anywhere?
a451guy451
30th October 2010, 02:49
Hello. Love this tool. Would it be very difficult to add Final Cut Pro formatted XML as an output option?
asarian
30th October 2010, 13:29
Can eac3to extract the track *from* an MKV file, or will I need to re-rip my movie again (using something like AnyDVD HD)? I don't currently have a license for AnyDVD HD, so I've been hoping to survive just using MakeMKV.
What you're saying doesn't make a whole lot of sense. If you were originally able to extract the main feauture + SUP track from your Blu-Ray, then it *must* have already been decrypted (run thru AnyDVD HD). Otherwise you couldn't play the resultant .mkv at all. If you had AnyDVD HD installed on another OS/computer, and now don't have it any more, they will resend you the license key.
If the .SUP track inside the .mkv is fubarred by MakeMKV (quite possible; not every program gets it right; and even somewhat older versions of eac3to sometimes screwed up the timings), then you could try and restore the timings, but you're really just better off re-ripping your Blu-Ray.
setarip_old
31st October 2010, 20:32
@asarian
Hi! If you were originally able to extract the main feauture + SUP track from your Blu-Ray, then it *must* have already been decrypted (run thru AnyDVD HD).You appear to be under a misconception.
Both (presently freeware) MakeMKV and (presently freeware) DVDFab Passkey are also capable of ripping/decrypting "Full Disc" Blu-ray discs...
asarian
31st October 2010, 23:09
@asarian
Hi! You appear to be under a misconception.
Both (presently freeware) MakeMKV and (presently freeware) DVDFab Passkey are also capable of ripping/decrypting "Full Disc" Blu-ray discs...
Yes, that appears to be a misconception on my end. I thought to date only AnyDVD HD could do that. My bad.
macjedi
6th November 2010, 18:27
Hi! I'm only able to get it to work when the in/out path is the same directory as BDSup2Sub.jar. Is this a limitation of Java/Mac or am I missing something? I'd like to have the in/out directory be on another volume than the one I keep BDSup2Sub on.
CORRECTION: I can get it to work if I "cd" into the directory first, but if I try to set the path it doesn't see the file. Is there a different syntax for sending path arguments to a java app?
mrr19121970
8th November 2010, 18:59
@0xdeadbeef
I'm trying to use ffmpeg to mux in Blu-Ray subs to an MPEG2 file. I used BDSup2Sub to convert the PGS to 25fps/PAL SUB/IDX. However ffmpeg gives me a strange message. I've Googled it and it implies a non conforming type perhaps.
Convert To PAL DVD
FFmpeg version SVN-r25679, Copyright (c) 2000-2010 the FFmpeg developers
built on Nov 5 2010 04:07:19 with gcc 4.4.2
configuration: --enable-gpl --enable-version3 --enable-libgsm --enable-pthread
s --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --
enable-libopenjpeg --enable-libschroedinger --enable-libopencore_amrwb --enable-
libopencore_amrnb --enable-libvpx --disable-decoder=libvpx --arch=x86 --enable-r
untime-cpudetect --enable-libxvid --enable-libx264 --extra-libs='-lx264 -lpthrea
d' --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --target-o
s=mingw32 --enable-avisynth --cross-prefix=i686-mingw32- --cc='ccache i686-mingw
32-gcc' --enable-memalign-hack
libavutil 50.32. 6 / 50.32. 6
libavcore 0.12. 0 / 0.12. 0
libavcodec 52.94. 3 / 52.94. 3
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.56. 0 / 1.56. 0
libswscale 0.12. 0 / 0.12. 0
[mpeg @ 015efe60] max_analyze_duration reached
Input #0, mpeg, from 'F:\Chitty_DVD9.mpg':
Duration: 02:25:30.75, start: 1.000000, bitrate: 6975 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9]
, 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.2[0x81]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Input #1, mpeg, from 'E:\DEMUX\CCBB\Subtitles_23_German_FORCED_exp.sub':
Duration: 02:18:36.08, start: 54.720000, bitrate: 0 kb/s
Stream #1.0[0x20]: Subtitle: dvdsub
Output #0, mpeg, to 'E:\Chitty.mpg':
Metadata:
encoder : Lavf52.84.0
Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-3
1, 9000 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: ac3, 48000 Hz, 5.1, 448 kb/s
Stream #0.2: Subtitle: dvdsub
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Stream #1.0 -> #0.2
Press [q] to stop encoding
[mpeg @ 036688c0] st:2 error, non monotone timestamps 165600 >= 165600
av_interleaved_write_frame(): Operation not permitted
I've attached the SUB/IDX (12kb) for you to try yourself. http://www.clownbd.com/CCBB.zip
ffmpeg -i "F:\Chitty_DVD9.mpg" -i "E:\DEMUX\CCBB\Subtitles_23_German_FORCED_exp.sub" -map 0:0 -map 0:1 -map 1:0 -vcodec copy -acodec copy -scodec dvdsub "E:\Chitty.mpg"
Can you help here?
mrr19121970
10th November 2010, 14:39
Perhap's I've found an alternative solution?
http://dvdauthor.sourceforge.net/doc/spumux.html
What is the chance that you can offer XML/PNG output compatible for spumux (the subtitle element of DVDAuthor)?
Here's a sample configuration file:
<subpictures>
<stream>
<spu start="start-time" [ end="end-time" ] [ image="picture.png" ]
[ highlight="picture.png" ] [ select="picture.png" ]
[ transparent="color-code" ] [ force="yes" ]
[ autooutline="infer" [ outlinewidth="width" ]
[ autoorder="rows" | autoorder="columns" ] ]
[ xoffset="x-coord" yoffset="y-coord" ] >
<button [ name="name" ] [ x0="x0" ] [ y0="y0" ] [ x1="x1" ]
[ y1="y1" ] [ up="name" ] [ down="name" ]
[ left="name" ] [ right="name" ] />
<action [ name="name" ] />
</spu>
</stream>
</subpictures>
Each subtitle image is described by an <spu> tag. The start and optional end attributes describe when the subtitle will be displayed on the screen, in "HR:MM:SS.HU". The image attribute describes the main subtitle image, which can either be a PNG or BMP file. If your image is not a full screen image, you can use xoffset and yoffset to move the picture around. In the advent that the author is unable to use a graphics format with an alpha channel, then the transparent attribute can be used to describe which color should become fully transparent. The color is in hexadecimal as "RRGGBB". If you want to force the display of the subtitle, regardless of whether the user has enabled subtitles or not, you can use the force tag. When you are making menus, the force tag is required.
The remaining attributes and tags are related to menu creation. The highlight attribute shows what all the buttons look like when they are highlighted (i.e. when you are using the arrows in the menu), and the select attribute shows what all the buttons look like when the are selected (i.e. for the 1-2 seconds after you press enter in the menu). If either of these (or the image attribute) are omitted, then spumux creates a blank (totally transparent) image. Obviously at least one tag should be specified.
To aid in button creation, the autooutline attribute instructs spumux to infer where the buttons are located. It does this by attempting to draw rectangles around a composition of the highlight and select images which do not intersect any opaque or semi-opaque pixels. In order to support textual buttons, the attribute outlinewidth allows you to specify the width of the rectangle which is tested. Wider rectangles won't be able to squeeze between the letters. Finally, autoorder describes which way to order the automatically detected buttons, which is important for numerically selected buttons and for mapping buttons to button names or to the implied names.
The button and action tags describe the buttons (visibly selectable objects on the screen) and actions (commands that are executed as soon as the associated key is pressed on the remote). If you are using the autooutline feature, just designing buttons, are happy with the inferred button navigation, and can deal with the simplistic naming system, then you actually do not even need to specify any buttons or actions. Otherwise, read on.
The name attribute is used to give a button or action an easy to refer to name. By default they are numbered sequentially starting with "1". The up, down, left, and right names describe which button or action should be tied to the corresponding key when the current button is highlighted, though if omitted spumux will use a reasonably intelligent algorithm to determine which buttons to move to.
The (x0,y0) coordinates describe the upper left hand corner inclusively, while the (x1,y1) coordinates describe the lower right hand corner EXclusively. The coordinates start at 0,0 for the upper left hand corner. Ideally, the y0 and y1 coordinates should both be even, so the button edges fully empasses two interlaced scanlines, even if there is no data in the extra scanline. Some DVD players will fill in the extra scanline if it is not specified; spumux makes an effort to ensure that will be transparent but there is no guarantee.
mrr19121970
10th November 2010, 17:31
I tried manually creating the XML, but it seems the generated palette has 254 colours and this application wants only 4:
<subpictures>
<stream>
<spu start="00:00:00:01" end="00:01:01:10" xoffset="148" yoffset="281" image="E:\DEMUX\CCBB\XML\Subtitles_23_German_FORCED_exp_0001.png" >
</spu>
</stream>
</subpictures>
DVDAuthor::spumux, version 0.6.18.
Build options: gnugetopt iconv freetype fribidi
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: PNG had 254 colors
Assertion failed: s->numpal < 16, file subgen.c, line 294
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
see here (http://osdir.com/ml/multimedia.dvdauthor.user/2005-10/msg00026.html) and here (http://osdir.com/ml/multimedia.dvdauthor.user/2005-10/msg00027.html).
Lincoln Burrows
11th November 2010, 02:55
I am having problems with a demuxed subtitle from a m2ts file. Watching the m2ts file I can see the subtitle working until the end, but when I use TsMuxer to demux the stream and try to create a MKV file with Mkvtoolnix the subtitle only works for 2 minutes.
Using BDSup2Sub there was a warning:
ERROR: PG missing at index 0x000d1607
This is the file:
http://www.easy-share.com/1912927248/00020.track_4632.sup
It's a chinese subtitle. One more thing: MakeMKV reported the original m2ts file (from the movie) was somehow corrupted. The message was:
The source file '/BDMV/STREAM/00020.m2ts' is corrupt or invalid at offset 466944, attempting to work around
It usually means a bad rip or faulty disc. But I can't see any errors playing 00020.m2ts which is the file from the movie. All demuxed subtitles I have selected are working. This is the only one that have a problem.
If this is really a problem as stated above why I am capable of using that subtitle without demuxing? Can you at least explain what "PG missing at index" means?
This issue was solved following those steps:
The "attempting to work around" message got my attention so I decided to convert the original m2ts file from the movie into MKV using MakeMKV instead of TsMuxer. But only selecting the chinese subtitle in the options. I was under the impression that TSMuxer didn't do a very good job and that's why the subtitle was incomplete, even though the m2ts file was somehow corrupted as pointed out by MakeMKV. I figured "perhaps MakeMKV can do better".
And that was exactly what happened: later I used MKVMergeGUI2 to extract the chinese subtitle (sup file) and then inserted in the MKV file as I planned from the start.
The new subtitle is complete, while the one extracted by TSMuxer has 2 minutes (instead of almost 2 hours).
You can see the new here, and compare both using BDSup2Sub:
http://www.easy-share.com/1912928049/title03_track2.sup
kevbo
19th November 2010, 17:18
I'm having some weirdness with the new Avatar Collector's Edition. I'm trying to get just the Na'vi text as subtitles. I'm using the USA release, and working with the Extended edition.
I've copied the movie using AnyDVD and I used CloneBD to extract the subtitles. As the disk uses seamless branching, CloneBD needs to do some timing adjustment. That could be the problem (and I'll ask there).
Basically, I get the 83 subtitle frames, conveniently located as Subtitle track 15. The problem is, the timing is all off.
Notice:
timestamp: 00:15:02:693, filepos: 000000000
timestamp: 00:04:40:530, filepos: 000002000
timestamp: 00:04:42:741, filepos: 000004000
timestamp: 00:04:47:120, filepos: 000006800
timestamp: 00:04:49:414, filepos: 000008800
The first timestamp there is actually right: the first subtitle should be at 15:02. Then, it timewarps back in time, and stays "wrong" for the rest of the file.
The subtitle track with _all_ the subtitles, track 10, doesn't show this. In fact, I can find the "correct" timestamps for all of the Na'vi text in the conversion of the full track...and I mean to do so, by hand, to make the .idx file for just the Na'vi (forced) track.
BDSup2Sub says things like this when it does the conversion:
#> 1 (00:15:02.693)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 2 (00:04:40.530)
#< 3 (00:04:42.741)
#> 4 (00:04:47.120)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 5 (00:04:49.414)
#> 6 (00:38:11.080)
#> 7 (00:38:19.714)
#> 8 (00:38:25.011)
#> 9 (00:38:28.723)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 10 (00:38:31.059)
I don't know if there's something weird about this stream that BDSup2Sub hadn't seen before, or if this file really is corrupt somehow. I've tried the entire process twice, with the same result.
Thanks,
Kevin
rernst
19th November 2010, 17:26
For what it's worth - I did the same BD with YAMF (I wrote) which uses BDSup2Sub internally (I just call it from my Java code) and didn't have issues.
Maybe this is a clue to what the deal is, maybe not. I just thought I'd mention it.
Killroy™
19th November 2010, 17:28
I'm having some weirdness with the new Avatar Collector's Edition. I'm trying to get just the Na'vi text as subtitles. I'm using the USA release, and working with the Extended edition.
I've copied the movie using AnyDVD and I used CloneBD to extract the subtitles. As the disk uses seamless branching, CloneBD needs to do some timing adjustment. That could be the problem (and I'll ask there).
Does CloneBD use eac3to (in the background) to demux? It seems that eac3to is having problems with some titles lately.
rernst
19th November 2010, 17:36
Yes, I believe it does.
kevbo
19th November 2010, 19:32
Can I use YAMF to get a correct .idx file?
I'm going to take a look at it...just downloaded it. I've never used it before.
And to answer the other question: yes, ClownBD uses eac3to. That's pretty much all I use it for...spilt with ClownBD, and mux by hand using MKVMerge. I'm just making MKV files for my own use, so I'm not recompressing or anything.
Thanks,
Kevin
Killroy™
19th November 2010, 19:42
Can I use YAMF to get a correct .idx file?
I'm going to take a look at it...just downloaded it. I've never used it before.
And to answer the other question: yes, ClownBD uses eac3to. That's pretty much all I use it for...spilt with ClownBD, and mux by hand using MKVMerge. I'm just making MKV files for my own use, so I'm not recompressing or anything.
Thanks,
Kevin
Try demuxing (extracting) the subs (.sup) with tsMuxeR and you should get a proper sub file with the proper timeline. You can go back and use mkvmerge like usual to get a proper MKV.
kevbo
19th November 2010, 19:45
The problem is, the source movie isn't a single file. It is multiple parts, using seamless branching. Can I use TSRemux like that? It only seems to want a single file. Should I combine the files by hand?
Edited: looks like TSMuxer can do this for me, by reading the playlist file. Experimenting now.
Thanks,
Kevin
rernst
19th November 2010, 20:10
Can I use YAMF to get a correct .idx file?
I'm going to take a look at it...just downloaded it. I've never used it before.
And to answer the other question: yes, ClownBD uses eac3to. That's pretty much all I use it for...spilt with ClownBD, and mux by hand using MKVMerge. I'm just making MKV files for my own use, so I'm not recompressing or anything.
Thanks,
Kevin
Yes, it converts it under the covers and multiplexes it into the .mkv file. It uses BDSup2Sup to do this.
As for the other question - yes, YAMF actually takes the .TS file (if you give it that) and demultiplexes it into the elementary streams using tsmuxer. So the method described above should work. ClownBD has already done the hard work of combining the various MTS files according to playlist into a single .ts file.
kevbo
19th November 2010, 20:55
The problem is, ClownBD/eac3to is causing the extracted .sub file to be wrong, somehow...so I can't use that combo in the workflow for this movie.
Using TXMuxerGUI, setting it to demux, and pulling the .sub files from there _worked_. I fed the resulting .sub file to BDSup2Sub, and while it still showed the same warnings ("WARNING: multiple PDS/ODS definitions: result may be erratic"), the timestamps were correct. I fed the exported file to mkvmerge and have a nice, working .mkv file with the subs in the right location, timewise.
Thanks for the help, and pointing out tools I didn't know about. The problem, in this case, is clearly not BDSup2Sub's, and is most likely eac3to's.
Killroy™
19th November 2010, 21:02
Thanks for the help, and pointing out tools I didn't know about. The problem, in this case, is clearly not BDSup2Sub's, and is most likely eac3to's.
Like I said, eac3to seems to have problems with a few new titles recently like Avatar EE, and some of the Lethal Weapon titles. Not sure why but using tsMuxeR for some of the demuxing seems to fix the issues as a quick fix.
kevbo
19th November 2010, 21:03
Thanks Killroy: I just wanted to confirm what you said and that it had worked, in case anyone else finds this thread.
Then, I went to the eac3 thread and found exactly the same thing there. Guess I should have gone there first. :)
Thanks again everyone,
Kevin
Chug a Bug
23rd November 2010, 14:22
I used MakeMKV for Avatar EE and the sup's demuxed from that are ok too, timewise.
Arshad07
10th December 2010, 15:51
After I've converted the SUP to idx/sub, how can i convert it to srt?
thanks.
cavediver
11th December 2010, 02:21
After I've converted the SUP to idx/sub, how can i convert it to srt?
thanks.
I use suprip to go straight from sup to srt.
DoctorM
11th December 2010, 06:55
I'm not sure why you would ever need to use BDSup2Sub before using OCR software (which BDSup2Sub does not do).
DMD
12th December 2010, 12:41
Unfortunately I'm noticing that many DVD titles
there are subforced integrated into the main stream that is not possible to extrapolate, so we need to do it manually. :(
Currently, proceed as follows:
1 - Load the stream with BDSup2Sub, then open simultaneously DVDSubEdit, using it as monitor, with the cursor and scan the entire movie looking for subForced.
2 - Once found, it must mark them with a flag in BDSup2Sub, then save the entire stream.
3 - Open the stream with BDSup2Sub "flagged" at this stage there is indicated the presence of forced, we will have to export as I said in the guide.
There is no other better way to do this?
THANKS
rernst
6th January 2011, 17:11
As it says: Reading the subtitle file (there is only one on the BD) bdsup2sub issues an error messages:
Loading W:\BDCLown\The girl with the dragon tatto\Subtitles_5_Undetermined.sup
#> 1 (00:02:21.808)
#> 2 (-3:-13:-5.-180)
#> 3 (-3:-12:-23.-763)
#> 4 (-3:-12:-19.-551)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 5 (-3:-12:-14.0-4)
#> 6 (-3:-12:-11.-84)
#> 7 (-3:-12:-6.-997)
#> 8 (-3:-12:-1.-741)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 9 (-3:-11:-58.-947)
#> 10 (-3:-11:-54.-734)
#> 11 (-3:-11:-50.-730)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 12 (-3:-11:-47.-978)
#> 13 (-3:-11:-45.-266)
#> 14 (-3:-11:-38.-969)
#> 15 (-3:-11:-35.-882)
#> 16 (-3:-11:-29.-501)
#> 17 (-3:-11:-25.-413)
#> 18 (-3:-11:-13.-109)
#> 19 (-3:-11:-9.-940)
#> 20 (-3:-11:-2.-641)
#> 21 (-3:-10:-59.-387)
#> 22 (-3:-10:-56.0-9)
#> 23 (-3:-10:-52.-923)
#> 24 (-3:-10:-47.-459)
#> 25 (-3:-10:-43.-371)
#> 26 (-3:-10:-39.-868)
#> 27 (-3:-10:-35.-906)
#> 28 (-3:-10:-32.-694)
#> 29 (-3:-10:-27.-439)
#> 30 (-3:-10:-23.-894)
#> 31 (-3:-10:-19.-97)
#> 32 (-3:-10:-16.-219)
#> 33 (-3:-10:-11.-506)
#> 34 (-3:-10:-2.-622)
#> 35 (-3:-9:-55.-574)
#> 36 (-3:-9:-52.-904)
#> 37 (-3:-9:-49.-25)
etc ....
The subtitle display correctly in the application. Exporting them doesn't seem to create error messages but when I try to multiplex the result matroska tells me there is something wrong with the format.
Would you like the file and have a look at it?
setarip_old
6th January 2011, 21:01
@DMD
Hi! There is no other better way to do this?Sure there is. In DVDSubedit, simply tick "Forced subs only"...
ptr727
28th January 2011, 00:19
Hi, when I load a sup file I get an indexoutofbounds exception.
Process:
Avatar BD, converted to MKV using MakeMKV.
MakeMKV included normal and forced subs streams.
Extract SUP file from MKV using eac3to and HdBrStreamExtractor.
I can open the normal sup file ok.
When I open the forced subs sup file I get the crash.
Sample file is here:
http://dl.dropbox.com/u/2182768/1_5_subtitle.sup
Is this a problem with MakeMKV, or a bug?
P.
ianken
4th February 2011, 04:17
I'm seeing the same thing.
AVATAR BRD-> MKV via MakeMKV
Extract subs using mkvextract (from mkvtoolnix)
The full sub set work (IE: the regular dialog and descriptive text)
The other track, which is just the na'avi, causes a thrown exception.
kws53
10th February 2011, 00:08
As it says: Reading the subtitle file (there is only one on the BD) bdsup2sub issues an error messages:
Loading W:\BDCLown\The girl with the dragon tatto\Subtitles_5_Undetermined.sup
#> 1 (00:02:21.808)
#> 2 (-3:-13:-5.-180)
#> 3 (-3:-12:-23.-763)
#> 4 (-3:-12:-19.-551)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 5 (-3:-12:-14.0-4)
#> 6 (-3:-12:-11.-84)
#> 7 (-3:-12:-6.-997)
#> 8 (-3:-12:-1.-741)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 9 (-3:-11:-58.-947)
#> 10 (-3:-11:-54.-734)
#> 11 (-3:-11:-50.-730)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 12 (-3:-11:-47.-978)
#> 13 (-3:-11:-45.-266)
#> 14 (-3:-11:-38.-969)
#> 15 (-3:-11:-35.-882)
#> 16 (-3:-11:-29.-501)
#> 17 (-3:-11:-25.-413)
#> 18 (-3:-11:-13.-109)
#> 19 (-3:-11:-9.-940)
#> 20 (-3:-11:-2.-641)
#> 21 (-3:-10:-59.-387)
#> 22 (-3:-10:-56.0-9)
#> 23 (-3:-10:-52.-923)
#> 24 (-3:-10:-47.-459)
#> 25 (-3:-10:-43.-371)
#> 26 (-3:-10:-39.-868)
#> 27 (-3:-10:-35.-906)
#> 28 (-3:-10:-32.-694)
#> 29 (-3:-10:-27.-439)
#> 30 (-3:-10:-23.-894)
#> 31 (-3:-10:-19.-97)
#> 32 (-3:-10:-16.-219)
#> 33 (-3:-10:-11.-506)
#> 34 (-3:-10:-2.-622)
#> 35 (-3:-9:-55.-574)
#> 36 (-3:-9:-52.-904)
#> 37 (-3:-9:-49.-25)
etc ....
The subtitle display correctly in the application. Exporting them doesn't seem to create error messages but when I try to multiplex the result matroska tells me there is something wrong with the format.
Would you like the file and have a look at it?
Interestingly, the same problem exists for "The Girl Who played with Fire". I demuxed using EAC3TO [CLI] and used the subtitle SUP stream produced.
Loading W:\GIRL WHO PLAYED WITH FIRE\00001 - 5 - Subtitle (PGS), 838 captions.sup
#> 1 (00:01:06.733)
#> 2 (-3:-14:-15.-959)
#> 3 (-3:-14:-12.-330)
#> 4 (-3:-14:-6.-741)
#> 5 (-3:-14:-3.-613)
#> 6 (-3:-13:-58.-942)
#> 7 (-3:-12:-54.-711)
<snipped>
#> 168 (-2:-50:-43.-840)
#> 169 (-2:-50:-41.-713)
#> 170 (-2:-50:-37.-41)
#> 171 (-2:-50:-30.-910)
#> 172 (-2:-50:-26.-30)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 173 (-2:-50:-21.-776)
#< 174 (-2:-50:-16.-979)
#> 175 (-2:-50:-12.-433)
#> 176 (-2:-50:-8.-805)
<snipped>
#> 231 (-2:-43:-35.-287)
#> 232 (-2:-43:-30.-490)
#> 233 (-2:-43:-26.-278)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 234 (-2:-43:-24.-25)
#> 235 (-2:-43:-19.-20)
#> 236 (-2:-43:-11.-221)
#> 237 (-2:-43:-5.-799)
#> 238 (-2:-42:-59.-167)
#> 239 (-2:-42:-54.-996)
<snipped>
#> 290 (-2:-36:-46.-44)
#> 291 (-2:-36:-30.-654)
#> 292 (-2:-36:-25.-148)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 293 (-2:-36:-22.-771)
#> 294 (-2:-36:-15.-514)
#> 295 (-2:-36:-12.-886)
#> 296 (-2:-36:-10.0-8)
<snipped>
#> 835 (-1:-11:-56.-293)
#> 836 (-1:-11:-52.-289)
#> 837 (-1:-11:-42.-780)
#> 838 (-1:-11:-24.-720)
Detected 0 forced captions.
WARNING: end time of frame 1 < start time -> fixed
WARNING: duration of frame 1 is shorter than 500.5ms
WARNING: start time of frame 2 < end of last frame -> fixed
Decoding frame 1/838 at offset 0x00000559
No problem with display but the subtitle stream is useless to hardcode into a 720p recode for streaming via a MKV container.
Ideas on resolving are certainly welcomed, since this and Dragon Tattoo are subtitled movies I regularly watch.
Kurt
kws53
12th February 2011, 16:45
Using the current version of EAC3TO [3.24] produces a faulty demux to .sup for both "Girl with Dragon Tattoo" and "Girl who Played with Fire" BluRay disks. This results in the RIGHT timing code for the first subtitle but craps out for the remaining ones - see my previous post for details.
The solution requires these steps:
1) Demux with tsMuxer to .sup
2) Demux with EAC3TO to .sup
3) Compare start time for first subtitle - if different [they were for "Girl who Played with Fire"] calculate the difference in ms [EAC3TO was correct]
4) Convert the tsmuxer .sup file using BDSup2Sub to .idx/sub using the DELAY from Step 3). My delay was almost 10SECONDS [9958ms].
Now the idx file can be hardcoded using Avisynth with VSfilter.dll and x264.
I was able to produce a superb 720p recode with hardcoded subtitles using this method.
Kurt
laserfan
12th February 2011, 18:39
You are saying in effect that the eac3to .sup was corrupt, and the tsmuxer .sup was not, but had a wrong start time which you corrected with BDSup2Sub? I'm curious of the tsmuxer demuxed .sup threw any errors when loaded by BDSup2Sub (apparently not)?
Sakura-chan
14th February 2011, 04:16
Hi!
I'm using this for the first time and I have one doubt. Where is the so-called "log" located? (is there any in the first place?). When I load certain BD SUP files it throws me 2 or 3 warnings and it tells me to see the "log". But I can't find it anywhere, only the .ini file with the program settings. Apparently the sub images are fine (haven't check 1 by 1, there are like 2000), but it worries me what the "warnings" could be or how can affect the subs. Great program btw, I have to use this to convert BD SUP files because SupRip is SERIOUSLY flawed, almost every SUP I try to open crashes the program at some point :(
Edit: Silly me, the log is the box on the left-bottom :P. The warnings always are: "multiple PDS/ODS definitions: result may be erratic". Should I worry? (I don't have the video here to test, but the lines that show the warning seem to be ok).
Edit 2: Well, that "PDS/ODS" thingy causes the next line to appear on top, where it should be on the bottom. Manually editing the frame (copying the "Y offset" from the next or previous frame) puts the frame back where it should be. Nothing too bad of a bug. I get two or three of these per SUP file (and not always). What's weird is that none of the lines has any weird effect or anything. They are all supposed to be plain lines appearing on the bottom of the screen. Screenies:
http://img37.imageshack.us/img37/7492/asdio.th.jpg (http://img37.imageshack.us/i/asdio.jpg/) http://img714.imageshack.us/img714/9136/asd2ru.th.jpg (http://img714.imageshack.us/i/asd2ru.jpg/) http://img821.imageshack.us/img821/4035/asd3o.th.jpg (http://img821.imageshack.us/i/asd3o.jpg/)
Also, what filter is the best? I'm converting the SUP subs to IDX/SUB (keeping everything intact) and all filters appear to have the same quality >.<
Honeyko
22nd February 2011, 00:35
Maybe I'm missing something right in front of me, but can BD handle multiple subs simultaneously?
(I am chiefly interested in retiming entire swaths of "tinny" PAL DVD subtitles to 23.976; and would really love an app would could demux anything DVDdecrypt generates.)
setarip_old
22nd February 2011, 02:14
Settings>>Conversion>>Change framerate - and, if needed, Convert resolution
Honeyko
22nd February 2011, 09:29
My sequence:
1. DVDdecrypt PAL DVD
2. VOBsub to extract idx and sub files.
3. Drag either idx or sub into BD ... while opening, get error "There were 25 warnings" (and only the first subtitle displays or saves).
Log (parts of it):
BDSup2Sub 4.0.0 - a converter from Blu-Ray/HD-DVD SUP to DVD SUB/IDX and more
0xdeadbeef 02-12/2009
Official thread at Doom9: http://forum.doom9.org/showthread.php?t=145277
Loading C:\Download\VTS_01_0.sub
WARNING: Language id fr(index:1) inactive -> ignored
WARNING: Language id de(index:2) inactive -> ignored
WARNING: Language id it(index:3) inactive -> ignored
WARNING: Language id es(index:4) inactive -> ignored
WARNING: Language id nl(index:5) inactive -> ignored
WARNING: Language id ar(index:6) inactive -> ignored
WARNING: Language id cs(index:7) inactive -> ignored
WARNING: Language id da(index:8) inactive -> ignored
WARNING: Language id fi(index:9) inactive -> ignored
WARNING: Language id el(index:10) inactive -> ignored
WARNING: Illegal language id: iw
WARNING: Language id iw(index:11) inactive -> ignored
WARNING: Language id hi(index:12) inactive -> ignored
WARNING: Language id hu(index:13) inactive -> ignored
WARNING: Language id no(index:14) inactive -> ignored
WARNING: Language id pl(index:15) inactive -> ignored
WARNING: Language id pt(index:16) inactive -> ignored
WARNING: Language id sv(index:17) inactive -> ignored
WARNING: Language id tr(index:18) inactive -> ignored
WARNING: Language id fr(index:19) inactive -> ignored
WARNING: Language id de(index:20) inactive -> ignored
WARNING: Language id it(index:21) inactive -> ignored
WARNING: Language id es(index:22) inactive -> ignored
WARNING: Language id nl(index:23) inactive -> ignored
# 1
# 2
# 3
...
# 521
# 522
WARNING: Invalid end sequence offset -> no end time
# 523
# 524
# 1108
# 1109
....
Detected 0 forced captions.
WARNING: end time of frame 522 < start time -> fixed
WARNING: duration of frame 522 is shorter than 520ms
Decoding frame 1/1109 at offset 0x0002e000
WARNING: duration of frame 522 is shorter than 500.5ms
Decoding frame 1/1109 at offset 0x0002e000
WARNING: duration of frame 522 is shorter than 500.5ms
Decoding frame 1/1109 at offset 0x0002e000
Writing C:\Download\VTS_01_0_exp.sub
Decoding frame 1/1109 at offset 0x0002e000
Decoding frame 2/1109 at offset 0x00042800
Decoding frame 3/1109 at offset 0x0005e800
...
Decoding frame 1108/1109 at offset 0x05c19800
Decoding frame 1109/1109 at offset 0x05c42800
Honeyko
22nd February 2011, 23:36
...does anyone have a solution for the problem indicated above?
Thanks....
Lighto
24th February 2011, 12:56
Hi there, I am kind of new at this and I am seeking help regarding the colour codes.
This is the current .sub I have.
http://i52.tinypic.com/2mq9993.jpg
I am aiming to change the colour to white with black shadow instead of the current black with light blue shadow.
I have found out that Edit > Edit DVD Frame Palette can change the colours.
But I could not figure out how to get my desired colours.
http://i56.tinypic.com/axffqb.jpg
The closest I got was this.
http://i54.tinypic.com/5mwgmo.jpg
I have also read the help documentation at javaforge but could not find any information that was specific to the colour codes.
Any help or comments regarding this issue will be deeply appreciated.:)
kws53
28th February 2011, 01:15
You are saying in effect that the eac3to .sup was corrupt, and the tsmuxer .sup was not, but had a wrong start time which you corrected with BDSup2Sub? I'm curious of the tsmuxer demuxed .sup threw any errors when loaded by BDSup2Sub (apparently not)?
No errors. Only reason I noticed the delay was that I remuxed and viewed the film with the subtitles. Obviously they didn't line up and I realized that the delay was identical to the difference between the EAC and Ts start times.
Kurt
TheProfosist
10th April 2011, 17:17
i know this is purely a conversion tool bnut since it reads both DVD and BD subs nearly perfectly i think it would be a good idea to integrate OCR support right into it. main reason being suprip has problems and misses lines this catches everything and i actually use it to get the missing lines manually. also when cvting to sub the resulting sub it rather hard to ocr (using subrip) as compared say normal dvd subs.
DoctorM
10th April 2011, 19:05
Hi there, I am kind of new at this and I am seeking help regarding the colour codes.
This is the current .sub I have.
I am aiming to change the colour to white with black shadow instead of the current black with light blue shadow.
I have found out that Edit > Edit DVD Frame Palette can change the colours.
But I could not figure out how to get my desired colours.
The closest I got was this.
I have also read the help documentation at javaforge but could not find any information that was specific to the colour codes.
Any help or comments regarding this issue will be deeply appreciated.:)
Just to be clear, are you looking to change the colors from their original style, or is the problem that when you loaded the subtitles into BDSup2Sub they came out looking wrong?
I ask because I see that your black subtitles are already using a custom palette.
If the original source's subtitles are the color you want, then go to that drop box along that top that says "Palette" and change it from 'create new' to 'keep existing'.
Lighto
11th April 2011, 02:29
Just to be clear, are you looking to change the colors from their original style, or is the problem that when you loaded the subtitles into BDSup2Sub they came out looking wrong?
I ask because I see that your black subtitles are already using a custom palette.
If the original source's subtitles are the color you want, then go to that drop box along that top that says "Palette" and change it from 'create new' to 'keep existing'.
The source .sub is actually white with black shadow, the problem is that vobsub somehow extracted it off with the wrong colour(black).
I am looking to change it to the colour it is suppose to be.
Chetwood
11th April 2011, 05:46
You can do this in Subtitle Creator.
pomaranc
21st April 2011, 16:47
is it possible to set the language of the output file with command line to the same language as the source file? something like /lang:keep does'nt work.
crackinhedz
7th May 2011, 16:09
3) Compare start time for first subtitle - if different [they were for "Girl who Played with Fire"] calculate the difference in ms [EAC3TO was correct]
4) Convert the tsmuxer .sup file using BDSup2Sub to .idx/sub using the DELAY from Step 3). My delay was almost 10SECONDS [9958ms].
This absolutely F'n worked!!! :goodpost:
But I used the 9958ms delay for "Girl With The Dragon Tattoo" [USA Bluray] and it synced perfectly!
I skipped the eac3to step entirely, and instead just added the delay using tsMuxeR.
Brilliant. This movie was giving me fits! I am so thankful you had the answer.
EDIT: I also used for "Girl who played with fire", and the timing is perfect! Thanks again
jmone
14th May 2011, 11:34
Out of interest what is the difference in SUP format used by HD-DVD compared to Blu-ray?
MilesAhead
15th May 2011, 22:19
Hmmmmmmm, I wonder if anyone would consider bundling BDSup2Sub in a java wrapper to facilitate use from batch mode on Windows systems that don't have a jre installed? I know there are some that claim to allow bundling a jre inside the executable. I do similar stuff with AHK and AutoIt3 scripts. But I'm not Java adept. I'm suggesting it because I don't see other command line tools for Windows that will take a PGS and output an idx/sub pair with resolution adjustment and language string.
SpaceAgeHero
22nd May 2011, 08:36
Hey guys,
when exporting forced subtitles from SUB/IDX to the same format is filtering (e.g. bilinear) applied,
thus actually changing subtitle quality?
If so, which filtering is default / recommended for SUB/IDX?
Thanks!
Hello. While I think BDsup2sub is a great tool for Vobsub-based stuff, i am going insane here with the SUP output: When i mux BDsup2sub (4.0.0) generated SUP files with TSmuxer into an Mpeg-TS container (can't use MKV, since there's this ugly bug with it not being able to handle 1080i at the correct framerate!), i have the problem that subtitles show for one frame and then disappear (using VLC 1.10 or 1.09). This is definately caused by BDsup2sub (and all the tools that use it, i tried easySUP and 3D Subtitler - the latter being the original source of the image files!), cause i demuxed a SUP subtitle that TSmuxer generated from a SRT and remuxed it as PGS with TSmuxer and it worked okay. But when i took that SUP file and put it through BDsup2sub (and remuxed that again with TSmuxer), the flickering started.
Can't be a VLC issue, since it shows the TSmuxer-made SUPs just fine...
According to some (one!) forum thread that I found, the problem seems to be that BDsup2sub clears the screen after each subtitle, and these screen clears are timed incorrectly.
I tried everything, went through IDX/SUB and BDN as an intermediate format (XML looked just fine), all to no avail, it still keeps flickering....
How can it be that nobody ever noticed this? Am I the only one using BDsup2sub in conjunction with TSmuxer? Or am I just doing something horribly wrong? :-) I did read all the help in BDsup2sub, but couldn't find anything about the clearing aspect...
I haven't been able to find any other free tool that generates SUP files, is there any? There's only the commercial DualSUP and SupConverter from Defsoft, but I have no idea if they can fix this, since BDN (xml/png) import does not work in the free version...
Edit: I did try playing it on the Boxee now. The Boxee does show the BDsup2sub-generated PGS subtitles (longer than one frame), but it's still somewhat b0rked: Every now and then the outlines or a semi-transparent version of the subtitle remain on the screen, or they get displaced somewhere, when this happens it also skips the following subs for a few seconds. TSmuxer-made PGS subs work perfect OTOH!
MilesAhead
10th June 2011, 00:41
Try playing in WMP 12. It will display PGS subs. At least it's another test to verify the fault location.
edit: if you're on Windows platform. You don't specify.
kaid
10th June 2011, 11:43
I'm usually not on Windows, no, though I do have to use it for 3D Subtitler. And it's not so much a matter of playing the file, but more that there seems to be something wrong with BDsup2sub-made SUP files...
P.S: I did try WMP Classic with all codecs installed, but It wouldn't play any PGS subs in a TS stream... Though it did show the time, which in turn VLC doesn't!
MilesAhead
12th June 2011, 23:43
It's difficult for me to tell if PGS subs are acting up in VLC since every version 1.0 and later seems to want to disappear as soon as I touch it. Even sometimes I start a video and don't even mouse over, but when the subs come on, it goes away. Too flaky for me to use since they put in the PGS and XSubs support. Don't understand why. It used to be rock solid. I even tried to clean everything off and put on an old version that used to work. Still no dice.
soneca
17th June 2011, 13:54
This is an indication of an error authoring blu-ray?
Cause subtitles are not corrupt ...:confused:
http://i131.photobucket.com/albums/p305/soneca1/Forum/bdsup2sub.jpg
Loading D:\DEMUX\00000.track_4608.sup
#> 1 (00:00:55.138)
#> 2 (00:01:07.985)
#> 3 (00:01:10.946)
#> 4 (00:01:15.492)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 5 (00:01:18.620)
#> 6 (00:01:24.001)
#> 7 (00:01:57.868)
#> 8 (00:02:00.245)
#> 9 (00:02:04.124)
#> 10 (00:02:07.169)
#> 11 (00:02:11.465)
#> 12 (00:02:17.846)
#> 13 (00:02:21.975)
#> 14 (00:02:25.354)
#> 15 (00:02:32.986)
#> 16 (00:02:36.990)
#> 17 (00:02:41.495)
#> 18 (00:02:45.582)
#> 19 (00:02:51.630)
WARNING: multiple PDS/ODS definitions: result may be erratic
#< 20 (00:02:55.258)
#> 21 (00:03:05.852)
#> 22 (00:03:09.356)
#> 23 (00:03:28.041)
#> 24 (00:03:32.129)
#> 25 (00:03:35.048)
WARNING: multiple PDS/ODS definitions: result may be erratic
crackinhedz
18th June 2011, 23:52
Soneca, try demuxing your subtitle (.sup) file using tsMuxeR ...Im assuming you are using eac3to? It gave me same problem, so running through tsMuxeR fixed.
Not sure why though?
soneca
20th June 2011, 15:20
Thanks crackinhedz.
TSmuxer has a bug when resizing some subtitles to 720.
Using bdsup2sub the problem was solved.
jd213
27th June 2011, 13:59
Is there a way to prevent subtitles from disappearing and then reappearing when a subtitle with overlapping times appears on the screen (like when a person offscreen is talking at the same time as the main dialogue)? I guess this is due to BDsup2sub clearing the screen after each subtitle like kaid mentioned.
Ice009
18th July 2011, 15:36
Hey guys, someone suggested I use this program in another forum.
I am trying to back up my HD-DVDs to .MKV files, but I can't seem to get the subtitles to work.
I have made an .MKV file with MakeMKV that includes the main movie, audio and english subtitles then encoded that with handbrake. The subs don't work in Mpc-HC or VLC even though I have them enabled. I was told I had to convert them to another format as they are extended vobsub (whatever that means).
I was told to get MKVtoolnix and extract the subs, which I did with MKVExtractGUI2 and that gave me .idx and .sub files. I tried to load up the .sub file with BDSupto2sub and I keep getting an error saying "Invalid control buffer size". I've tried this with two different movies and it keeps giving the same error.
Am I doing it completely wrong?
jd213
19th July 2011, 06:29
I never had any problems converting HD DVD .sub files with BDSup2Sub after I demuxed the HD DVD using eac3to, see if you can try that.
Ice009
19th July 2011, 15:14
I never had any problems converting HD DVD .sub files with BDSup2Sub after I demuxed the HD DVD using eac3to, see if you can try that.
Thanks for the reply. How do you Demux it with eac3to? Does eac3to have a GUI?
I've only just started doing all this stuff about a week ago.
Killroy™
19th July 2011, 15:22
Thanks for the reply. How do you Demux it with eac3to? Does eac3to have a GUI?
I've only just started doing all this stuff about a week ago.
GUIs will create you more problems than they solve. Stay with command line for perfect function.
eac3to {disc location} {disk destination} -demux
Ice009
19th July 2011, 16:54
GUIs will create you more problems than they solve. Stay with command line for perfect function.
eac3to {disc location} {disk destination} -demux
So am I demuxing directly from the HD-DVD itself? Do I need to run anything like AnyDVD?
Also, what you wrote is kinda foreign to me. What is the disk location? The HD-DVD drive?
Killroy™
19th July 2011, 17:02
So am I demuxing directly from the HD-DVD itself? Do I need to run anything like AnyDVD?
You will need AnyDVD-HD if you haven't decrypted (ripped) the disc to your hard drive. I prefer to do it directly from the disc since it eliminates an extra step (ripping to hard drive) although it is a little slower.
Ice009
19th July 2011, 17:05
You will need AnyDVD-HD if you haven't decrypted (ripped) the disc to your hard drive. I prefer to do it directly from the disc since it eliminates an extra step (ripping to hard drive) although it is a little slower.
Well I've used MakeMKV to extract it to the HDD in the .Mkv container. Can you demux that or should I be doing it directly from the HD-DVD.
I'll have to install AnyDVD-HD.
Edit : If you have time to explain it step by step that would be appreciated as I have no idea how to do it.
Killroy™
19th July 2011, 17:10
Well I've used MakeMKV to extract it to the HDD in the .Mkv container. Can you demux that or should I be doing it directly from the HD-DVD.
I'll have to install AnyDVD.
That makes things more complicated... if your MKV kept the sub track in a native format then MKVcleaver (a mkvextractor GUI, but a good GUI) should be able to give you the raw files....but I suggest doing it directly from the disc since MakeMKV does funky things to files.
jd213
20th July 2011, 00:49
Well I've used MakeMKV to extract it to the HDD in the .Mkv container. Can you demux that or should I be doing it directly from the HD-DVD.
I'll have to install AnyDVD-HD.
I believe DVDFab Passkey also works with HD DVDs now, and the free Lite version might as well.
asarian
13th September 2011, 19:21
Soneca, try demuxing your subtitle (.sup) file using tsMuxeR ...Im assuming you are using eac3to? It gave me same problem, so running through tsMuxeR fixed.
Not sure why though?
Yes, I can confirm this. Eac3to, whilst otherwise a great program, often totally messes up the timings of the SUP files; whereas tsMuxeR extracts them perfectly.
P.S. Does does prog ever gonna get updated? Or is the project dead?
Weirdo
24th September 2011, 08:33
Sorry if this has been answered before, but is there a way to batch convert multiple subtitles? It's a great tool, but when there are many subs to convert I think a lot of time could be saved.
cafevincent
5th October 2011, 13:14
I'm getting an error from the .sup files I extracted, it says they're not supported.
edit: specifically the error message is this: ERROR: File 'D:\Downloads\Remux\AMBRA EXPERIENCE\00009.track_4353.sup' is not a supported subtitle stream. There was 1 error
It outputs the same error for each file.
Nincs
24th November 2011, 21:11
>> Current version: 4.0.0 (14.12.2009)
>> http://www.sendspace.com/file/j3df4s
That download is corrupted. It is states: "File Size: 700.02KB". But the file is 484 KB.
mbcd
1st December 2011, 17:20
Could someone give me a hint please how I can perform a speedup from 23,976 to 24.000 on CLI?
I speeded up video from 23,976p to 24p and also audio. That works fine. But I didnt get subtitles synced to 24p.
I always tried: fps:23.976,24.000 but they are still unsync (a little bit too slow on screen)
I got them synced in idx/sub, but NOT in sup ...
Superb
1st December 2011, 17:24
>> Current version: 4.0.0 (14.12.2009)
>> http://www.sendspace.com/file/j3df4s
That download is corrupted. It is states: "File Size: 700.02KB". But the file is 484 KB.Mirrors from local copy:
http://www.sendspace.com/file/e1dfg0
http://www.megaupload.com/?d=M7502ARA
scrolling
6th December 2011, 19:12
I'm trying to get this program to work however I'm failing missable. I'm sure it I'm doing something wrong. I have down loaded Java RUNTIME 6 (http://www.java.com/en/download/manual.jsp?locale=en) and installing on a Windows XP system. Everything seems to go smoothly accept when I start up BDSUP2SUB a CMD window appears than goes a way. Any help would be greatly appreciated.
DoctorM
6th December 2011, 20:08
Could someone give me a hint please how I can perform a speedup from 23,976 to 24.000 on CLI?
I speeded up video from 23,976p to 24p and also audio. That works fine. But I didnt get subtitles synced to 24p.
I always tried: fps:23.976,24.000 but they are still unsync (a little bit too slow on screen)
I got them synced in idx/sub, but NOT in sup ...
I'm assuming you're using Settings/Conversion Settings, checking "Change Frame Rate" setting the source to 23.976 and the target to 24.
If that's still giving you slightly slow try setting the source to 23.975.
@scrolling: Um, you got me. Usually I'm the one that gets weird problems no-one else does.
mbcd
8th December 2011, 13:57
There are still many bugs using Frameratecconversion, that why I never got a strait result.
Problem is you get different results using CLI and GUI ... :scared:
For speedup from 23.97 to 24.0 you dont need to do anything, timecodes are still in 24.0, but I dont understand how they are sohwed correctly in 23.97 mode. Does the Player skip every "1001"- Subtitleframe ? Timecodes are the same for 23.97 and 24.0.
I dont understand how its been recognized correctly by the player.
LeXXuz
19th December 2011, 14:01
Hey guys,
I could use some help with these subtitles:
http://img6.imagebanana.com/img/rqc7qrsu/thumb/tr2_1.png (http://www.imagebanana.com/view/rqc7qrsu/tr2_1.png)http://img6.imagebanana.com/img/9d32x2ry/thumb/tr2_2.png (http://www.imagebanana.com/view/9d32x2ry/tr2_2.png)
It's from the German Tomb Raider 2 Blu-ray, with narrative subtitles in the usual white colour scheme, and a couple of embedded forced subs in bronze colour (see pics).
I already removed the forced subs to use them as a standalone track as vobsubs, but I can't manage to get the colours right.
I played around with the DVD colour palettes, but it didn't work at all, because outline and text seems to be converted to the same colour which should not happen.
Any ideas how to solve this?
nurbs
19th December 2011, 16:56
IIRC vobsubs support a maximum of 4 colors and one of them is for the transparent area, so you simply don't have enough colors to properly convert the Blu Ray sups.
mjuhasz
6th January 2012, 22:12
BDSup2Sub development seems to be discontinued and my attempt to contact the original author failed.
I have worked on the project to fix a few issues and today I made a small bugfix release.
Download link (https://github.com/downloads/mjuhasz/BDSup2Sub/BDSup2Sub.jar)
BDSup2Sub github page (https://github.com/mjuhasz/BDSup2Sub) (for developers):
Changes 4.0.0 -> 4.0.1:
Fixed: Flashing subtitles - if the end time of the current subtitle picture is beyond the start time of the next one the subtitle was set to zero length.
Fixed: Resolution incorrectly read from the dvd ifo file in cases other than 720x576/720x480 16:9.
Fixed: Incorrect (too short) subtitle duration for dvd subtitle frames using subtitle effects
Guest
6th January 2012, 22:30
@mjuhasz
Welcome to the forum and thanks for your contribution.
HeartWare2
7th January 2012, 10:18
Could this program be updated to allow conversion into 3D SBS- and TAB-compatible subtitles (ie. a squashing of the subtitles to half size (half width for SBS and half height for TAB), and then duplicating the subtitle on the other part of the picture at the same position)? That would allow me to keep subtitles on my converted 3D movies and play them back on my PopCorn Hour C-200.
Or does someone know of any program that can do this?
Chetwood
7th January 2012, 13:15
Nice job!
kristian65
29th January 2012, 12:53
Hello i have a small question i need help with
I wanted to have forced subs on a BD so i forced all on the title BUT i didnt check any other boxes then i saved it as BD
After i open it again then i see the frame rate was set to 25 not 23.97 as its on the original????
Ghitulescu
30th January 2012, 15:00
What is "Index 0 is out of bounds"?
Whogie
4th February 2012, 01:33
May I make a feature request: A 720p- (960x720) "Convert resolution" option in conversion settings (or maybe a custom resolution option).
It would seriously relieve a headache I'm encountering with something I'm trying to rip and downsample. Thank you.
Edit:
BDSup2Sub development seems to be discontinued and my attempt to contact the original author failed.
Oh. Damn.
Selur
4th February 2012, 06:38
btw.: does any one have a checked out version of the source code? (the clone option over at http://www.javaforge.com/repository/2997/files seems to be disabled)
okay, overlooked the move to github
eTiMaGo
11th February 2012, 11:18
What is "Index 0 is out of bounds"?
Having the same problem here, trying to put some DVD subtitles into a Blu-ray, but I just can't open them in BDSup2Sub (not to mention MultiAVCHD takes a crap when trying to remux)
Funnily enough this only seems to happen with subtitles in Thai, I tried with English ones off the same disc, no problems.
I tried all manners of other Sub editing/viewing softwares to re-export, hoping this software could read it, but to no avail :(
Here is an example if anyone wants to give it a go:
http://dl.dropbox.com/u/1600280/thai.sup
mjuhasz
11th February 2012, 22:31
You're missing the ifo file. Just copy it from the dvd and load that one instead of the sup.
The HD-DVD-SUP and the DVD-SUP format share the same header and BDSup2Sub needs a way to decide in which format the sup file should be interpreted. Currently it works as follows:
- if there is an ifo file with the same name as the sup (foo.ifo, foo.sup) AND you load the ifo file then BDSup2SUB will interpret the sup as DVD-SUP format and take some additional info (resolution, color-palette, etc.) from the ifo since it's not part of the sup file.
- if you load the sup then by default it is interpreted as HD-DVD-SUP
You tried to load a dvd sup file as a hd-dvd one hence the error message.
I am working on cleaning up the code and creating tests in order to make it easier to fix bugs, make improvements or even add new features. This is a tedious task and my free time is limited but eventually I'll get there.
I have added an improvement issue to github so that we can track the progress: https://github.com/mjuhasz/BDSup2Sub/issues/4
Having the same problem here, trying to put some DVD subtitles into a Blu-ray, but I just can't open them in BDSup2Sub (not to mention MultiAVCHD takes a crap when trying to remux)
Funnily enough this only seems to happen with subtitles in Thai, I tried with English ones off the same disc, no problems.
I tried all manners of other Sub editing/viewing softwares to re-export, hoping this software could read it, but to no avail :(
Here is an example if anyone wants to give it a go:
http://dl.dropbox.com/u/1600280/thai.sup
Chetwood
12th February 2012, 09:32
Cool. Maybe you could add the option to switch between streams?
eTiMaGo
12th February 2012, 12:10
You're missing the ifo file. Just copy it from the dvd and load that one instead of the sup.
The HD-DVD-SUP and the DVD-SUP format share the same header and BDSup2Sub needs a way to decide in which format the sup file should be interpreted. Currently it works as follows:
- if there is an ifo file with the same name as the sup (foo.ifo, foo.sup) AND you load the ifo file then BDSup2SUB will interpret the sup as DVD-SUP format and take some additional info (resolution, color-palette, etc.) from the ifo since it's not part of the sup file.
- if you load the sup then by default it is interpreted as HD-DVD-SUP
You tried to load a dvd sup file as a hd-dvd one hence the error message.
Thanks!!!!! I guess I misunderstood and thought it worked like with BD subs, only the .sup is required. doh!
Pawpcorn
7th March 2012, 14:57
Am I the only one receiving this message???
C:\Users\Gerald>java -jar BDSup2Sub.jar
Invalid or corrupt jarfile BDSup2Sub.jar
I installed the JRE version 6 - 31... and I get this message when trying to open the BDSup2Sub.jar file!
I'm running Windows 7... all legit.
Same thing happened with JRE version 7....
I hope someone can help me, because I desperately need the functions this program delivers. Thanks!!
jmonier
7th March 2012, 15:55
There have been problems generally with 6 - 31. The solution is to make sure that any service using Java (such as SageTV) is stopped and then to uninstall and reinstall that version. The same may be true of version 7 but I have not tried it.
Note that letting the Java install stop Java programs has worked fine with previous versions but it does not work right with 6 -31 (at least for those that run as a service) so it's best to close ALL Java programs and services prior to doing the upgrade.
And, although I don't use BDSup2Sub anymore (since vsfilter now supports sup and pgs), I just tried it and it worked fine with 6 - 31.
r0lZ
27th March 2012, 13:15
Am I the only one receiving this message???
C:\Users\Gerald>java -jar BDSup2Sub.jar
Invalid or corrupt jarfile BDSup2Sub.jar
I have the same problem, but only with BDSup2Sub v4.0.0. The older versions work fine.
What's wrong with v4? Does it require a specific version of the Java runtime?
mjuhasz
1st April 2012, 12:08
BDSup2Sub does not require any specific version of the Java runtime. Java 6 should be fine.
As for other versions, Java 5 is End-Of-Life hence unsupported, and Java 7 is not tested with version 4. There is ongoing development on github (https://github.com/mjuhasz/BDSup2Sub) and for the next release testing is planned on the Oracle JRE and OpenJDK, version 6 and 7, on platform Linux, Mac OSx and Windows. No timeline though.
At the moment I don't have access to a Windows 7 machine to reproduce the issue. I tried on a Window 2008 Server with Oracle JRE 6 and it worked. I also tried to run BDSup2Sub on Linux on the Oracle JRE 6, OpenJDK 6 and Oracle JRE 7 and they all worked. I will try to find a Windows 7 host to reproduce the issue.
laserfan
1st April 2012, 16:15
I don't understand the invocation used. I just launch BDSup2Sub.jar and it works, but if I try Pawpcorn's line it looks like this:
C:\Program Files (x86)\BDSup2Sub>java -jar BDSup2Sub.jar
'java' is not recognized as an internal or external command,
operable program or batch file.
Atak_Snajpera
2nd April 2012, 19:09
you have to specify full path to java.exe
C:/... /java.exe -jar ...
Rectal Prolapse
5th April 2012, 01:50
mjuhasz, any plans to fix the rendering bugs with regards to multiple region subtitles? (Please see my thread for my C++ solution that could give you some ideas on approaching the problem - although I don't think I deal with PGS cropping properly but that issue will be saved for another day)
mbcd
5th April 2012, 10:40
Which thread did you mean ?
I wrote a parser by myself last months, but I coudnt sold problem with multiregion in BDN/XML because I didnt found an example. So I stopped developing for a while and started another project until I found a solution for it.
You got one ?
mjuhasz
5th April 2012, 17:58
mjuhasz, any plans to fix the rendering bugs with regards to multiple region subtitles? (Please see my thread for my C++ solution that could give you some ideas on approaching the problem - although I don't think I deal with PGS cropping properly but that issue will be saved for another day)
I checked your thread but the download links are unavailable. Can you upload it and share it with me? A sample file would also be handy. I will create an issue in the github tracker with referencing your work then.
I am in the middle of doing code cleanup and refactoring, adding unit tests, etc. Once the codebase is more solid I can look into multiple region subtitles.
Rectal Prolapse
5th April 2012, 23:23
mbcd: Oh, I was talking about the rendering of multiregion PGS in the PNG output - the code does not yet output the proper BDN/XML where a PNG for each region is generated and the BDN code references the different regions. I will have to review the BDN specification again to get this right!
mjuhasz, I will look into updating the links again.
Rectal Prolapse
5th April 2012, 23:36
Okay I updated the link to the source code in the first post of this thread:
http://forum.doom9.org/showthread.php?t=164370
(mbcd, you can check out the code there)
mbcd
6th April 2012, 07:22
Yes, sorry, was a little bit confused.
BDSup2Sub is not able to handle multiregion for BDN/XML right now. So I wondered about fixes.
We need a proper solution for BDN/XML, but hard to find.
Output of proper XML should be the next goal, it is confusing if programs are able to read multiregion but throwing them away on converting.
@ mjuhasz:
I always have big problems with converting framerates in BDSup2Sub, maybee you could check that code too. I`m not familiar enough with java or c++
Rectal Prolapse
7th April 2012, 06:46
Oh - I forgotten that I had this document - AFAIK it is a publicly available document from Sony, and I archived it here:
http://dl.dropbox.com/u/1156664/BDN-OFS-Formats.zip
I'll have to go over this and make the necessary changes for proper BDN support with multiple regions. At any rate, I hope you guys will find this usefull too!
Mr Magic
13th April 2012, 14:22
I have the same problem, but only with BDSup2Sub v4.0.0. The older versions work fine.
What's wrong with v4? Does it require a specific version of the Java runtime?
The download for 4.0.0 on Sendspace is corrupt. It says the file is 700 KB but you only get 484 KB.
Try the download from VideoHelp, it worked for me:
http://www.videohelp.com/download/BDSup2Sub400.jar
r0lZ
13th April 2012, 14:56
Thanks! :-)
rayyu882
14th April 2012, 22:10
Hi, I got the same "IndexOutOfBoundsException" error like the previous poster (http://forum.doom9.org/showpost.php?p=1450854&postcount=767) when I tried to convert the Avatar blu-ray Na'vi subtitles, but I couldn't find a solution. I tried 2 different computers and BDSup2Sub version 400 and 401, still no luck, is there any workaround? or other tool I could use to convert this so I can remuxing the mkv file for handbrake?
Any help would be greatly appreciated, Thank you so much!
sneaker_ger
14th April 2012, 22:40
Try loading with AviSynth's SupTitle() plug-in, then use avs2bdnxml to create bdn+xml and open that in BDSup2Sub.
bunklung
15th April 2012, 13:38
The download for 4.0.0 on Sendspace is corrupt. It says the file is 700 KB but you only get 484 KB.
Try the download from VideoHelp, it worked for me:
http://www.videohelp.com/download/BDSup2Sub400.jar
Same thing here. I was using an older version, until I found 4.0.0 inside of Clown_BD
Maybe OP can fix the corrupted file?
mjuhasz
16th April 2012, 06:30
I got the same "IndexOutOfBoundsException" error like the previous poster
If you share the file with me then I will check the issue.
The download for 4.0.0 on Sendspace is corrupt. It says the file is 700 KB but you only get 484 KB.
You can get the latest BDSup2Sub v4.0.1 from here (https://github.com/downloads/mjuhasz/BDSup2Sub/BDSup2Sub.jar):
You can read about the changes here (http://sw-planet.blogspot.com/search/label/Open%20Source).
shroomM
18th April 2012, 07:30
Seeing as the mjuhasz is active here, I'm posting this here as well. Just in case the GitHub issues section is not monitored :)
It's an issue with loading specific SUP files.
Link to the GitHub issue:
https://github.com/mjuhasz/BDSup2Sub/issues/5
Sorry for the cross linking.
mjuhasz
18th April 2012, 19:47
Seeing as the mjuhasz is active here, I'm posting this here as well. Just in case the GitHub issues section is not monitored :)
It's an issue with loading specific SUP files.
Link to the GitHub issue:
https://github.com/mjuhasz/BDSup2Sub/issues/5
Sorry for the cross linking.
I received the automatic email from GitHub. Thank you for creating the issue and sharing the sample file.
I had a brief look and indeed, it's a format BDSup2Sub is not prepared for. I will try to fix it in the next minor release.
Cheers,
Miki
Atak_Snajpera
30th April 2012, 13:34
error message after loading dvd subtitles
http://i.imgur.com/Ipbtv.png
subtitles -> http://www.mediafire.com/?xg9oulfvj9eacpf
this only happens if X is larger than 15.
# Language index in use
langidx: X
Pawpcorn
8th May 2012, 18:58
Am I the only one receiving this message IN THE "JAVA VIRTUAL MACHINE LAUNCHER" box ???
C:\Users\Gerald>java -jar BDSup2Sub.jar
Invalid or corrupt jarfile C:\Users\Gerald\Downloads\BDSup2Sub.jar
I installed the JRE version 6 - 31... and I get this message when trying to open the BDSup2Sub.jar file!
I'm running Windows 7... all legit.
Same thing happened with JRE version 7....
just discovered that I must have downloaded a corrupt version!!!! NEW 4.00 or 4.01 versions, just downloaded, work fine!!! Thanks guys!!!
4.00 or 4.01 versions Not work with JRE version 7 and not render correct some parts of subtitle some line have a black background
I need to move all subpics to the left or to the right by a certain offset. In other words, I need to add or subtract a few pixels to the current X position of the subpic. (I know that it is possible to move the subpics to the left or right border and then apply an offset, but that's not what I need.)
I need this because I would like to write a GUI to convert a BD 3D to a side-by-side or top/bottom video file. The GUI will use BDSup2Sub, AviSynth and VSFilter's VobSub() function to hardcode the subtitle on the video. It is important to be able to show the subtitles with a 3D depth effect, so that they appear on top of the objects moving out of the screen. To archive that effect, it is sufficient to move the subtitle of the left eye view by some pixels to the right, and the subtitle of the right eye view to the left, but unfortunately, there is no way to tell VobSub to shift the subtitles a little bit.
I have already found a solution by cropping a bit the video before applying the subtitle and then restoring the cropped part, but this has also the effect to shrink the subtitles in X (as the width of the video is less than its original width and VobSub compensates automatically), and that method slows down the Avisynth script rendering.
0xdeadbeef, can you add an option to apply the X (and Y) offsets to the current subtitle position? (Of course, I need that option available from the command line.)
SassBot
24th May 2012, 15:57
For anyone interested, I've been spending the last few days porting deadbeef's last version of BDSup2Sub to C++/Qt. At this point it's maybe 25% done. Source code is here. (https://github.com/amichaelt/BDSup2SubPlusPlus)
Pawpcorn
24th May 2012, 16:43
Well, I would certainly want to wish you god luck on this project! I use BDSup2Sub every week to resolve a 1080p subtitle into PAL DVD 720 x 576 format, and adjust VOB subtitle sizes and positioning.
If you could also figure out how to show which color blocks ("color 1", "color 3" for example) were assigned to the Character, Outline, and Background... And give us the ability to reassign it, that would be fantastic.
Every week I create a DVD movie for my Thai students, with dual subtitles... And often the color block assignments are in conflict (such as the same color block being used for Character on one subtitle, and Outline, on the other).
This kind of color block cross asignment cannot be fixed in PgcEdit, but thoretically can be fixed using SubtitleCreator.
The problem THERE is that development on SC ended in 2008, and (using Windows7 and Thai VOB (idx/sub) subtitles in) SC often trashes some of the graphic subtitles.
Subtitle creator also crashes if fed a 1080p subtitle.
Anyway... Good Luck!!!! BDSup2Sub is an invaluable tool, and if you could duplicate its functions (and maybe add a couple new features such as I suggested above) I'm sure you would have many grateful users!
Take care,
Pawpcorn
SassBot
24th May 2012, 16:59
Yeah, it's going well. Most of the code can be copy-and-pasted over. Most of the hard translation, such as the internal bitmap class to using Qt's QImage class is already done. And yeah, once I get it feature-matching I can look into extending. I'm hoping to be done mid next week unless I hit snags. Right now, DVD idx/sub and ifo/sup decoding is done. Working on getting BD and HDDVD docoding done today along with as much output code as I can as well.
Right now, the code is a little messy due to lots of copy-and-paste and stubbing so the organization will be in flux for a while.
This kind of color block cross asignment cannot be fixed in PgcEdit, but thoretically can be fixed using SubtitleCreator.
You can also fix them on the final DVD with DVDSubEdit.
@SassBot: I wish you good luck too! I hate java apps (although I must agree that BDSup2Sub is a good and useful app!)
And I add my suggestion. ;-)
Could you consider to add the possibility to shift the subtitles in X or Y by a certain amount of pixels? (See my request here (http://forum.doom9.org/showthread.php?p=1574490#post1574490).)
SassBot
24th May 2012, 17:05
Yeah, I saw that. File it as a feature request on the github page. Anyone else do the same.
Thanks. BTW, your link above is broken. This one is OK: https://github.com/amichaelt/BDSup2SubPlusPlus
SassBot
24th May 2012, 17:15
Yeah, I noticed that then fixed the post.
Pawpcorn
25th May 2012, 04:18
You can also fix them on the final DVD with DVDSubEdit.
@r0lZ, thanks for the suggestion! I gave DVDSubEdit a try, and it worked perfectly, without corrupting the Thai subtitles, the way SubtitleCreator had done.
Thanks!:thanks:
Pawpcorn
Chetwood
25th May 2012, 06:24
Just so it doesn't get missed: when extenting features please allow it to open VobSubs containing several languages. Thx.
Pawpcorn
25th May 2012, 06:33
Just so it doesn't get missed: when extenting features please allow it to open VobSubs containing several languages. Thx.
I'll second that request.... Thai seems to be a particularly difficult language to display and/or resolve....
Let me know if you need a Thai subtitle. :)
Take care,
Pawpcorn
SassBot
25th May 2012, 13:10
Put your requests on the issue list (https://github.com/amichaelt/BDSup2SubPlusPlus/issues), please. Then it won't get lost. :)
Chetwood
26th May 2012, 06:18
Can't, some moron took my nick. Never happened to me before.
SassBot
30th May 2012, 22:46
So I have import and export fully done. Now just need to finish all the conversion options.
Pawpcorn
31st May 2012, 05:56
Nice to hear! Good luck on the continued coding!
SassBot
8th June 2012, 14:49
Just another quick update. I've implemented almost all functionality except CLI, logging and writing out the INI settings. So hopefully it should be ready to be tested early next week.
SassBot
14th June 2012, 17:21
So the code is a bit messy right now, some classes will be refactored out and I'm sure there are a few benign memory leaks and a few cosmetic changes like updating the notes in the help, but I've finished the porting enough to post a test executable for Windows in a couple of hours once I get a static version of Qt compiled. I'll then look into some Linux executables but compiling this will require GCC 4.7 since I use a number of C++11 features so supporting older versions of distros without a current GCC will be too much work for me. Also, if anyone with a Mac would want to compile an executable for OS X that would be appreciated.
Anyone who wants to compile for themselves, the github link is here (https://github.com/amichaelt/bdsup2subplusplus/).
SassBot
14th June 2012, 21:40
So there were a few hangover bugs that I just caught and fixed. The source changes aren't pushed to github yet but here is a beta version.
Also to note: This will read and import the program and palette INI files from the oringinal program, but will rename the program INI to bdsup2sub++.ini. So to continue using your old BDSup2Sub.ini file just drop it in the directory with the new executable.
In my tests, I'm getting binary identical output for all files I've imported and converted so please report any bugs in the GUI, output differences (with attached files, please), crashes, etc.
r0lZ
14th June 2012, 23:06
libgcc_s_sjlj_1.dll is missing.
SassBot
15th June 2012, 00:05
Oops. Forgot the compiler flag to statically link that so I'm still learning all the options since it's the first time I've really used MinGW over MSVC++. Will post a new executable later.
DoctorM
15th June 2012, 00:13
@SassBot- There is a bug in the original I don't know if anyone else has seen.
Subtitles generated (at least in NTSC DVD) have an issue where ever other subtitle line will jitter up and down 1 line on screen when displayed.
It has something to do with the way BDSup2Sub crops, because even just loading subtitles and then saving them again will cause this to happen. (I tested this to rule out resize algorithms.)
I've tried different stand alone DVD players and different TVs and it's still present.
However, it doesn't seem to be noticeable when viewing a DVD with these subs on a PC.
Maybe you'll trip across something weird in the code that causes this. I've found BDSup2Sub to have limited use as a result.
SassBot
15th June 2012, 16:12
I've not seen that. Can you post sample files so I can look into it?
r0lZ
15th June 2012, 16:40
With Jeanl, I have tried to understand a similar problem with DVDSubEdit. My DVD player showed many cropped subtitles with dots or lines above or below the subpic. We haven't been able to fix completely that problem, but it was clear that it happened often when the subpic was moved or cropped by an odd number of lines. Since the problem reported by DoctorM seems related to interlaced video material (due to the jitter), I think it may have a similar origin. Perhaps cropping the subpic only at even lines and/or moving it in Y by multiple of 2 only is sufficient to avoid the problem. But I have never experienced that problem here (in PAL land) so, of course, I can't be sure.
SassBot
15th June 2012, 17:02
Yeah, that sounds probable. I'll look into that. Still working out the building to get everything statically linked properly. It's a bit more complicated than with MSVC.
SassBot
15th June 2012, 18:01
Ok new executable is here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z). i tested on a machine without MinGW and it opened fine. Source code on Github has some bugs so don't use that till I merge the fixes tonight that are in this build.
Report any issues with this. :-)
Also, r0lz, I'm working on the change you requested now.
SassBot
17th June 2012, 00:44
error message after loading dvd subtitles
http://i.imgur.com/Ipbtv.png
subtitles -> http://www.mediafire.com/?xg9oulfvj9eacpf
this only happens if X is larger than 15.
# Language index in use
langidx: X
I've located the error with this and will push out a new version that has a fix for it. The problem was that the original code was trying to find the subtitle id by taking the byte that identifies the subtitle number and was doing a "& 0xf" when what it need to do was subtract 0x20 (since the subtitle id is made from doing 0x20 + index). The "& 0xf" works as long as the id isn't higher than 15 though, obviously, we can have id's up to 31. I'm searching to see if there is a duplication of this bug in the writing code as well.
SassBot
17th June 2012, 05:41
New version is here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z). It has a the fix for Atak_Snajpera's reported error and some additional fixes and bugs worked out.
Once again, please report any issues that you come across.
r0lZ
17th June 2012, 09:31
I haven't really tested it yet, but I have already integrated your ++ version in my GUI. It seems to work fine, but it opens briefly a console window each time it is launched (even if it is called with arguments and its GUI is never opened). It's only a cosmetic issue, but is it possible to hide the console completely (or at least open it in minimized state)?
Another, less important cosmetic thing: There is a BDSup2Sub.ico file included in the original jar file. Could you use it for your exe?
Desktop Integration (Icons)
While BDSup2Sub has an application icon, unfortunately, the default coffee cup of the Java Virtual Machine is used if you created yourself a desktop icon to start BDSup2Sub. This is because a JAR is always opened with the installed JVM and so you get the icon of the JVM, not the one of the application inside the JAR. Still it's possible to change the icon manually (at least in windows, but I assume this is the same in Linux and MacOS). For your convenience, not only the PNG picture (icon_32.png) used by the application is included in the JAR, but also an ICO file for Windows and an ICNS file for MacOS X. I don't know too much about Linux icons, but I's guess you should be able to use the PNG. Anyway, to extract these icons, simply rename the JAR to ZIP and extract the files.
r0lZ
17th June 2012, 10:54
Command line bug:
When the program is called from the command line with one or two filenames, the program seems to convert the filenames to absolute paths (even if a path has been provided), but it uses the linux-style directory separator / instead of \. As a consequence, BDSup2Sub++ issues a "File not found!" error dialogue.
Example:
cd "C:\dir containing the sup file"
bdsup2sub++.exe subtitle.sub
--> File 'C:/dir containing the sup file/subtitle.sub' does not exist
bdsup2sub++.exe "C:\dir containing the sup file\subtitle.sub"
--> File 'C:/dir containing the sup file/subtitle.sub' does not exist
BTW, I noticed that the original jar version supports well the unix-style directory separator in the command line:
java -jar bdsup2sub.jar "C:/dir containing the sup file/subtitle.sub"
--> works well
Since some GUIs may pass the filenames in unix format, when a file passed as argument cannot be found, perhaps you could try to convert the / to \ and open the file again. This will ensure a good compatibility with the java version.
Also, the error message is displayed in a dialog. As far as I know, it is not printed to stdout or stderr. Can you print it? It's important to check the errors from the GUIs.
It might also be a good idea to remove the dialogue when the program is launched with two file names, and exit with a non-zero return code, as in that case, it doesn't open its GUI, and it should work without any user interaction.
SassBot
17th June 2012, 12:08
The console window opening is a side effect of a Windows Qt app that can also be used as a CLI app. Nothing I can do about that. To get console support you have to add a config in the project for it but it means the console window is automatically launched under Windows. The icon part will be fixed too. I just wanted to make sure nothing was broken first. Looking into the CLI bug now.
SassBot
17th June 2012, 12:37
Ok, the CLI bug is just a simple parser error in the copied over code. The program supports Unix separators as that's why Qt converts all filepaths given as CLI arguments to anyway. This is also the reason the dialog printed out the code using Unix separators it was just that I missed calling the "toNativeSepartors" method in that spot so it doesn't look like the native Windows path. Also, the dialog shows up because of it assuming that if you are giving it a single file that you want the GUI launched with that file, this is a carryover from the original version, and for some reason that warning dialog is popping up before the main GUI shows up even though I tell it not to do so before the GUI is visible. That seems to be some weirdness with Qt. I'll have the CLI thing fixed shortly.
r0lZ
17th June 2012, 12:43
Perfect. Thanks!
mjuhasz
17th June 2012, 13:47
Ok, the CLI bug is just a simple parser error in the copied over code. The program supports Unix separators as that's why Qt converts all filepaths given as CLI arguments to anyway. This is also the reason the dialog printed out the code using Unix separators it was just that I missed calling the "toNativeSepartors" method in that spot so it doesn't look like the native Windows path. Also, the dialog shows up because of it assuming that if you are giving it a single file that you want the GUI launched with that file, this is a carryover from the original version, and for some reason that warning dialog is popping up before the main GUI shows up even though I tell it not to do so before the GUI is visible. That seems to be some weirdness with Qt. I'll have the CLI thing fixed shortly.
BDSup2Sub had another CLI bug I fixed in the meantime: it was not possible to define the input and output file path as absolute path under a Unix-like operating system (Linux, MacOSx, etc). Fixed in this commit (https://github.com/mjuhasz/BDSup2Sub/commit/1667f739ee3705ca27ec7e6272f7c953a2fa37cd#src/main/java/bdsup2sub/BDSup2Sub.java).
The check for '/' at the beginning was meant for detecting the beginning of an option definition but under a Unix-like operating system the slash is also the path separator.
I removed that condition and expect the source to come first and the target next (and then the options).
BTW, there's a snapshot in the downloads section (https://github.com/mjuhasz/BDSup2Sub/downloads) in case you want to test the latest codebase.
I also wanted to compile a Linux version of your C++ code but it seems you use some C++11 features with which g++ is a bit unhappy. I'll look into that later. Nevertheless, very nice job!
SassBot
17th June 2012, 14:24
If you want to compile it you have to use at least 4.7. I use MingW-builds with 4.7.1 but just 4.7 should work.
Also, I saw you made that commit so I changed the parser code to only check the leading slash if under Windows.
SassBot
17th June 2012, 15:07
So there is something weird about the original BDSup2Sub's original parsing code for determining if there is only one commandline argument passed if it's a filename or a full command string. I've noticed that if you do:
java -jar BDSup2Sub "C:\path\filename with spaces"
or
java -jar BDSup2Sub "C:\path with spaces\filename"
or
java -jar BDSup2Sub "C:/path/filename"
that it loads the file right, but
java -jar BDSup2Sub "C:/path/filename with spaces"
or
java -jar BDSup2Sub "C:/path with spaces/filename"
causes the program to split the file path up and then you get an error that says the piece of the string up to the first space does not exist. I've put in a fix that short circuits its whole single command parsing loop if the single argument is a valid file path which should fix the problem you saw, r0lz. I also posted on your repo about it too, mjuhasz, in case you haven't seen it yet. I've also changed it so if the source file path is for a file that does not exist it will error out and write to stderr instead of opening the GUI with the dialog. I also made sure that anytime the CLI exists out it now properly writes to stderr instead of stdout like it did previously. New file is here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z). Once again, let me know if you see errors.
SassBot
18th June 2012, 00:13
Right now I'm converting the homegrown CLI parser to use a library instead which means the CLI syntax will change slightly but it won't be that drastic. I'll post when I finish.
mjuhasz
18th June 2012, 09:04
Right now I'm converting the homegrown CLI parser to use a library instead which means the CLI syntax will change slightly but it won't be that drastic. I'll post when I finish.
Very good.
I started doing the same using the apache cli-commons. I'll break the backwards compatibility with the current cli switches (hence the major version number bump) but that's a well tested library I had good experience with in the past and the current switches use a weird syntax anyway (e.g. /res instead of -r and --resolution). We can match our switches once we have the new code in place and maybe agree to have the same (or at least similar) cli interface.
SassBot
23rd June 2012, 00:42
If anyone wants to test out the version on a Debian-based distro there is an i386 deb file here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/home/adam/build/bdsup2sub++_1.0.0-1_i386.deb). It's built against gcc 4.7 so I'm not sure how old of a version it will run on. I had to build it on Debian testing to get the gcc version I needed.
r0lZ
23rd June 2012, 08:11
Any chance to have the Win version with the CLI bug fixed?
SassBot
23rd June 2012, 14:11
Already posted here (http://forum.doom9.org/showpost.php?p=1578722&postcount=923).
SassBot
25th June 2012, 01:15
Updated testing Windows executable here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z) that now has a combo box to select the language if the idx/sub has multiple languages rather than being confined to just the lang idx set in the IDX file. It also now has the proper icon for the taskbar. r0lz, the change you want will make it in once I've completed the transition of the CLI parsing code to the new library. You can currently do shifting from the original X or Y position through the move dialog in the GUI so it will be simple to support from the CLI once that transition happens.
Also, I'm working right now to get this packaged into Debian but I've yet to find a mentor yet.
eTiMaGo
26th June 2012, 13:45
I hope someone can help, I've been tearing out my hair over this for a while...
I'm trying to put Thai subtitles from DVD (in idx/sub format) into the equivalent Blu-ray title, using MultiAVCHD. But no matter how I demux or extract the files from the DVD, BDSup2 will crash or give an error. I have tried with 4.0.0, 4.0.1 and the Windows exe version posted above, with the same result. Tried on 3 different computers too, same result:
http://dl.dropbox.com/u/1600280/bdsup2subcrash.jpg
(on 4.0.0 and 4.0.1, a dialog would pop up "index out of bounds")
I don't think Thai subtitles have some kind of special format, so could someone more knowledgeable help me look into this? I've uploaded a sample subtitle rip, the same ones used for the screenshot above:
http://dl.dropbox.com/u/1600280/Fringe%20S1E01%20sub.rar
I would be eternally grateful if a workaround could be found, and will consider naming my firstborn after whoever can solve this :D
r0lZ
26th June 2012, 13:56
Have you tried to convert them with SubtitleCreator?
eTiMaGo
26th June 2012, 14:26
Thanks for that, there is *some* improvement, but...
The "antialias" layer is somehow like the background layer, a solid block of black around the text. If I set this layer to be at 0 opacity, then the text is play grey, so it may be hard to see...
http://dl.dropbox.com/u/1600280/subtitlecreator.jpg
As you can imagine, OCR for Thai is not so easy, there's some software out there but it takes single images as input.
I'll try and episode like this though, let's hope it's not too unreadable!
r0lZ
26th June 2012, 14:33
The problem of the colors and transparency is easy to fix. Just edit the IDX file. (There are also ways to fix them in SC itself, but I don't remember how. IIRC, it is possible to load the IFO in SC to use its palette automatically.)
And you don't need to OCR your SUP stream to convert it to SUB/IDX. (BTW, loading a SUP from the command line converts it to SUB without opening the SC GUI. I have associated the SUP files with SC, and I have just to double-click the SUP file to convert it in the same directory, almost instantly. The manual fix of the palette is longer! :()
Note also that SC does less error checking than BDSup2Sub. For example, it doesn't detect wrong time codes. But most f the time, it's not really necessary (except when your DVD is multi-angle or multi-story).
r0lZ
26th June 2012, 14:44
I'm trying to put Thai subtitles from DVD (in idx/sub format) ...
I did not pay attention to that. The format of the subtitles in a DVD is SUP, not IDX/SUB. So, I guess you have already converted the subs somehow, perhaps when you have extracted them from the DVD. The problem might be during that step. What program do you use to rip the subtitles?
eTiMaGo
26th June 2012, 15:09
I did not pay attention to that. The format of the subtitles in a DVD is SUP, not IDX/SUB. So, I guess you have already converted the subs somehow, perhaps when you have extracted them from the DVD. The problem might be during that step. What program do you use to rip the subtitles?
typo, should be suP, not suB.. But I will try again with another disc...
And for the OCR, I meant it would be nice if I were able to use it at that point, but it's not really an option :(
SassBot
26th June 2012, 15:25
So I've looked into this and your IDX file is broken. What program made it? It has a langidx value of 0 but the only index in IDX is 10 so the program is confused and doesn't know what to read. I'll put in a fix for the crash it causes but I'm not sure what to do in cases like this as a workaround. If there's only one id in the IDX it's simple but won't work outside that case.
eTiMaGo
26th June 2012, 15:39
Let me try again with another title that I am ripping right now :)
Meanwhile, can someone confirm what is the best method for extracting subtitles from a DVD that can then be used with BDSup2Sub? I've been using avidemux but this gives idx and suB files while according to r0lZ I should be getting suP files?
SassBot
26th June 2012, 15:44
I still just use VobSub Configure. I've yet to encounter any problems with it other than it being a little slow. And ripping as either IFO/SUP or IDX/SUB is fine.
Either way this has exposed some error checking I wasn't doing so this will fix a few other potential crashes.
r0lZ
26th June 2012, 15:47
according to r0lZ I should be getting suP files?
Well, SUP files are not really useful. It's the format of the DVD and BD discs, but it is not recognised by the other players. Maybe there is a bug in AviDemux. Anyway, I use PGCDemux (and sometimes DVDSubEdit) to extract the SUPs from the DVDs, and eac3to for the BDs. As far as I know, they have no bugs.
eTiMaGo
26th June 2012, 15:56
OK, my goal is simply to add them to an existing BD title either through TsMuxer or MultiAVCHD. Testing with PGCDemux now, let's see what happens!
eTiMaGo
26th June 2012, 16:13
Meh... Here's the .sup file right out of the DVD through PgcDemux:
http://dl.dropbox.com/u/1600280/Ep01.sup
Crashed when trying to open directly with BDSup2Sub, Unexpected command 0 at index 00000012
SubtitleCreator was able to open it, but all the palettes were set to grey, this could be fixed, but some stuff was still weird, like this, the half-block background is part of the "text" layer:
http://dl.dropbox.com/u/1600280/subtitlecreator_boardwalk.jpg
I saved it as a new SUP:
http://dl.dropbox.com/u/1600280/Ep01_aftersubtitlecreator.sup
Which does not load into BDSup2Sub either, now with an error Unexpected command 75 at index 00000166
On the other hand, if I save from SubtitleCreator in VobSub format (idx/sub), this can open in BDsup2sub, but again with the weird blocky backgrounds.
These subtitles are extracted from a brand new, original DVD (Boardwalk Empire Season 1), which displays these subtitles absolutely fine when played.
SassBot
26th June 2012, 16:39
Downloading the SUP file now. Can you try extracting an IDX/SUB with Vobsub Configure and see if that works?
SassBot
26th June 2012, 16:43
The problem with the SUP is that in absence of an IFO it thinks it's an HD DVD subtitle stream since there is no way from the file header to tell them apart from a DVD SUP. That's causing the errors.
That is also the cause of the palette problems you see in Subtitle Creator. You need an IFO to go with the DVD SUP otherwise there is no way to retrieve the palette info.
Edit to add:
So in order to fix the issue you see, I will have a prompt come up similar to what DVDSubEdit does which asks you to open the corresponding IFO file when you load a DVD SUP file. If you cancel this dialog it will assume it is an HD DVD SUP file and will precede accordingly. Does this sound like a fair fix? This will go along with the other crash fix for when the langidx doesn't match up to an index number like in your original IDX/SUB pair.
r0lZ
26th June 2012, 16:53
The problem with the SUP is that in absence of an IFO it thinks it's an HD DVD subtitle stream since there is no way from the file header to tell them apart from a DVD SUP. That's causing the errors.
Maybe the program could guess that it's coming from a DVD if all subtitles are contained in a 720x576 area.
SassBot
26th June 2012, 16:55
Maybe the program could guess that it's coming from a DVD if all subtitles are contained in a 720x576 area.
Yes, but then you will still get poor results like with Subtitle Creator since the IFO file is needed for palette info. Also, the video attributes like width and height are also in the IFO file or is there also a way to get it out of the DVD SUP file, too? I've appended my previous post to ask for feedback on a suggested change for loading solitary SUP files so it does similar to what DVDSubEdit does.
eTiMaGo
26th June 2012, 16:58
Downloading the SUP file now. Can you try extracting an IDX/SUB with Vobsub Configure and see if that works?
Can't get VobSub to work, I am on Win7 x64, even after copying the dll file to system32, the configure option just won't run... any alternatives? I tried DVD Decrypter to demux but it doesn't seem to be the right tool.
The problem with the SUP is that in absence of an IFO it thinks it's an HD DVD subtitle stream since there is no way from the file header to tell them apart from a DVD SUP. That's causing the errors.
That is also the cause of the palette problems you see in Subtitle Creator. You need an IFO to go with the DVD SUP otherwise there is no way to retrieve the palette info.
Edit to add:
So in order to fix the issue you see, I will have a prompt come up similar to what DVDSubEdit does which asks you to open the corresponding IFO file when you load a DVD SUP file. If you cancel this dialog it will assume it is an HD DVD SUP file and will precede accordingly. Does this sound like a fair fix? This will go along with the other crash fix for when the langidx doesn't match up to an index number like in your original IDX/SUB pair.
That sounds like a good fool-proofing system ;)
SassBot
26th June 2012, 17:01
Can't get VobSub to work, I am on Win7 x64, even after copying the dll file to system32, the configure option just won't run... any alternatives? I tried DVD Decrypter to demux but it doesn't seem to be the right tool.
Copy them to SysWOW64. That's how I got it working.
eTiMaGo
26th June 2012, 17:03
Wait so if I copied the IFO file out of the DVD, into the same folder as my SUP files, they *should* load properly?
SassBot
26th June 2012, 17:06
Yes, it should work fine.
r0lZ
26th June 2012, 17:07
So in order to fix the issue you see, I will have a prompt come up similar to what DVDSubEdit does which asks you to open the corresponding IFO file when you load a DVD SUP file. If you cancel this dialog it will assume it is an HD DVD SUP file and will precede accordingly. Does this sound like a fair fix?
That's nice, but perhaps you could add an option to assume that the SUP file comes from a DVD, even without an IFO. It is possible to fix the colours in the program anyway.
BTW, in the IFO, it will not be easy to retrieve the correct palette. An IFO can have many PGCs, and a different palette in all of them.
eTiMaGo
26th June 2012, 17:08
OK, well I got VobSub Configure working (started it from the command line), so will try with the IDX method first since this seems the more "correct" way to do it :)
r0lZ
26th June 2012, 17:12
Also, the video attributes like width and height are also in the IFO file or is there also a way to get it out of the DVD SUP file, too?
A DVD subtitle is always 720 pix wide (less a few pixels), regardless of the resolution of the video. However, its height can change (576 or 480). I don't know if you can retrieve the correct height in the SUP, but again, you can probably assume that if there are no subtitles below 480, then it's NTSC stuff.
SassBot
26th June 2012, 17:14
That's nice, but perhaps you could add an option to assume that the SUP file comes from a DVD, even without an IFO. It is possible to fix the colours in the program anyway.
I'll tweak the prompt it so that the user is asked the file format rather than assuming anything.
BTW, in the IFO, it will not be easy to retrieve the correct palette. An IFO can have many PGCs, and a different palette in all of them.
That's why BDSup2Sub just reads the palette info from the first PGC.
SassBot
26th June 2012, 17:22
So looking deeper, it seems BDSup2Sub does not need an IFO file as just like with HD DVD SUPs, the width/height and palette info are in the SUP, too, and it actually reads this info for printing out when it is reading the DVD SUP file. I guess some programs don't read the info out such as Subtitle Creator which is why I assume it gives you the funky result it does, but I can't be sure without looking at it's code.
So what I will do is this: If a solitary SUP file is opened it will check to see if a corresponding IFO file with a matching file name exists. If one doesn't the user will be prompted asking if this is a DVD SUP file. If they say yes, it will prompt for an IFO to load (which can be canceled and it will just read the info from the SUP). If you say no, it assumes HD DVD SUP.
eTiMaGo
26th June 2012, 17:23
Success!!!!!
Maybe I got the procedur wrong for VobSUb but it gave me an invalid timecode error when loading the files into BDSup2Sub
But copying the IFO file (and renaming it to match the sup), worked! Those weird background parts are actually in bold :D
Soooo It looks like my firstborn will be named SassBot r0lz, I already pity him/her :D
Thanks ever so much guys, now I can enjoy my series in high def and my gf her subtitles in Thai, best of both worlds :)
eTiMaGo
26th June 2012, 17:24
Sassbot, I am uploading the IFO file from this particular title too:
http://dl.dropbox.com/u/1600280/Ep01.IFO
It might be useful to you for testing/debugging.
SassBot
26th June 2012, 17:24
Can you post the IDX/SUB files if you still have them? I'm interested to look into that. But I'm glad you fixed your problem.
eTiMaGo
26th June 2012, 17:26
Can you post the IDX/SUB files if you still have them? I'm interested to look into that. But I'm glad you fixed your problem.
LOL at your command:
http://dl.dropbox.com/u/1600280/VTS_01_0.idx
http://dl.dropbox.com/u/1600280/VTS_01_0.sub
SassBot
26th June 2012, 17:27
Thanks. If nothing else it will help make the program more error robust.
SassBot
26th June 2012, 17:34
Well the problem with that IDX/SUB pair is that the timestamps in the IDX file are all negative. According to a post in this thread (https://forum.doom9.org/showthread.php?t=57711) it's an old bug with Vobsub 2.23. I presume that's the version you used?
This post (https://forum.doom9.org/showpost.php?p=587277&postcount=10) also has a workaround to what causes the issue.
I don't think there's really anything I can do other than it just errors out. Unless the sub file has the run time length so that the negative timestamps can be offset.
eTiMaGo
26th June 2012, 17:35
Yep, is there a newer one? couldn't seem to find it
SassBot
26th June 2012, 17:40
No, the person who pointed it out said either to use an older version like 2.06 or you just use that other post's advice and see if you have a tiny blank cell and you want to uncheck it.
SassBot
26th June 2012, 17:43
Hmmm, interestingly enough it can read the IDX/SUB just fine even with the negative timestamps just by getting rid of the timestamp can't be less than 0 check. It will then even write out the IDX file with the proper positive timestamps when you export. So it looks like that error check wasn't correct.
Edit to add: Scratch that it wasn't outputting the timestamps correctly. It was just adding 5 seconds each time to give it positive timestamps.
DoctorM
26th June 2012, 17:44
A DVD subtitle is always 720 pix wide (less a few pixels), regardless of the resolution of the video. However, its height can change (576 or 480). I don't know if you can retrieve the correct height in the SUP, but again, you can probably assume that if there are no subtitles below 480, then it's NTSC stuff.
DVDs format specs-
NTSC:
720 x 480 pixels MPEG2 (Called Full-D1)
704 x 480 pixels MPEG2
352 x 480 pixels MPEG2 (Called Half-D1, same as the CVD Standard)
352 x 240 pixels MPEG2
352 x 240 pixels MPEG1 (Same as the VCD Standard)
PAL:
720 x 576 pixels MPEG2 (Called Full-D1)
704 x 576 pixels MPEG2
352 x 576 pixels MPEG2 (Called Half-D1, same as the CVD Standard)
352 x 288 pixels MPEG2
352 x 288 pixels MPEG1 (Same as the VCD Standard)
SassBot
26th June 2012, 18:14
Another question just to address the negative timestamp issue. I'm wondering if instead of error out if I should just let it read the IDX and then pop up a dialog warning the user that the timestamps are negative and they need to apply a delay to correct the issue. Does that seem okay? The file is valid other than the timestamps just need to be offset by the movie length.
r0lZ
26th June 2012, 18:23
@DoctorM: You gave the video resolutions. The subpics are totally different. It's why there are several subpictures for the 16:9 format (wide, letterbox, pan & scan). The subpic are applied by the player after the resize of the video to 720x480/576, and are therefore not related to the original resolution.
@SassBot: Good idea.
SassBot
27th June 2012, 14:33
Ok, so I've finished the fixes for the problems brought up yesterday. It no longer crashes on that original bad IDX/SUB pair, it will prompt you to apply a delay for the case of negative timestamps (and will error if you try to exit the conversion settings without setting one that makes the timestamps positive), and when it comes to loading a SUP with no file have a matching IFO name it will first try to load it as a DVD SUP and if that fails it will load it as an HD DVD SUP.
There will be issues with having no IFO to go with the SUP in the case of DVD SUP files. It will automatically assume 720x576 resolution and 25fps and the palette will use the default palette. The reason I can not reliably detect whether it's PAL or NTSC is that SUP files exported by BDSup2Sub (even if you apply no changes) have subpictures that are not the same size as the original subpictures. In what I'm guessing was a way to optimize output, BDSup2Sub only outputs a cropped version of the original subpicture and just modifies the X, Y position when creating the SUP frame so that it doesn't appear upon playback that the subpicture has changed. This means that SUP files straight from a DVD can be detected okay, but those that have already been run through BDSup2Sub will have wildly varying frame size info.
This means that if you load a DVD SUP file with no IFO and it's not PAL, you need to make sure in the conversion settings that you at least set the source and target frame rates to the proper NTSC values otherwise you'll get subtitles with a timing shift. You will also need to tell it the proper output resolution in case you do want NTSC output. Also, you will probably need to modify the imported DVD palette since there is no palette info without the IFO and the default palette will most likely yield results you won't like.
Lastly, I fixed a bug in the dialogs for editing the default/imported palettes that was causing the color icons to not properly update (they were invisible) if you imported a saved palette file.
New version to test is here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z).
r0lZ
27th June 2012, 15:03
The reason I can not reliably detect whether it's PAL or NTSC is that SUP files exported by BDSup2Sub (even if you apply no changes) have subpictures that are not the same size as the original subpictures. In what I'm guessing was a way to optimize output, BDSup2Sub only outputs a cropped version of the original subpicture and just modifies the X, Y position when creating the SUP frame so that it doesn't appear upon playback that the subpicture has changed. This means that SUP files straight from a DVD can be detected okay, but those that have already been run through BDSup2Sub will have wildly varying frame size info.
Note that cropped subpictures can also be present in the original DVD. Although most commercial DVDs have full-size subpictures, cropped subpics are also common.
IMO, BDSup2Sub crops them because it's necessary if the user wants to move the subpic up or to the left, as the offsets cannot be negative. (Moving a full-size subpic down or to the right is OK, even if a part of the background is outside the viewable area, but of course, without cropping it, it is difficult to know if it will be entirely visible.)
BTW, DVDSubEdit has also an option to crop the subpics, for the same reason.
Perhaps you could try to determine if a DVD stream is PAL or NTSC by adding the height of the cropped subpic to the Y offset. If the bottom border of at least one subpic is below 480, then you can safely assume PAL. Unfortunately, it will never be certain that a subpic comes really from a NTSC DVD, if, for example, all subpics are on the top of the screen.
Anyway, the possibility to specify manually the video standard is important. (Not sure you did it already, but that option must be also available from the command line.)
SassBot
27th June 2012, 15:17
For now I'm just going to leave it up to the user to set the values since any detection code seems to be more prone to error than it will be worth to write. And, yes, all those values for resolution, fps, palette file are available by switches and have been from as far back as I've used the program.
SassBot
27th June 2012, 15:37
I just realized I forgot to put in the dialog to ask for the IFO file if a SUP file is loaded. Also, I've added in a warning that will show up in the GUI log and on the CLI telling the user that it is assuming 720x576 and 25fps when no IFO is specified to go with the input SUP file.
New version is here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z).
r0lZ
27th June 2012, 15:45
Error 404. Link broken?
SassBot
27th June 2012, 15:47
Try again.
r0lZ
27th June 2012, 17:29
Thanks!
I've just noticed a bug in the Edit Colours dialogue (of the java and ++ versions). Only the first 15 colours are present in the left pane. The last colour of the palette is missing.
SassBot
27th June 2012, 18:32
That's because 0xdeadbeef only had 15 colors defined for the default DVD Palette dialog list. The imported DVD palette dialog has all 16 colors (0-15) shown. I'll fix that and I have a version with a few other minor fixes too. For one thing, the IFO dialog was opening even when you loaded a BD SUP which was wrong so I've fixed that. There was also a drawing bug for the source/target image areas as well.
r0lZ
27th June 2012, 19:02
Thanks.
I have currently always "offset out of bounds" error messages with the java version, when importing a DVD SUP file extracted with PgcDemux. But your ++ version doesn't have that problem. Is it magic? ;-)
SubtitleCreator doesn't complain.
I don't understand the problem, as it's a DVD I use since yesterday to do my tests, and I have never had that problem before. Could it be caused by an option of the INI file?
What does that message mean exactly?
BTW, there is also a little cosmetic bug in the CLI output of the java version. Not checked yet with the ++ version.
When an error message is printed (beginning with "ERROR:"), the \n character is missing at the end of the line, and the "There was N errors" message is concatenated. No big deal...
Example:
#1
ERROR: Offset 3163498 out of bounds for file E:\TEMP\Subpictures_22.supThere was 1 error
SassBot
27th June 2012, 19:05
New version here: here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z) to address the things from the previous post. Last things I want to resolve before pushing the 1.0.0 release is getting the new CLI parsing in, the functionality to move from the original x/y positions from the CLI as r0lz asked for (the GUI allows this right now), and try to fix the outstanding issue that was in the original BDSup2Sub from here (https://github.com/mjuhasz/BDSup2Sub/issues/5).
SassBot
27th June 2012, 19:09
That would be because he forgot to add a new line character where as mine should properly newline every log output. Also, can you post the SUP you are talking about? The issue you may be seeing is that the Java version may be trying to read your SUP file as an HD DVD SUP. If you don't open the DVD SUP through the IFO file it defaults to reading it as an HD DVD SUP since it can't tell them apart by header. Mine doesn't fail because it first loads it first as a DVD SUP and if any exceptions happen it then tests it as an HD DVD SUP.
r0lZ
27th June 2012, 19:26
Also, can you post the SUP you are talking about?
Here it is: Subpictures_22_2.7z (http://download.videohelp.com/r0lZ/tmp/Subpictures_22.7z)
The issue you may be seeing is that the Java version may be trying to read your SUP file as an HD DVD SUP.I don't think so, as I gave him the /res:pal and /fps:25,25 options (but no IFO).
[EDIT] Previous link did not work. Updated with a correct URL.
I mean /res:pal /fps:25,25
SassBot
27th June 2012, 19:38
Can you post it somewhere that doesn't require a signup, please? :) But I can guarantee you the issue is that it's loading it as HD DVD SUP. It will only assume the SUP is a DVD SUP if you loaded the file via an IFO file of matching name. Specifying those parameters won't change that.
SassBot
27th June 2012, 19:43
To add the relevant code that choose how it reads the file is as so from the Java version:
if (xml || sid == Core.StreamID.XML)
runType = RunType.READXML;
else if (idx || sid == Core.StreamID.DVDSUB || sid == Core.StreamID.IDX)
runType = RunType.READVOBSUB;
else if (ifo || sid == Core.StreamID.IFO)
runType = RunType.READSUPIFO;
else
runType = RunType.READSUP;
Since it didn't have an IFO extension it is neither "ifo" nor of StreamID "IFO". Hence it chooses the "READSUP" path which branches between BDSUP and HD DVD SUP and since it will have the same header as an HD DVD SUP it will read it as the incorrect format.
r0lZ
27th June 2012, 19:46
OK, thanks. I'll have a look tomorrow.
r0lZ
27th June 2012, 19:51
Sorry. They have recently changed the rules at 4shared, and apparently, it is not possible any more to share a file!
I've uploaded the SUP here (http://download.videohelp.com/r0lZ/tmp/Subpictures_22.7z).
SassBot
27th June 2012, 20:07
Thanks. Yep, Java version is reading it as an HD DVD SUP.
r0lZ
27th June 2012, 20:38
OK, I'll play with IFOs tomorrow...
r0lZ
27th June 2012, 21:10
Just tried with the original IFO in the direcrory, but I can't get it to work. The java version still errors out.
Is it really sufficient to copy the IFO in the same dir and with the same filename (Subpictures_22.IFO in my example)? I've also tried to rename the files to VTS_02_0.sup and VTS_02_0.IFO, but still with no luck.
I think I'll definitively abandon the java version and stick with your much better ++ version. :-)
[EDIT] Got it! In fact, you have to load the IFO, not the SUP. In that case, the java version works fine. (The doc is very unclear on that point.)
SassBot
27th June 2012, 21:44
Yes, the Java version requires you to open the IFO file with a name matching your SUP file for it to be read as a DVD SUP. My version is smarter. :p
SassBot
27th June 2012, 21:55
So while fixing the issue from the original BDSup2Sub here (https://github.com/mjuhasz/BDSup2Sub/issues/5) I noticed a subtle bug I introduced in the YCbCr to RGB code within the palette class that caused the SUP's palette to be decoded incorrectly. So once again refreshing the test version with this new fixed one here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z). This just leaves the CLI parsing and r0lz's request and that should be enough for me to push the 1.0.0 final release unless any other bugs can be uncovered. ;)
r0lZ
27th June 2012, 21:56
Yes, the Java version requires you to open the IFO file with a name matching your SUP file for it to be read as a DVD SUP.
BTW, can you confirm that the arguments passed via the command line (and especially /pal: argument) take precedence over the IFO? (I need to give the correct palette, as otherwise BDSup2Sub uses the palette of the first Title PGC, not always correct.)
SassBot
27th June 2012, 21:59
Well the CLI help says "load palette file <s> - default: use builtin palette". I assume that means it would override but I will check to confirm it now.
mjuhasz
27th June 2012, 22:01
Yes, the Java version requires you to open the IFO file with a name matching your SUP file for it to be read as a DVD SUP.
The (Java) development version already has a fix for this (issue #9 (https://github.com/mjuhasz/BDSup2Sub/pull/9)). It will be released once I'm done with the CLI update and the outstanding issues in the GitHub tracker. One of them is actually a more robust way to load sup files (issue #4 (https://github.com/mjuhasz/BDSup2Sub/issues/4)) I agree that the documentation is not very clear on this. It should "just work" so instead of just improving the documentation I'll make it magically work...
BTW, the snapshot version is downloadable from GitHub. While I keep the development version stable it's still mainly for testers.
SassBot
27th June 2012, 22:05
The way I'm handling it now is that if it's not a BD SUP, open a dialog to ask the user for the IFO to go along with it. If they choose one then load the file as a DVD SUP. If they don't then first try to load it as a DVD SUP. If it's not a DVD SUP it will throw an exception and then I tell it to try it as an HD DVD SUP.
DoctorM
27th June 2012, 22:11
Something said had me thinking. That jitter that I was talking about earlier in the thread could be overcome if there was an option to not crop.
At the moment it's done to all subtitles whether it is needed or not. The ability to disable it would be useful since cropping is only needed for x/y changes. Simple resizing, retiming, format changes, etc. can all be done regardless of cropping (or the original size).
Just a thought.
Heck, even better would be on-the-fly detection/cropping. In other words, no cropping occurs unless a title is moved beyond the target frame size. And then perhaps just the minimum amount of cropping needed to make the move.
SassBot
27th June 2012, 22:12
Actually ignore that r0lz. Just giving it the palette to load seems sufficient. I misreading the code.
SassBot
27th June 2012, 22:13
Something said had me thinking. That jitter that I was talking about earlier in the thread could be overcome if there was an option to not crop.
At the moment it's done to all subtitles whether it is needed or not. The ability to disable it would be useful since cropping is only needed for x/y changes. Simple resizing, retiming, format changes, etc. can all be done regardless of cropping (or the original size).
Just a thought.
Heck, even better would be on-the-fly detection/cropping. In other words, no cropping occurs unless a title is moved beyond the target frame size. And then perhaps just the minimum amount of cropping needed to make the move.
Thank you for reminding me about that. Actually I believe the jitter is more likely due to it cropping certain subtitles by odd amounts. I'm going to put in a change that makes any cropping have to be a multiple of 2 that you can then try to see if that fixes your jitter problem.
DoctorM
27th June 2012, 22:56
Thank you for reminding me about that. Actually I believe the jitter is more likely due to it cropping certain subtitles by odd amounts. I'm going to put in a change that makes any cropping have to be a multiple of 2 that you can then try to see if that fixes your jitter problem.
Thank you. I will give it a go as soon as you make the change and report back.
SassBot
28th June 2012, 04:16
Once again, another refresh for a couple of other bugs I uncovered. Download here (https://github.com/downloads/amichaelt/BDSup2SubPlusPlus/bdsup2sub++.7z).
Chetwood
28th June 2012, 08:13
Note that cropped subpictures can also be present in the original DVD. Although most commercial DVDs have full-size subpictures, cropped subpics are also common.
Still, I'd prefer having an option to not crop the subs in case of some old standalones having issues with them. Another thing: in some cases BDSUP2SUB fixes "corrupt" Vobsubs automatically by opening and saving them. Is there a switch for the command-line that would open and save all subs from a certain folder so this could be done as a batch? Thx.
SassBot
28th June 2012, 13:07
Just pass in wildcard for input and output and specify no other options. That should give you what you want.
Selur
28th June 2012, 18:21
will bdsup2sub++ get or does it have some command line options?
r0lZ
28th June 2012, 18:27
Same as the java version. (Perhaps more in the future.) ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.