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 5th April 2009, 22:11   #1  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
BDSupEdit

I created this tool, as I was missing a tool to downscale BD subtitles to be used on 720p encoded movies.



The application is pretty simple, just load the sup file, then set the resolution under options, including all the resize filter, Dither mode etc. then export the sup file and import it into tsMuxeR


Supported resolutions are:
  • 1920x1080
  • 1440x1080
  • 1280x720
  • 720x576
  • 720x480


I have alot of planned work for this tool, but ideas are welcome. I hope alot of you will like it and maybe donate a little, as I have used >alot< of time (see about in application) on this application and hopefully will continue to do.

Newest version:
BDSupEdit Ver 0.41

Old Version:
BDSupEdit Ver 0.1
BDSupEdit Ver 0.2
BDSupEdit Ver 0.3
BDSupEdit Ver 0.4

Change log:
Quote:
BDSupEdit Version 0.41
- Hopefully fixed the framerate issue in scenarist xml file. It works on my end.
- Fixed: Another coordinate issue with trimmed image.

BDSupEdit Version 0.4
- Added more code to ensure incomplete subtitle frames are skipped.
- Fixed: A subtitle counter wasnt set properly, not sure it even has any effect, but now its added correctly.
- Fixed: Framerate wasnt set properly when exporting subtitle stream.

BDSupEdit Version 0.3
- Major overall 'code upgrade'.
- Updated the RLE Encoder, it has a few flaws when dealing with sudden streams, you would know when it didnt work!!!
- Updated the Sup parsing code, it should now work alot more stable and accept more streams.
- Updated Color Conversion, it now uses the ITUR-709-5, should I use ITUR-601-5 for 720x480/576 or is it still HD as the source is Bluray ? let me know.
- Parsing Scenarist XML file failed parsing attribute 'forced'. Supread scenarist export uses 'forced', where other use 'Forced',made a check to support both format.
- Fixed the time problem when reading Scenarist XML file.
- Fixed the coordinate problem when importing trimmed image.
- Removed "Join linked subs" as its done internal now.
- Changed "Options" to "Export Options" as they only apply when exporting.
- Changed TFileStream to TMemoryStream, should make loading and saving faster.
- Cosmetic change.

BDSupEdit Version 0.2
- Fixed a bug in the RLE Encoder that occured in rare cases.
- Optimized the resize quality.
- Improved BDsub loading, it should now handle errors better.
- Added support for loading Scenarist XML files - Experimental, so check for errors.
- Forgot to add "Thanks to" to Pelican9 for help on the RLE decoding and 0xdeadbeef for help on the PTS/DTS calculation.
- Cosmetic change.


BDSupEdit Version 0.1
- First public version

Last edited by GZZ; 18th April 2009 at 16:29.
GZZ is offline   Reply With Quote
Old 6th April 2009, 00:46   #2  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Wow, I think you just made tons of people's day. The downscaling capabilities have been missing in almost every tool yet, so this is fantastic for people making 720p backups with subtitles.

I haven't tested yet, but I may later once I have some time.
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 6th April 2009, 14:04   #3  |  Link
avivahl
Registered User
 
Join Date: Dec 2007
Posts: 215
How does it differ from BDSup2Sub? Just another option for us users?
avivahl is offline   Reply With Quote
Old 6th April 2009, 15:27   #4  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
it differ in that way, that my program export to bluray subtitles, its not the same as DVD subtitles. IDX/SUB are in DVD resolution, where Bluray subtitles used on bluray support higher resolutions and it can be used on BD5/BD9 movies, which contains the bluray structure. So its not the same.

Also DVD subtitles only support 4 colors I think, where bluray support up to 256 colors including alpha values for transparent areas.

