PDA

View Full Version : BDSupEdit


GZZ
5th April 2009, 23:11
I created this tool, as I was missing a tool to downscale BD subtitles to be used on 720p encoded movies.

http://hbar.dk/files/BDSupEdit/BDSupEdit.png

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 (http://hbar.dk/files/BDSupEdit/BDSupEdit041.rar)

Old Version:
BDSupEdit Ver 0.1 (http://hbar.dk/files/BDSupEdit/BDSupEdit01.rar)
BDSupEdit Ver 0.2 (http://hbar.dk/files/BDSupEdit/BDSupEdit02.rar)
BDSupEdit Ver 0.3 (http://hbar.dk/files/BDSupEdit/BDSupEdit03.rar)
BDSupEdit Ver 0.4 (http://hbar.dk/files/BDSupEdit/BDSupEdit04.rar)

Change log:

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

Adub
6th April 2009, 01:46
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.

avivahl
6th April 2009, 15:04
How does it differ from BDSup2Sub? Just another option for us users? :)

GZZ
6th April 2009, 16:27
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.

0xdeadbeef
6th April 2009, 19:17
it differ in that way, that my program export to bluray subtitles[...]
So its not the same.
Maybe you should have a closer look.

GZZ
6th April 2009, 19:34
I might have missed that one, thanks.

rica
6th April 2009, 22:32
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.php?p=1181900#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

0xdeadbeef
6th April 2009, 22:56
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?

rica
6th April 2009, 23:25
Hm? Hint?

I think you should change the headline of your thread first:
BDSup2Sub - A converter from Blu-Ray/HD-DVD SUP to DVD SUB/IDX (VobSub)

rica
7th April 2009, 00:31
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)

http://img22.imageshack.us/img22/1391/difference.th.png (http://img22.imageshack.us/my.php?image=difference.png)

0xdeadbeef
7th April 2009, 01:22
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.

rica
7th April 2009, 01:27
Then again this should be discussed in the according thread.

You're right. Gonna be there soon.

GZZ
7th April 2009, 09:20
Hey Rica.

Can you upload the image, so I can have a look at it?

Ulf
7th April 2009, 10:15
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).

GZZ
7th April 2009, 12:39
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 ?

Ulf
7th April 2009, 13:46
You have an example of the BDN XML file ?
Yes, here is one 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="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.

9732

rica
7th April 2009, 20:26
Hey Rica.

Can you upload the image, so I can have a look at it?

Sure:
http://www.sendspace.com/file/3wjmc0

GZZ
7th April 2009, 21:59
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 ?


: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

laserfan
11th April 2009, 01:26
...the differences of resulting pngs between them:
(above capture is gotten with BDSupEdit and below with your BDSup2Sub)

http://img22.imageshack.us/img22/1391/difference.th.png (http://img22.imageshack.us/my.php?image=difference.png)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. (http://www.mediafire.com/?no42wmizlua)

GZZ
12th April 2009, 10:10
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.

rica
12th April 2009, 12:58
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.


gzz, please check the subtitle on my iso file.
You will find it at post 7...
Original was HD-DVD and Supread used...

GZZ
12th April 2009, 14:51
gzz, please check the subtitle on my iso file.
You will find it at post 7...
Original was HD-DVD and Supread used...

I will have a look at it.

GZZ
12th April 2009, 14:57
The red color around the letters are also on the orginal files ?

So I see 2 things here.

1) A request to make a speedup / speeddown like eac3to does for audio and video ?

2) A way to change the colorpalette, so the red color can be removed / Changed ?

rica
12th April 2009, 15:01
The red color around the letters are also on the orginal files ?


No.

So I see 2 things here.

1) A request to make a speedup / speeddown like eac3to does for audio and video ?

2) A way to change the colorpalette, so the red color can be removed / Changed ?

Correct.

GZZ
12th April 2009, 15:09
you have a original HD-sub file, so I can check if its not a HD -> Bluray bug in Supread ?

rica
12th April 2009, 15:11
gzz, btw i'll check if BD sup gives this red outline as well.
It might be related with SupRead?
Haven't given it a go with a BD subtitle yet.
I'll make you inform after the trial.

GZZ
12th April 2009, 15:39
Made an Update. Check my first post for changed.

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.

rica
12th April 2009, 16:11
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.

laserfan
12th April 2009, 16:35
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.
Hey GZZ,

