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

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

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th January 2013, 22:24   #1  |  Link
paradoxical
Guest
 
Posts: n/a
bdsup2sub++ - convert and tweak bitmap subtitles.

Creating a new thread since I've taken over maintaining so that all the new versions can be tracked in the first post and not lost in the previous thread.

CLI syntax is:

Code:
BDSup2Sub++ 1.0.2 0xdeadbeef, mjuhasz, Adam T.
Syntax:
bdsup2sub++ [options] -o outfile infile

Options:
 -h, --help           	List options 
 --load-settings      	Set to load settings stored in INI file. 
 --resolution x       	Set resolution to 480, 576, 720 or 1080. Default: 576. 
                      	Supported values: keep, ntsc=480, pal=576, 1440x1080. 
 --fps-source x       	Synchronize source frame rate to <x>. Default: auto. 
                      	Supported values: 24p=23.976, 25p=25, 30p=29.967. 
 --fps-target x       	Convert the target frame rate to <x>. Default: keep. 
                      	Supported values: 24p=23.976, 25p=25, 30p=29.967. 
 --delay x            	Set delay in ms. Default: 0.0. 
 --filter x           	Set the filter to use for scaling. Default: bilinear. 
                      	Supported values: bilinear, triangle, bicubic, bell, 
                      	b-spline, hermite, lanczos3, mitchell. 
 --palette-mode x     	Palette mode: keep, create, dither. Default: create. 
 --minimum-time x     	Set the minimum display time in ms. Default: 500. 
 --merge-time x       	Set max time diff to merge subs in ms. Default: 200. 
 --move-in-ratio x    	Move captions from inside screen ratio <x>. 
 --move-out-ratio x   	Move captions from outside screen ratio <x>. 
 --move-y-origin x    	Move captions from the original vertical position. 
                      	Supported values: up, down. 
 --move-y-offset x    	Set optional +/- offset to move captions by. 
 --move-x x           	Move captions horizontally from specified position. 
                      	Supported values: left, right, center, origin. 
 --move-x-offset x    	Set optional +/- offset to move captions by. 
 --crop-y x           	Crop the upper/lower n lines. Default: 0 
 --alpha-crop x       	Set the alpha cropping threshold. Default: 10 
 --scale-x x          	Scale captions horizontally by factor. Default 1.0. 
 --scale-y x          	Scale captions vertically by factor. Default 1.0. 
 --no-export-palette  	Do not export palette file. 
 --export-palette     	Export target palette in PGCEdit format. 
 --forced-only        	Export only forced subtitles. 
 --force-all x        	Set or clear the forced flag for all subpictures. 
                      	Supported values: set/clear. 
 --swap               	Swap Cr/Cb components. 
 --no-fix-invisible   	Do not fix zero alpha frame palette. 
 --fix-invisible      	Fix zero alpha frame palette. 
 --no-verbose         	Switch off verbose console output mode. 
 --verbose            	Switch on verbose console output mode. 
 --log-to-stderr      	Switch to change progress output to standard error. 

Options only for SUB/IDX or SUP/IFO as target:
 --alpha-thr x        	Set alpha threshold 0..255. Default 80. 
 --med-low-thr x      	Set luminance low/med threshold 0..255. 
 --med-hi-thr x       	Set luminance med/hi threshold 0..255. 
 --language x         	Set language to <n>. Default: de (Vobsub Only). 
 --palette-file x     	Load palette file <n>. Overrides default palette. 

Output:
 -o x, --output x     	Specify output file. 

Wildcard support:
Use "*" for any character and "?" for one character in the source name
Use exactly one "*" in the target file name.
Example:
bdsup2sub++ --resolution 720 --fps-target 25p -o dvd_*.sub 'movie* 1?.sup'
Current version is v1.0.2 (2013/17/4):

Windows Binary:
v1.0.2: here.
git snapshot build: *to be added later*.

OS X 10.7+ binary:
v1.0.2: here.
git snapshot build: *to be added later*.

For Linux support:

Arch users can get bdsup2sub++ from AUR.

For any other distro, you'll have to ask for your repo maintainers for support. Currently, I don't have the time to maintain packages.

Github repository is here.

For all requests for bug fixes and enhancements made in this thread, it would also be helpful if you can also post them to the issue tracker as well.

When reporting a crash or a bug, please provide a sample file and steps that can consistently reproduce the issue.

Last edited by paradoxical; 17th April 2013 at 17:42. Reason: Added new Windows git snapshot build
  Reply With Quote
Old 29th January 2013, 09:57   #2  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Hi,

Thanks for your work...I really appreciate.

I'm wondering if is there a way to change colors from BD sup files using this tool ? My input are sup from BD and my target are also sup files dedicated to BD but most of the time resized...

If not possible yet, may I ask this as a feature request ?
Kurtnoise is offline   Reply With Quote
Old 29th January 2013, 11:41   #3  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 385
great to see you are carrying dev paradoxical!

