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 6th April 2009, 21:56   #8  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Quote:
Originally Posted by rica View Post
I resized an 1080 sup to 720 as sup.
[...]
I tried BDSupEdit with an HD-DVD sup;
[...]
The second one is PAL speedup feature.
Hm? Hint?
0xdeadbeef is offline   Reply With Quote
Old 6th April 2009, 22:25   #9  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Quote:
Originally Posted by 0xdeadbeef View Post
Hm? Hint?
I think you should change the headline of your thread first:
Code:
BDSup2Sub - A converter from Blu-Ray/HD-DVD SUP to DVD SUB/IDX (VobSub)
rica is offline   Reply With Quote
Old 6th April 2009, 23:31   #10  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Quote:
Originally Posted by 0xdeadbeef View Post
Hm? Hint?
OK gave it a go with your tool as well.
Thanks it is nice tool.
But here are the differences of resulting pngs between them:
(above capture is gotten with BDSupEdit and below with your BDSup2Sub)


Last edited by Guest; 7th April 2009 at 03:26.
rica is offline   Reply With Quote
Old 7th April 2009, 00:22   #11  |  Link
0xdeadbeef
Author of BDSup2Sub
 
Join Date: Jun 2003
Posts: 478
Dunno what you're comparing there, since the above pic has at least twice the resolution (and a strange red tint).
Anyway nobody complained about the scaling quality yet. Then again this should be discussed in the according thread.
0xdeadbeef is offline   Reply With Quote
Old 7th April 2009, 00:27   #12  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Quote:
Originally Posted by 0xdeadbeef View Post
Then again this should be discussed in the according thread.
You're right. Gonna be there soon.
rica is offline   Reply With Quote
Old 7th April 2009, 08:20   #13  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Hey Rica.

Can you upload the image, so I can have a look at it?
GZZ is offline   Reply With Quote
Old 7th April 2009, 09:15   #14  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
Just the tool I have been waiting for, great job GZZ! The quality of the downsizing to 720p is amazing. BDSupEdit beats BDSup2Sub quality wise in 1080p to 720p downscaling in my opinion.

Would it be difficult to add import of PNG's with an BDN XML file? The reason I ask is because there is no decent free tool for creating your own (high quality) BD subtitles. I have developed a way to create BD subtitles starting by using MaestroSBT to create a SST file and 3840x2160 pixels BMP's. From these I create 1080p or 720p PNG's (8-bit with alpha transparency and trimmed) and a BDN XML file, but these are only usable for import to Scenarist. The resulting subtitles are great though. I will be happy to share the tools if anyone is interested (one warning - it is painfully slow).
Ulf is offline   Reply With Quote
Old 7th April 2009, 11:39   #15  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Quote:
Just the tool I have been waiting for, great job GZZ! The quality of the downsizing to 720p is amazing. BDSupEdit beats BDSup2Sub quality wise in 1080p to 720p downscaling in my opinion.
I worked hard on that one, so glad you like it.

Im looking into creating your own subtitles, it will properly take a little while, have a few things I need to overcome.

You have an example of the BDN XML file ?
GZZ is offline   Reply With Quote
Old 7th April 2009, 12:46   #16  |  Link
Ulf
Registered User
 
Join Date: Sep 2008
Location: Sweden
Posts: 66
Quote:
Originally Posted by GZZ View Post
You have an example of the BDN XML file ?
Yes, here is one example:
Code:
<?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="Invasion" Content=""/>
    <Language Code="swe"/>
    <Format VideoFormat="1080p" FrameRate="23.976" DropFrame="False"/>
    <Events Type="Graphic" FirstEventInTC="00:01:00:04" LastEventOutTC="00:02:52:06" NumberofEvents="3"/>
  </Description>
  <Events>
    <Event InTC="00:01:00:04" OutTC="00:01:04:14" Forced="False">
      <Graphic Width="777" Height="148" X="567" Y="877">line_0001.png</Graphic>
    </Event>
    <Event InTC="00:02:01:12" OutTC="00:02:06:22" Forced="False">
      <Graphic Width="1004" Height="149" X="457" Y="64">line_0002.png</Graphic>
    </Event>
    <Event InTC="00:02:49:14" OutTC="00:02:52:06" Forced="False">
      <Graphic Width="980" Height="152" X="468" Y="873">line_0003.png</Graphic>
    </Event>
  </Events>