You didn't read my post! I *did* convert with Supread prior to your program. What I'm trying to find out is why this subtitle, which is a subtitle from a 720x480 program, is being read as a 1920x1080 instead. I thought you might be able to determine this from a piece of the file (I assume there's header info there).

Never mind, I've uploaded the complete, original HD DVD subtitle here (http://www.mediafire.com/file/mzr2j0nwtiv/engHDDVD.7z). It's compressed w/7zip.

If you think it might be an eac3to issue, maybe I can try demuxing instead with tsMuxeR. Hmmm....

GZZ
12th April 2009, 16:43
Never mind, I've uploaded the complete, original HD DVD subtitle here. It's compressed w/7zip.

I'll have a look at it.

laserfan
12th April 2009, 16:59
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.

laserfan
12th April 2009, 20:37
...I'm trying to find out is why this subtitle, which is a subtitle from a 720x480 program, is being read as a 1920x1080 instead...Oh, good grief! I was sitting here staring at the open SUPread window I had in front of me, and thought to try the "Save bitmaps" button! All the subtitles are indeed 1920x1080 bitmaps!!! :eek:

I had no idea it might be possible to mix HD subtitles with an SD program!? So I have to say "never mind" and "sorry for the bandwidth" as your program just did what it was supposed to do.

Still wonder why your output has a thin red outline after re-sizing, but my question about "why 1920x1080" was just plumb wrong! So sorry--my mistake! :o

GZZ
12th April 2009, 20:42
its ok. I still got the "red subtitle" sample I can play around with. :)

rica
12th April 2009, 21:32
OK,

i gave it a go with previous build first.
No red artifact with BD sup.

Second, i tried the new build.
Nothing has changed with our red ghost.
And now i'm sure it is not related with SupRead at all since:

1) Opened this supread BD sup with BDSupEdit and export as PNGs (red was still there)

2) Opened this supread BD sup with BDSup2Sub (instead of opening the original HD-DVD sup directly) and export as BD sup without resizing and later opened resulting sup file with BDSupEdit and resize/export as PNGs.
(no red ghost via BDSup2Sub and perfect resizing via BDSupEdit)
I think i stick to the second method as ripping HD-DVD sups until gzz figure out the red ghost issue.:)

rica
12th April 2009, 23:37
OK,

iI think i stick to the second method as ripping HD-DVD sups until gzz figure out the red ghost issue.:)

But this time i've just noticed a greeny ghost even the resize quality is much better with this method? (the newest build makes more greeny btw.)

http://img21.imageshack.us/img21/9964/36118694.png


And this is BDSup2Sub result (BDSup is directly resized with this program.)

http://img21.imageshack.us/img21/2830/notok.png

No greeny but not good resized.

(both screen shots enlarged to 400%)
_ _ _ _ _

Ulf
13th April 2009, 12:41
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!

GZZ
13th April 2009, 15:18
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.

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. :)

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. :D

Thanks alot for all the info. :)

Ulf
13th April 2009, 18:40
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

Daiz
14th April 2009, 22:18
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.

OptimusX
14th April 2009, 22:40
These are wonderful developments...MaestroSBT with BDN/xml ability + BDSupEdit = just what I've been waiting for! Thanks to all for sharing your work!

laserfan
15th April 2009, 21:42
its ok. I still got the "red subtitle" sample I can play around with.Any luck with this issue GZZ? Like rica, I much prefer BDSupEdit's smoothness after scaling (over that other program BDSup2Sub) but the red outline tinge is a distraction...

0xdeadbeef
15th April 2009, 23:27
Any luck with this issue GZZ? Like rica, I much prefer BDSupEdit's smoothness after scaling (over that other program BDSup2Sub) but the red outline tinge is a distraction...
This "lack of smoothness" in rare cases was indeed not related to the scaling but caused by BDSup2Sub keeping the original palette. If the original palette didn't contain enough intermediate colors/alphas, edges showed aliasing.
However, Since 3.2.0 the palette is created for each caption by default.

PassThePeas
16th April 2009, 01:02
The red color around the letters are also on the orginal files ?

So I see 2 things here.

1) A request to make a speedup / speeddown like eac3to does for audio and video ?

2) A way to change the colorpalette, so the red color can be removed / Changed ?

First, thanks for sharing that tool which seems very useful and even more promising.