I'm really no expert, in fact I know abosoutely nada.
I tried a sup file I had the sassbot versions crash on. Yours doesn't and it converts it to 1280x720 a lot faster than the old java versions did, but something is odd.
The vobsubs created by java 400 is 6.2mb while with new ++, only 1mb. I can't really see a difference in the result but it still seems weird running them on cmd also seems odd:

java ends with:
Decoding frame 1268/1269 at offset 0x01db9cb5
WARNING: fade out detected -> patched palette
Decoding frame 1269/1269 at offset 0x01dc060a
WARNING: fade out detected -> patched palette
There were 1048 warnings

++ new ends with:
Decoding frame 71/223 at offset 00c5820d
WARNING: fade out detected -> patched palette
Decoding frame 72/223 at offset 00c9e945
WARNING: fade out detected -> patched palette
There were 144 warnings
There were 157 warnings

you can try the sup file:

http://www.mediafire.com/?4yvedoe2ddnv8ca
mini-moose is offline   Reply With Quote
Old 29th January 2013, 12:33   #4  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,741
Quote:
Originally Posted by paradoxical View Post
Current version is 1.0.1 (28/1/2013):

Windows Binary:
Download link: here
I tried it with a sup extracted from a Blu-ray and it crashed.
Music Fan is offline   Reply With Quote
Old 29th January 2013, 13:46   #5  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
Quote:
Originally Posted by Music Fan View Post
I tried it with a sup extracted from a Blu-ray and it crashed.
you should upload your file somewhere...it might help to debug or fix the crash.
Kurtnoise is offline   Reply With Quote
Old 29th January 2013, 13:58   #6  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
I tried a sup file I had the sassbot versions crash on. Yours doesn't and it converts it to 1280x720 a lot faster than the old java versions did, but something is odd.
Probably due to a couple of bugs I fixed. Also, I did pretty extensive memory and performance profiling and fixes. So performance has dramatically improved. There's one more memory leak I still need to fix though, which I'll get in 1.0.2.

Quote:
Originally Posted by mini-moose View Post
Okay, I'll check to see what the difference might be. It shouldn't be that dramatically different.

Quote:
Originally Posted by Music Fan View Post
I tried it with a sup extracted from a Blu-ray and it crashed.
Okay. Without the file I can't really do much.

Quote:
Originally Posted by Kurtnoise View Post
I'm wondering if is there a way to change colors from BD sup files using this tool ? My input are sup from BD and my target are also sup files dedicated to BD but most of the time resized...

If not possible yet, may I ask this as a feature request ?
Yeah it doesn't do BD sup color editing currently. But it can go on the list.

Edited to add:

OS X binary is now up. I finally fixed all the issues with my statically linked Qt.

Last edited by paradoxical; 29th January 2013 at 14:05.
  Reply With Quote
Old 29th January 2013, 14:26   #7  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 385
Quote:
Originally Posted by paradoxical View Post
Probably due to a couple of bugs I fixed. Also, I did pretty extensive memory and performance profiling and fixes. So performance has dramatically improved. There's one more memory leak I still need to fix though, which I'll get in 1.0.2.
the processing time on standard sups is still a little slower than the java one. I ran the same sup with 720p resizing on both and timed it. about 5-6secs faster on the old java but I think that's still better than it was. 6 seconds are not gonna kill me
On this non-standard sup java takes around 3mins vs less than a minute on your latest version and as I said the end vobsub size is about 1/6.

Also from a non-expert view the cmd info seemed odd. java got to 1269/1269 and ++ 72/223. They might just use a different routine. Just pointing it out.
I'm sure you'll be able to tell more trying out the sup file provided.

thanks!
mini-moose is offline   Reply With Quote
Old 29th January 2013, 14:28   #8  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by mini-moose View Post
the processing time on standard sups is still a little slower than the java one. I ran the same sup with 720p resizing on both and timed it. about 5-6secs faster on the old java but I think that's still better than it was. 6 seconds are not gonna kill me
On this non-standard sup java takes around 3mins vs less than a minute on your latest version and as I said the end vobsub size is about 1/6.

Also from a non-expert view the cmd info seemed odd. java got to 1269/1269 and ++ 72/223. They might just use a different routine. Just pointing it out.
I'm sure you'll be able to tell more trying out the sup file provided.

thanks!
Yeah, there is definitely something amiss there.

Edit to add:

Checking the 1.0.0 version and it spews a ton of errors, too. So, I'll track it down here in a bit.

Edited to add again:

So more interestingly is that 4.0.1 Java version processes that sup with no "missing end time of frame" warnings. The 1.0.0 of ++ spews a bunch of those warnings which also matches what 5.1.1 Java does as well. 1.0.1 only has those warnings for far less frames. But the 1.0.0 and 5.1.1 still get the same timings as the 4.0.x Java versions, while 1.0.1 has something broken for sure. Interesting for sure.

Last edited by paradoxical; 29th January 2013 at 15:12.
  Reply With Quote