</BDN>
This BDN subtitle file (together with the PNG's) can be imported in Scenarist.
It's an output from my tool where I create subtitles with the help of MaestroSBT. View the attachment for the resulting SUP file.
I have taken 3 lines (in swedish) from the film Invasion. For those who have the Blu-ray disk can compare the quality (I think it beats the original).

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.

Maestro_ex.zip

Last edited by Ulf; 7th April 2009 at 17:44.
Ulf is offline   Reply With Quote
Old 7th April 2009, 19:26   #17  |  Link
rica
Registered User
 
Join Date: Mar 2008
Posts: 2,021
Quote:
Originally Posted by GZZ View Post
Hey Rica.

Can you upload the image, so I can have a look at it?
Sure:
http://www.sendspace.com/file/3wjmc0
rica is offline   Reply With Quote
Old 7th April 2009, 20:59   #18  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Maybe some one here can help me out on this one. I got a PG header with the PTS value of 2522579 (Equal to timecode 00:00:28,029) Sec2Timecode(2522579 / 90) //90 khz clock.

in the next PG header I got a PTS value of 2522216 (Equal to timecode 00:00:28,025) Sec2Timecode(2522216 / 90) //90 khz clock.

this is from a original BD file, if want to create my own BD subtitle from stratch or just from an image and only have the start PTS and end PTS. How do I calculate the PTS values in between (Marked with red). Anyone know ?

Quote:
:Begin subtitle 1

PG FOUND
PTS StartTime: 00:00:28,029 - 2522579 (Begin time)
DTS StartTime: 00:00:00,000

Identifier: 22 (0x16)

PG FOUND
PTS StartTime: 00:00:28,025 - 2522216
DTS StartTime: 00:00:00,000

Identifier: 23 (0x17)

Identifier: 20 (0x14)

Identifier: 21 (0x15)

PG FOUND
PTS StartTime: 00:00:31,407 - 2826632
DTS StartTime: 00:00:00,000

Identifier: 22 (0x16)

PG FOUND
PTS StartTime: 00:00:31,403 - 2826270 - (End time)
DTS StartTime: 00:00:00,000

Identifier: 23 (0x17)

:End of subtitle1
GZZ is offline   Reply With Quote
Old 11th April 2009, 00:26   #19  |  Link
laserfan
Aging Video Hobbyist
 
Join Date: Dec 2004
Location: Off the Map
Posts: 2,461
Quote:
Originally Posted by rica View Post
...the differences of resulting pngs between them:
(above capture is gotten with BDSupEdit and below with your BDSup2Sub)

I extracted an HDDVD subtitle from a 720x480i extra, but after I converted it with SupRead it didn't "show up" in the resulting tsMuxeR Blu-ray mux i.e. it was not visible when selected. Oddly, when I inputted this .sup to tsMuxeR GUI, it said "PGS Resolution: 1920:1080 Frame rate: 29.97". Maybe that's why it would not appear?

So I imported the original HDDVD extract with BDSupEdit, and it too thought the .sup was 1920x1080 i.e. a straight "Don't Resize" yielded a 1920x1080 result. If I check "Resize to 720x480" the result muxes and appears to be sized correctly for the frame, and it looks smooth, but it has a red outline as rica's.

BDSup2Sub also thinks it's a 1920x1080, and exports to 720x480 which muxes and shows fine, except the output is a bit "wrinkle-y" compared to BDSupEdit; it's not quite as smooth in appearance.

I dunno where the mistake is made with these proggies thinking it's a 1920x1080 subtitle; maybe eac3to? But BDSupEdit's conversion looks good except it might be nice to lose the red outline!

I uploaded a piece of the subtitle: here.

Last edited by laserfan; 11th April 2009 at 01:06.
laserfan is offline   Reply With Quote
Old 12th April 2009, 09:10   #20  |  Link
GZZ
Registered User
 
Join Date: Jan 2002
Posts: 581
Hey laserfan.

Your subtitle is a HD DVD subtitle, my program only support Bluray subtitles, so you need to convert it to BD subtitle in Supread.

Second, your sample is broken, so I cant even convert it for you, please upload a complete sup file. You can Rar it before uploading, then it will be smaller.
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 22:17.


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