I second that request for palette change as I think it's at the origin of a problem I encounter with converting HD DVD sups to BD sups with supread :
- When playing on PC : OK, but ...
- When playing on my SAP (Sony BDP350) : weird behaviour :
* Everything is fine until first sub appears
* First sub : screen goes black except for the sub "bounding box" => so you can see the sub and the picture behind the sub bounding box, but the rest of the picture is black
* After that : black screen when no sub, same behaviour as the first sub when other subs displayed

Trying to understand where this could come from I compared sup HD DVD converted subs (using SupRead) and originally extracted BD sups (using eac3to). The only difference I could see was the palette containing a red color which seems to be used as the transparent color (SupRead palette display showed red in the pallette and extracted png with SupRead confirmed that).

Any idea on a workaround to help me convert those subs to BD compliant with my SAP or an update on the possibility to see the feature request fullfilled ?

Thanks in advance !!

laserfan
16th April 2009, 02:21
This "lack of smoothness" in rare cases was indeed not related to the scaling but caused by BDSup2Sub keeping the original palette. If the original palette didn't contain enough intermediate colors/alphas, edges showed aliasing. However, Since 3.2.0 the palette is created for each caption by default.But I'm not talking about the edges per se, rather what I would call "vertical jaggies", most noticeable on diagonals and italic s:

http://img17.imageshack.us/img17/5285/subcompare.jpg

Except for the red fringe, I prefer BDSupEdit's output. Yours below was made with 320 and Create new palette. You can download the sub from an earlier post here & see for yourself.

rica
16th April 2009, 02:53
http://img6.imageshack.us/img6/7803/newj.png

Created by BDsup2Sub 3.2.0.
Still not so good but close to BDSupedit.

Ulf
16th April 2009, 09:11
It should be easy enough to ask GZZ for an option in BDSupEdit to output in B/W (setting Cr=Cb=128). I have seen strange color casts/fringes in some subs that are there from the beginning.

laserfan
16th April 2009, 15:52
http://img6.imageshack.us/img6/7803/newj.png

Created by BDsup2Sub 3.2.0.
Still not so good but close to BDSupedit.But again, rather nasty jaggies in the diagonals.

GZZ
18th April 2009, 10:16
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
18th April 2009, 13:55
Made another update, its a pure bugfix version. Hopefully I didnt mis other things.

Ulf
18th April 2009, 15:54
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:
Cant parse Scenarist XML file.
'23,976' is not a valid floating point value

BDSupEdit might refer to this line in the XML file:
<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.

GZZ
18th April 2009, 16:34
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
18th April 2009, 17:29
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.