But at the moment only IDX/SUB can be muxed into mkv movies, so you wont get anything useful out of my program, if your target is mkv, its only useful for BD5/9.
GZZ is offline   Reply With Quote
Old 6th April 2009, 18:17   #5  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by GZZ View Post
it differ in that way, that my program export to bluray subtitles[...]
So its not the same.
Maybe you should have a closer look.
0xdeadbeef is offline   Reply With Quote
Old 6th April 2009, 18:34   #6  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
I might have missed that one, thanks.
GZZ is offline   Reply With Quote
Old 6th April 2009, 21:32   #7  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Perfect; that is what i've been looking for.
Pelican was working on it but he is not come back from Amazon jungles yet.
I resized an 1080 sup to 720 as sup.
I gave it a go with ulf's script before but the output file was not sup.
So, some notes and feature request:
I tried BDSupEdit with an HD-DVD sup; so i had to make it first BD compliant sup via SupRead.
The first feature request.

The second one is PAL speedup feature.
Here is what kind of torture to me:
http://forum.doom9.org/showthread.ph...00#post1181900

Thanks bro.

A sample (FF2 HD-DVD) converted to 720p BD. (i muxed eac3 which is not compliant with BD but no matter to me; i watch them on HTPC.)

http://www.sendspace.com/file/rpdxws

Last edited by rica; 6th April 2009 at 22:26.
rica is offline   Reply With Quote
Old 12th April 2009, 14:39   #8  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Made an Update. Check my first post for changed.

Quote:
Also, take a look at Pelican9's tool SUPread. SUPread can export to PNG's and Scenarist BDN XML file. The PNG's are not trimmed though. SUPread always export 1920x1080 PNG's.
You should check the new version out.
GZZ is offline   Reply With Quote
Old 12th April 2009, 15:11   #9  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Quote:
Originally Posted by GZZ View Post
Made an Update. Check my first post for changed.



You should check the new version out.
Thanks a lot, i'll give it a go asap.
rica is offline   Reply With Quote
Old 12th April 2009, 15:59   #10  |  Link
laserfan
Aging Video Hobbyist
 
Join Date: Dec 2004
Location: Off the Map
Posts: 2,461
Thanks for looking! FYI I just tried to demux the subtitle from the HD DVD using tsMuxeR, and it wouldn't do it ("Some tracks not recognized. This tracks was ignored.." sic). In eac3to's log it said "4: Subtitle (DVD), English, "for the Hearing Impaired" and on import to SUPread (as you will see) it says "D:\video\englishHDDVD.sup loading -- HD DVD (DVD) subtitle found." So they seem to think (correctly I guess) that it's a "DVD" subtitle and not hi-def.

But like I said in my first post, the SUPread-converted output doesn't show-up on playback, only after import/export w/your tool does it finally appear. It just seems to me that maybe as your tool appears to be interpreting it as a 1920x1080 sup then it is re-sizing it un-necessarily.

Last edited by laserfan; 12th April 2009 at 16:03.
laserfan is offline   Reply With Quote
Old 13th April 2009, 11:41   #11  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
Scenarist XML import

Thanks GZZ for taking up the work of implementing Scenarist XML import!

Here is what I have found out so far for BDSupEdit Ver 0.2:

1. I first got the error "Could not convert variant of type (Null) into type (Boolean)". This was resolved by changing all occurance of Forced="False"> to forced="False">.

2. The timings were incorrect in the produced sup file. The XML file had FrameRate="23.976". The timings would have been correct for FrameRate="24". BDSupEdit produces the same timings for both cases. The timings in a BDN XML file are really frame counts. So in the case where fps=23.976, the timings are given in the BDN XML file as if the frame rate was 24 fps. In the cases where the frame rates are 23.976, 29.97 or 59.94 fps, you have to multiply the times Ver 0.2 produces by a factor of 1.001.