Old 29th January 2013, 15:12   #9  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,741
Quote:
Originally Posted by paradoxical View Post
Okay. Without the file I can't really do much.
Here it is ;
http://www37.zippyshare.com/v/43256615/file.html
This is actually an extract (a few minutes). SupRip does not have problem with it.
Music Fan is offline   Reply With Quote
Old 29th January 2013, 15:25   #10  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by Music Fan View Post
Here it is ;
http://www37.zippyshare.com/v/43256615/file.html
This is actually an extract (a few minutes). SupRip does not have problem with it.
So I loaded it with 1.0.1 and saved it out as every format with no crashes. Any other info you can provide? What exactly did you do to get it to crash?
  Reply With Quote
Old 29th January 2013, 16:23   #11  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,741
I tested it again and actually it works with a shorter name in a root folder instead of a subfolder , the path was maybe too long. But it's not very long ; around 20 characters for the name of the sup and also 20 for the name of the folder (no subfolder), it looks like :
K:\folder containing HD sup subtitles\my cool sup blu-ray extract.sup
It works with ;
E:\my extract.sup
The crash happened just after loading the sup. Now I know that I have to use short paths but if you can allow longer names (and/or paths), it would be nice
Music Fan is offline   Reply With Quote
Old 29th January 2013, 16:31   #12  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by Music Fan View Post
I tested it again and actually it works with a shorter name in a root folder instead of a subfolder , the path was maybe too long. But it's not very long ; around 20 characters for the name of the sup and also 20 for the name of the folder (no subfolder), it looks like :
K:\folder containing HD sup subtitles\my cool sup blu-ray extract.sup
It works with ;
E:\my extract.sup
The crash happened just after loading the sup. Now I know that I have to use short paths but if you can allow longer names (and/or paths), it would be nice
I think that's a red herring. The path I loaded the subtitle file was way longer than 20 characters. The path was "C:\temp\BDSup2SubPlusPlus\bdsup2sub++-build-desktop-Qt_4_8_4__qt4_8_4__Debug\release\extract french (Blu-ray sup).sup"

Last edited by paradoxical; 29th January 2013 at 16:33.
  Reply With Quote
Old 29th January 2013, 16:42   #13  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,741
Now it works with the long file name while I didn't change anything.
Music Fan is offline   Reply With Quote
Old 29th January 2013, 16:44   #14  |  Link
paradoxical
Guest
 
Posts: n/a
I don't know what to tell you. The application itself does allow or disallow the length of path and/or file names.
  Reply With Quote
Old 29th January 2013, 19:39   #15  |  Link
paradoxical
Guest
 
Posts: n/a
mini-moose I fixed your issue. 1.0.1 version has been refreshed with the fix. Windows binary link has been updated. OS X binary will have to wait about 5 hours until I get back to my Mac.
  Reply With Quote
Old 30th January 2013, 00:57   #16  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 385
Quote:
Originally Posted by paradoxical View Post
mini-moose I fixed your issue. 1.0.1 version has been refreshed with the fix.
thanks! I'm running it now. doing resize to 1280x720 with Mitchel.
It seems to be taking a very long time..I'm at 10mins now and it's only at 330/1269. Are you getting similar processing times?
mini-moose is offline   Reply With Quote
Old 30th January 2013, 01:09   #17  |  Link
paradoxical
Guest
 
Posts: n/a
It's not super fast, but I finished in about 2 mins. This was on my Quad core i7 Mini. I'll do some more performance analysis and see if there isn't any more low-hanging fruit especially with some of the more slow filters. Just as a benchmark, Bilinear was about 30 seconds.

Edit to add:

I did notice when profiling before that 720p was slower than going to either NTSC or PAL resolutions which seemed a bit weird so I'll see what I can find out with more profiling.

Last edited by paradoxical; 30th January 2013 at 01:11.
  Reply With Quote
Old 30th January 2013, 01:12   #18  |  Link
paradoxical
Guest
 
Posts: n/a
Just to add as well, the 5.1.1 Java version is also quite a bit slower doing the 720p with Mitchel too. Nearly 20-30% slower on the same system with a couple of test runs.
  Reply With Quote
Old 30th January 2013, 01:18   #19  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 385
Quote:
Originally Posted by paradoxical View Post
It's not super fast, but I finished in about 2 mins. This was on my Quad core i7 Mini.
hmm it just finished here. took 29mins and I'm not sure it reached the end (if cmd output is an indication) :
WARNING: fade out detected -> patched palette
Decoding frame 1145/1269 at offset 01ad769b
There were 144 warnings
There were 1048 warnings

my pc is a sandy bridge i7 so not a very slow one.
mini-moose is offline   Reply With Quote
Old 30th January 2013, 01:20   #20  |  Link
paradoxical
Guest
 
Posts: n/a
Yeah it didn't take anywhere near that long and that's with quite a few things running at the same time.
  Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 10:47.


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