laserfan
18th April 2009, 18:32
0.41 output for me still has red tinge, but worse, the subs are no longer in sync. :(

Ulf
18th April 2009, 21:57
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.

I have tested XML import for a few cases with different frame rates and version 0.41 seems to work fine in this respect.

Ulf
18th April 2009, 22:07
0.41 output for me still has red tinge, but worse, the subs are no longer in sync. :(

Are you sure that the source material lacks a red tinge? If it's there in the source, it will also be there if you scale it down with BDSupEdit!
One way to find out is to extract the PNG's from the original SUP with SUPRead and inspect the palette in tweakpng.exe (http://entropymine.com/jason/tweakpng/).

GZZ
19th April 2009, 00:46
0.41 output for me still has red tinge, but worse, the subs are no longer in sync. :(

About the red ring, I still see this, but are you 100% sure its not in the original subtitle ? I use the correct color conversion in my tool, so the conversion should be correct.

About the subtitles are no longer in sync is bad. What version did this happen with ? I will do some testing to see if I can reproduce this. Was your Input XML or BD-sub and do you have the subtitle (please upload it) ?.


Are you sure that the source material lacks a red tinge? If it's there in the source, it will also be there if you scale it down with BDSupEdit!
One way to find out is to extract the PNG's from the original SUP with SUPRead and inspect the palette in tweakpng.exe (http://entropymine.com/jason/tweakpng/).

I will try it out.

GZZ
19th April 2009, 11:30
0.41 output for me still has red tinge

About the red outer ring, I did what ulf told me and here is the result from the png file. It does have a few entries with red color. So my program does what it should. A later option could be the possibility to change it.

http://hbar.dk/files/bdsupedit/colorpalette.png


but worse, the subs are no longer in sync. :(

I just did a test on my subtitles and I cant see why it should be out of sync, but if you could provide me with a bit more infomation, like did you resize the subtitles, upload a sample and tell me what you did and so on it would help me alot. :thanks:

GZZ
19th April 2009, 12:59
Found one issue with the framerate. If your input was 29.97, then it would be set to 23.976 when saving. Other input was handle correctly.

0xdeadbeef
19th April 2009, 13:42
About the red outer ring, I did what ulf told me and here is the result from the png file. It does have a few entries with red color. So my program does what it should. A later option could be the possibility to change it.
While I haven't looked into this, I would assume that the image contains fully transparent pixels that still have color components (in this case: red ones).
At least that would explain why BDSup2Sub doesn't show the red fringe. BDSup2Sub assumes fully transparent pixels to be black, no matter what the original color was to avoid this kind of problems when scaling.

GZZ
19th April 2009, 14:40
While I haven't looked into this, I would assume that the image contains fully transparent pixels that still have color components (in this case: red ones).
At least that would explain why BDSup2Sub doesn't show the red fringe. BDSup2Sub assumes fully transparent pixels to be black, no matter what the original color was to avoid this kind of problems when scaling.

You are correct, it did have several index with a Alpha value of 0 and a RGB color of (236, 34, 16). This had an influence on scaling. Thanks.

turbojet
29th April 2009, 21:50
This sup (http://www.sendspace.com/file/m1t7m0) has alignment issues, about half of them seem to be too high and off to the left.

Also any plans for command line support?

GZZ
30th April 2009, 10:49
I will have a look at the subtitle. Thanks.

Also any plans for command line support?

Yes, but not in next version. Been busy lately, so havent had the time needed to make an update.

GZZ
30th April 2009, 21:36
How does it differ from BDSup2Sub? Just another option for us users?

I guess it is.

turbojet
30th April 2009, 22:59
Advantages of BDSupEdit I see over BDSup2Sub is that it doesn't rely on java and it arguably resizes at a higher quality
Disadvantages I see is it doesn't output to vobsub, doesn't have command line support and still has some bugs to work out.

GZZ
1st May 2009, 08:56
Advantages of BDSupEdit I see over BDSup2Sub is that it doesn't rely on java and it arguably resizes at a higher quality
Disadvantages I see is it doesn't output to vobsub, doesn't have command line support and still has some bugs to work out.

Spot on. I'm working to make it better, but its a free-time tool, so time is limited at the moment, but its not dead. :)

0xdeadbeef
1st May 2009, 11:28
Yet it's questionable to allege platform independence (and documented library interfaces for own application) as a bad point and the "higher quality" issue doesn't seem to be based on any facts.
Anyway, everybody who compares the features lists or just the result of complex BD-SUP imports will find out that there are quite a lot more differences between BDSupEdit and BDSup2Sub.

turbojet
1st May 2009, 12:37
Cross platform is nice for non-windows users. For windows users it doesn't mean much but to make it more friendlier it would be really nice if java had redist libs and had better support, like wxwidgets has.

As it stands right now BDSup2Sub's bdn xml input is broken for me because of a buggy 64 bit JRE and their support seems to be like talking to a brick wall so far. Also many hours were spent getting BDSup2Sub to associate with .sup files and the context menu we got, with native windows the association would be a simple open with, as long as the program had an input parameter and with the context menu we wouldn't have to call javaw (which path could vary on every computer). With redist libs people wouldn't have to install an ~80 MB program to run a ~500 KB app and wouldn't have to call javaw all the time. That's how I see the java limitations being a disadvantage over a native windows app.

I did forget to mention repositioning and swapping colors in BDSup2Sub features and maybe something else. A little OT here but concerning repositioning subs have either of you looked at BD menus? If so is it anything like repositioning subs (to hide menu buttons)?

0xdeadbeef
1st May 2009, 13:07
None of these argument is valid, but I won't discuss this here as I don't intend to hijack this thread.
About support for interactive presentation graphics: I severely doubt that any free/low cost tool will support handling of these streams in the next two years (if ever). BDSup2Sub won't for sure.

rica
15th August 2009, 21:32
GZZ,

what's up?

sneaker_ger
19th August 2009, 19:01
In the AVS2BDNXML thread (http://forum.doom9.org/showthread.php?p=1316234#post1316234) we discovered a problem that seems to be an error in BDSupEdit.

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/?ikmmmitmnji) 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.

/edit: This error turned out to be an error in the AviSynth SupTitle plugin and not in BDSupedit.