Log in

View Full Version : BDSup2Sub - convert and tweak bitmap subtitle streams (VobSub,BD-SUP,BDN XML,HD-SUP)


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29 30

Tappen
26th September 2012, 23:44
The character selector block is fixed - I've been trying alternatives to allow editing of this part of the UI but haven't released any yet.

So you have to type in the Thai characters by hand. My testers had Thai keyboards of course so it was easy for them, and I used the wikipedia page with the character set on it to cut and paste characters into the manual entry box. Slow but got the job done.

eTiMaGo
27th September 2012, 10:22
I'm the author of SubExtractor, and I did add support for Thai OCR in the most recent release (1028). I worked for several months with a Thai speaker to get the diacriticals and other combo characters OCR'd and ordered correctly.

I could kiss you! ahhaha

I'm in Thailand too, and in a similar situation to pawpcorn, I like to watch movies and series in HD, but my GF needs Thai subtitles which are suually only available on the DVDs... While MultiAVCHD and BDSup2Sub have been excellent for this, in many titles the timing of the subtitles is quite a bit different and hard to get right, having them in text format will definitely help!

Pawpcorn, as I understand it you'd want to show both English and Thai subtitles at the same time, right? I think some PC DVD/BD player software like PowerDVD can display 2 subtitle languages? If not the next easiest solution, I think, would be to hard-burn the english subs on the video, and have Thai subtitles as selectable ones? Just an idea!

Chetwood
28th September 2012, 07:02
Isn't up to four lines of subs covering too much of the picture anyway?

rakuen.now
8th October 2012, 09:15
Well, I'm not really a programmer, but I took a look at those files and don't see that this would be too hard for a programmer who's interested. You could probably do it by combining free code online. What I would do is, after converting the thai and eng sub to XML/PNG in BDSub2Sup, write a program that:

1. Create a list for each language.
2. Traverse through them both sorted by timecode.
3. Create a 3rd output list.
4. If a frame for one language does not have a corresponding frame within a second of its start time in the second language, output that frame and the PNG directly.
5. If the start time for a frame for one language is within a second of a frame of the second language:
5a. Sync the timecodes
5b. Combine the PNGs into 1 PNG (example (http://www.switchonthecode.com/tutorials/combining-images-with-csharp))
5c. Figure out the vertical pixel change, and output this into the output list.
6. If the start time for a frame of one language is not within a second of a frame from the second language, but there is overlap, create 3 frames where the 2nd one is the overlap (not the ideal solution, but easiest).
7. Write the output list back into XML format.
8. Load the XML and combined PNGs into BDSup2Sub and turn it back into sub/idx.

bernd_b
9th October 2012, 21:11
Hello,

I ripped one of my DVDs using DVDFab. The resulting idx/sub files causes BDSUP2SUB to crash:

java.lang.NullPointerException
at bdsup2sub.supstream.dvd.SubDvd.readSubFrame(SubDvd.java:479)
at bdsup2sub.supstream.dvd.SubDvd.<init>(SubDvd.java:135)
at bdsup2sub.core.Core.readDVDSubstream(Core.java:567)
at bdsup2sub.core.Core.readVobSub(Core.java:526)
at bdsup2sub.core.Core.run(Core.java:161)
at java.lang.Thread.run(Thread.java:722)

What does this error message indicate? I can, e.g. work with these subtitles using avidemux ocr-function, so they shouldn't be pure crap?!?

If it is of help, I can upload an example somewhere (the attachment would be about 0.5-1MB and there to big to attach it to the post here in the forum.

SassBot
9th October 2012, 23:48
Post the sub/idx and I can tell you.

bernd_b
10th October 2012, 19:34
O.K,

I tried to upload an example of an idx/sub pair which works in avidemux2 ocr tool but made BDSUP2SUB crash:

http://dl.dropbox.com/u/963354/working_not_working.zip


May one of the links work. Here again the error message:

java -jar /extern08/BDSup2Sub-5.0-SNAPSHOT.jar
java.lang.NullPointerException
at bdsup2sub.supstream.dvd.SubDvd.readSubFrame(SubDvd.java:479)
at bdsup2sub.supstream.dvd.SubDvd.<init>(SubDvd.java:135)
at bdsup2sub.core.Core.readDVDSubstream(Core.java:567)
at bdsup2sub.core.Core.readVobSub(Core.java:526)
at bdsup2sub.core.Core.run(Core.java:161)
at java.lang.Thread.run(Thread.java:722)


BDSup2Sub - Version 5.0 snapshot Built on 2012-09-15

mjuhasz
12th October 2012, 19:55
Unfortunately all the links are dead.

bernd_b
13th October 2012, 10:08
First try first crap.

Maybe this one is of help:

http://dl.dropbox.com/u/963354/working_not_working.zip

r0lZ
13th October 2012, 10:19
There is an additional coma at the end of the palette in the IDX file. If you remove it manually, you can open the file.
Obviously, it's a little bug, easy to fix.

bernd_b
13th October 2012, 15:34
The coma trick didn't work here.

DVDFabs produces some idx/sub files which can be loaded into BDSUP2Sub without problems and some which cannot. All have the coma at the end of the palette line - I understood it is this line:

palette: 101010, 646464, e2e2e2, eaeaea, 0feb0e, ea10ea, ebeb10, 107b7a, 7b7b7b, d1d1d1, 7a110f, b9303b, 101010, 646464, e2e2e2, 7b107a,

I uploaded a working and not working example produced by DVDFab (and corrected the links accordingly of my previous posts). Both pair of subtitle files can be processed with avidemux ocr-function, but the one called not working leads to a crash of BDSUP2Sub:

http://dl.dropbox.com/u/963354/working_not_working.zip

Before crashing with the above shown error message, I can additionally see the following message in the window message window on the bottom left side:


...

#157
#158
#159
WARNING: Control buffer size inconsistent.
WARNING: RLE buffer size inconsistent.
WARNING: Invalid end sequence offset -> no end time
WARNING: Invisilble caption due to zero alpha - unsed alpha info of last caption.
#160
WARNING: Invalid fragment skipped at ofs 0x000bf800

r0lZ
13th October 2012, 16:10
Your previous example worked without the tailing coma with BDSup2Sub++.exe. I have not tried the java version.

Ghitulescu
13th October 2012, 16:26
Anyway, I don't understand why you want to display two languages at the same time. What's the benefit? Is it for a multi-language audience?

I cannot possible believe :) I met another one that is not contaminated by the anime-mania. :)

Multiple language subtitles are extremely wanted in these circles, to display both Japanese and the secondary language in the same time.

bernd_b
13th October 2012, 17:53
Your previous example worked without the tailing coma with BDSup2Sub++.exe. I have not tried the java version.

O.K:, didn't see the windows version. Works with the grace of wine here too under linux after deleting the coma, but exporting the subtitle fails with:
...

Decoding frame 159/329 at offset 000bf000
ERROR: Corrup buffer offset information

So same issue, but at export instead of at loading the sub?

r0lZ
13th October 2012, 18:16
Sorry, I haven't tried to export it. I've assumed that your problem was limited to the error when loading.
IMO, you should try to extract the original subs with another tool. DVDFab has a lot of bugs.

cyberbeing
14th October 2012, 01:24
The idx file which doesn't load has an invalid line.
timestamp: 00:11:21:480, filepos: 0000bf000
timestamp: 06:24:34:465, filepos: 0000bf800
timestamp: 00:11:24:000, filepos: 0000c0000

mjuhasz
14th October 2012, 07:37
That's correct. You can remove that line and both the stable and the snapshot BDSup2Sub will read/export it then.

This may be a bug in DVDFab but I'll check how BDSup2Sub can be more graceful and skip this automatically (write a warning and move on, instead of crashing).

The idx file which doesn't load has an invalid line.
timestamp: 00:11:21:480, filepos: 0000bf000
timestamp: 06:24:34:465, filepos: 0000bf800
timestamp: 00:11:24:000, filepos: 0000c0000

MaistroX
22nd October 2012, 08:33
Downloaded latest, get the same stop and error, please help! :/
See attached text here -> http://www.mediafire.com/file/41cubs0s716rwlf/BD3D2MK3D_-_Wold_Of_War_II_3D.txt

r0lZ
22nd October 2012, 10:20
Wrong thread, MaistroX. Please port in the right thread (http://forum.doom9.org/showthread.php?t=155246).

cyberbeing
8th November 2012, 00:19
Any chance of adding the ability to change the colors/palette of SUP(BD) subtitles in a future version?

If not, is there any other program which can modify and export SUP(BD) with custom colors?

mjuhasz
9th November 2012, 08:12
Not in the near future.

The subtitle data on a Blu-Ray consists of images with a color/alpha palette of up to 256 entries. To make things worse, each subpicture frame can have a separate palette, i.e. you'd have to edit potentially hundreds of thousands of palettes with 256 entry each.

Most blu-rays I came across did not use all 256 palette entries and had the same palette for all images but this is not true in general.

This is not the first time this feature has been requested so I created an issue (https://github.com/mjuhasz/BDSup2Sub/issues/23) for it on github and time permitting I'll investigate whether I could come up with a simple editor.

Any chance of adding the ability to change the colors/palette of SUP(BD) subtitles in a future version?

If not, is there any other program which can modify and export SUP(BD) with custom colors?

cyberbeing
9th November 2012, 23:23
Could you throw together some code more quickly which only changes the palette of the first subpicture to 100% Red or 100% Green or 100% Blue. In my case, I just need I way to create colored PGS samples for renderer testing purposes. I unfortunately don't own any Blu-rays with PGS subtitles other than light-gray, so it's a bit of a problem. I assume the PGS file actually needs to be parsed, and it wouldn't be trivial to identify and hack at the palette in a hex editor?

Alternatively, if anybody would send me small samples (only a single PGS subpicture is fine) of colored PGS subtitles from their Blu-rays, I would be grateful.

sneaker_ger
9th November 2012, 23:25
I don't have samples at hand but you could easily create those yourself with avs2bdnxml (http://forum.doom9.org/showthread.php?t=146493), I guess.

cyberbeing
10th November 2012, 02:47
Thanks sneaker_ger, avs2bdnxml seems to work well for doing what I needed.

mjuhasz
10th November 2012, 13:09
You can create one as follows:

- load a blu-ray sup file
- export it as SUP/IDX
- load the exported sup/idx file
- change the palette mode to 'Create new'
- check the colors in use under 'Edit DVD Frame Palette'
- edit the palette under 'Edit imported DVD palette'
- export it back as SUP(BD).


In my case, I just need I way to create colored PGS samples for renderer testing purposes.

theonlyone
15th November 2012, 17:43
I`m getting this error when I open an SUP file. It does not happen with a SUB file.

I downloaded the latest version of BDSup2Sub and also re-installed the JVM with no luck.

Any help would be greatly appreciated.

Thanks.

theonlyone
17th November 2012, 15:09
I found a workaround.

The problem only happened with SUPs from a specific BD (U2: Rattle and Hum). Those SUPs crash all versions of BDSup2Sub, including the latest beta (https://github.com/mjuhasz/BDSup2Sub/wiki/Download) and even the C++ port (http://forum.doom9.org/showthread.php?t=165416). Nasty!

I used SUPRead (http://forum.doom9.org/showthread.php?t=121535) to read the SUP file and export it to another BD-SUP file and then used BDSup2Sub to do its thing.

sneaker_ger
17th November 2012, 20:26
Please upload those subtitles, so the devs can fix the crash.

frencher
18th November 2012, 03:50
Last updates is here (https://github.com/mjuhasz/BDSup2Sub/downloads) BDSup2Sub-5.1-SNAPSHOT.jar

DivX220
2nd December 2012, 20:59
Hello,

I get this error ''Offset 66847570 out of bounds for file <path to file>" each time I try to open a SUP file extracted with Project-X from an European DVB .m2ts file.

The first time I thought it was because of a crop of the beginning of the .m2ts file, but I tried two more times with no crop, and I get the same error.

Any help would be greatly appreciated.

Thanks.

mjuhasz
3rd December 2012, 07:38
It's hard to tell what the problem is without seeing the actual sup file. Please share it with me so that I can have a look.

Some explanation about why these kind of error happen (extracted from the wiki (https://github.com/mjuhasz/BDSup2Sub/wiki/Known-Issues)):

Reading/writing data from/to transport streams is quite a hassle since the formats are usually not well documented and you will always stumble over a stream that either contains authoring errors or uses features so uncommon that they are not documented anywhere. Indeed, most of the time it is impossible to tell if some weird stream is only on the edge of what is allowed or simply faulty. So often enough, programs that read or write transport streams will only support a certain amount of commonly used (and known) sub-features. Therefore it is likely that BDSup2Sub will stumble over the streams created by other programs or other programs will have problems reading the streams created by BDSup2Sub and it's generally hard to tell whose fault it is.

Hello,

I get this error ''Offset 66847570 out of bounds for file <path to file>" each time I try to open a SUP file extracted with Project-X from an European DVB .m2ts file.

The first time I thought it was because of a crop of the beginning of the .m2ts file, but I tried two more times with no crop, and I get the same error.

Any help would be greatly appreciated.

Thanks.

Selur
5th December 2012, 16:53
a SUP file extracted with Project-X from an European DVB .m2ts file.
afaik only BD-SUP = SUP streams like they are on a Blu-ray and not DVB-SUPs are supported by BDSup2Sub

mood
9th January 2013, 22:51
What is the last update? 5.1.1 or 5.2 SNAPSHOT out before 5.1.1??

Superb
10th January 2013, 00:39
Looks like a nice release. Thanks. The only reason I keep using BDSup2Sub++ is its support for multi-language IDX/SUB files.
I can easily switch the language w/ the combo-box they added. Very useful.

mjuhasz
10th January 2013, 10:14
What is the last update? 5.1.1 or 5.2 SNAPSHOT out before 5.1.1??

As you can see on the Download page (https://github.com/mjuhasz/BDSup2Sub/wiki/Download) the latest version is 5.1.1

The SNAPSHOT version is a build made from the latest source code. It may not be stable at certain times since it's a work in progress. Those running it can provide me with valuable feedback by creating issues on GitHub. Those who don't want to test but need a stable version should run the latest stable version instead.

5.1.0 had the convert resolution feature broken and it was well worth making a bugfix release for it, that is 5.1.1. There was not enough change to bump the version to 5.2.0 since it only fixes a couple of bugs. Of course 5.2.0 will have the fixes as well.
To recap, 5.1.0 was followed by 5.1.1 and we can have more 5.1.x releases and eventually we'll have 5.2.0. I hope this answers your question.

mood
10th January 2013, 15:26
As you can see on the Download page (https://github.com/mjuhasz/BDSup2Sub/wiki/Download) the latest version is 5.1.1

The SNAPSHOT version is a build made from the latest source code. It may not be stable at certain times since it's a work in progress. Those running it can provide me with valuable feedback by creating issues on GitHub. Those who don't want to test but need a stable version should run the latest stable version instead.

5.1.0 had the convert resolution feature broken and it was well worth making a bugfix release for it, that is 5.1.1. There was not enough change to bump the version to 5.2.0 since it only fixes a couple of bugs. Of course 5.2.0 will have the fixes as well.
To recap, 5.1.0 was followed by 5.1.1 and we can have more 5.1.x releases and eventually we'll have 5.2.0. I hope this answers your question.

Thanks for answers ;)

QUEENFAN
7th February 2013, 09:17
Hello,

I get the following error using BDSup2Sub (5.1.1) with multiAVCHD:

!!! Error converting subtitles! (java?)

My system is a Windows 8 Pro x64.

Same installed software on a XP system (Virtualbox) runs without any error.

Java is installed on both systems.

Any clue?


Thanks a lot in advance for your help.

paradoxical
7th February 2013, 16:32
With such vague information I doubt you can be helped. What was the file being processed by BDSup2Sub? Is there a log with more info?

QUEENFAN
8th February 2013, 07:36
@paradoxical

Thanks a lot for your quick answer.

How can I provide you with the requested detailed information?

BDSup2Sub runs in multiAVCHD so I haven't detailed logs regarding BDSup2Sub.

The part of the log concerning BDSup2Sub is:

[07:29:04] Processing 3 titles...
[07:29:04] Processing (DVD (01) D:\Deadwood TEST_\VIDEO_TS\)...
[07:29:04] Pre-processing DVD input (D:\Deadwood TEST_\VIDEO_TS\)...
[07:29:04] *** Detected duration: 00:10:30
[07:29:04] *** Subtitles: 720x576 25.000 ID#1 (deu)...
[07:29:04] *** Extracting subtitles ID#1 (mencoder)...
[07:29:19] *** Converting DVD subtitles to Blu-ray format (java:BDSup2Sub)...
[07:29:19] !!! Error converting subtitles! (java?)
[07:29:19] *** Extracting audio (mplayer)...
[07:29:19] *** Extracting ac3 track #128 (deu)...
[07:29:20] *** Extracting ac3 track #129 (eng)...
[07:29:21] *** Extracting video (mplayer)...
[07:29:32] Pre-processing completed!

QUEENFAN
8th February 2013, 10:12
@paradoxical

I did some research and mencoder (the process before encoding the subtiltes) has a problem with Windows 8 Pro x64.

I don't know if this is a general problem or only affects me but I'll try to find this out.

ScottJ
1st March 2013, 05:01
The docs mention that cropping is not performed on SUP format subs. The Blu-ray disc "Mesrine: Killer Instinct" has all subs as 1920x1080 which makes it unable to move the subs inside the 2.40 picture.

Is there a way I could get BDSup2Sub to crop this format, or is there another format I could convert to (preferably without losing anything) and then import?

paradoxical
1st March 2013, 16:23
No, but bdsup2sub++ will automatically crop out the sub area if it detects such a case. This would then allow you to move them. Grab this test binary (https://www.dropbox.com/s/t955gighbz5dc0f/bdsup2sub%2B%2B102a_win32.7z) (assuming you're using Windows) if you want that capability.

mood
3rd March 2013, 06:54
it is possible save language export settings?

when export to idx/sub the language is always "english"

I have to change over and over again to spanish or portuguese because is always english.

paradoxical
4th March 2013, 19:04
No, that isn't a thing that is saved in the INI settings.

ScottJ
3rd April 2013, 00:34
Twilight: Breaking Dawn Part 2 has two forced subs at 0:52:59 that cause trouble for BDSup2Sub. (And BDSup2Sub++.)

With the original disc, when I turn on all subs, the first of the 2 forced subs is displayed simultaneously with another non-forced sub.

When BDSup2Sub loads the sup track, it gives a few warnings. When it extracts the forced subtitles, the first one comes on way too briefly.

paradoxical
3rd April 2013, 02:49
Can you post the sub file?

Guest
3rd April 2013, 14:21
Can you post the sub file? It's OK to post a fair-use fragment but not the whole thing.

Vospi
28th April 2013, 08:52
This tool saved me, it fixed corrupt idx/sub files for whole anime series so AviSynth filters now open them fine.
Thanks a lot!

urthling
5th June 2013, 21:45
Hello -

Was wondering if I could get some assistance with using the command line interface? I used to be able to specify wildcards like this:

java -jar c:\BDSup2Sub\BDSup2Sub.jar "*.sup" "output\*.sup" /res:1080 /fps:keep /movin:2.40,24

But I can't figure out how to do that with the new CLI. I can get single files to process if I specify the name manually by doing this:

java -jar c:\BDSup2Sub\BDSup2Sub.jar -r 1080 -T keep 2.40,24 -o c:\tmp\output.sup c:\tmp\input.sup

Any input would be appreciated. Thanks!

r0lZ
6th June 2013, 08:59
Use a command similar to this:

for %F in ("*.sup") do java -jar c:\BDSup2Sub\BDSup2Sub.jar "%~nF.sup" "output\%~nF.sup" /res:1080 /fps:keep /movin:2.40,24

Type for /? for more info.