3. Subtitle bitmaps that are already trimmed are not handled correctly (as the example in post #16). They will end up in the upper left corner of the bitmap. BDSupEdit seems to ignore the X and Y coordinate placement information in the XML file.

Overall, this is a very good and promising start. The fact that BDSupEdit trims the bitmaps is a nice feature. Keep up the good work!

Last edited by Ulf; 15th April 2009 at 12:07.
Ulf is offline   Reply With Quote
Old 13th April 2009, 14:18   #12  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Quote:
1. I first got the error "Could not convert variant of type (Null) into type (Boolean)". This was resolved by changing all occurance of Forced="False"> to forced="False">.
I see the problem in my XML reader. Will fix this in next version.

Quote:
2. The timings were incorrect in the produced sup file. The XML file had FrameRate="23.976". The timings would have been correct for FrameRate="24". BDSupEdit produces the same timings for both cases. The timings in a BDN XML file are really frame counts. So in the case where fps=23.976, the timings are given in the BDN XML file as if the frame rate was 24 fps. In the cases where the frame rates are 23.976, 29.97 or 59.94 fps, you have to multiply the times Ver 0.2 produces by a factor of 1.001.
I used the timecode without converting it, so this is a clear issue from my side. I will fix this.

Quote:
3. Subtitle bitmaps that are already trimmed are not handled correctly (as the example in post #16). They will end up in the upper right corner of the bitmap. BDSupEdit seems to ignore the X and Y coordinate placement information in the XML file.
I added a trimming function, because supread always output 1920x1080 png image, so there is properly an error when reading already trimmed image. I will also fix this.

Thanks alot for all the info.
GZZ is offline   Reply With Quote
Old 13th April 2009, 17:40   #13  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
GZZ!

The syntax for the timings in a BDN XML file (e.g. 01:00:00:12) is:
HH:MM:SS:FF, where FF is frames.
If FrameRate=24 the above timing translates to 3600.5 s.
For FrameRate=23.976 it translates to 3600.5*1.001 s
Ulf is offline   Reply With Quote
Old 14th April 2009, 21:18   #14  |  Link
Daiz
Registered User
 
Join Date: Jan 2008
Location: Finland
Posts: 68
Finally a free program that can convert BDN XML + 8-bit PNGs to Blu-ray compatible SUPs I've been waiting for this!

A request, can you add commandline switches? something like BDSupEdit input.sup/.xml [options, like -resize 1280x720 -method lanczos] output.sup would be very nice.
__________________
Where did neuron1 go? | Doom10
Daiz is offline   Reply With Quote
Old 14th April 2009, 21:40   #15  |  Link
OptimusX
Registered User
 
Join Date: Apr 2007
Posts: 20
These are wonderful developments...MaestroSBT with BDN/xml ability + BDSupEdit = just what I've been waiting for! Thanks to all for sharing your work!
OptimusX is offline   Reply With Quote
Old 18th April 2009, 09:16   #16  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Posted a new version that hopefully will fix alot of issues as I spend so much time making it overall better. Check my first post for change. Also please donate a coin or two. :P
GZZ is offline   Reply With Quote
Old 18th April 2009, 12:55   #17  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Made another update, its a pure bugfix version. Hopefully I didnt mis other things.
GZZ is offline   Reply With Quote
Old 18th April 2009, 14:54   #18  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
Quote:
Originally Posted by GZZ View Post
Made another update, its a pure bugfix version. Hopefully I didnt mis other things.
Sorry, but I cant import (otherwise fully functional) XML's with ver 0.4.

I get the error:
Code:
Cant parse Scenarist XML file.
'23,976' is not a valid floating point value
BDSupEdit might refer to this line in the XML file:
Code:
   <Format VideoFormat="720p" FrameRate="23.976" DropFrame="False"/>
but it's perfectly valid.
I have also tried with Scenarist exports from SUPRead with the same results.
Ulf is offline   Reply With Quote
Old 18th April 2009, 15:34   #19  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
thats odd I just tested it using a Supread output and with 23,976 and 23.976 and it worked just fine. Maybe I did mis something. Will do a check.
GZZ is offline   Reply With Quote
Old 18th April 2009, 16:29   #20  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Added a new version, I changed the framerate detection a bit, might have had issue, but not sure how. Tryout version 0.41 and if it dosnt work, please post your xml file.
GZZ is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 23:20.


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