Log in

View Full Version : HD subtitle ripping (SUPread)


Pages : 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16

jamos
27th February 2008, 00:26
New hdsup2bdn:

http://www.sendspace.com/file/1oij4n

Allowed options:
--help produce help message
--version print version number
--original output PNG images in the original size (suitable for
OCR)
--fullpng output 1920x1080 PNG images [DEFAULT]
--nobdnfixtimes do not divide BDN times by 1.001 (BDN output only)
--bdnfixtimes divide BDN times by 1.001 (BDN output only) [DEFAULT]
--srtfixtimes divide SRT times by 1.001 (SRT output only)
--nosrtfixtimes divide SRT times by 1.001 (SRT output only) [DEFAULT]
--framerate arg frame rate [DEFAULT: 29.97]
--input-file arg input file
--srt output SRT file
--xml output Scenarist HDMV BDN file
--forcedsubs make all subtitles forced (BDN output only)
--dropframes flag all subtitle times as drop frames (BDN output
only)
--nopng don't generate any PNGs
--blackbackground always make the transparent background black (index 0)
[RGB 0,0,0]
--blackemphasis make the HD-DVD emphasis pixels (index 2 and 3) black
--enhancecontrast make all pixels with Y < 127 black, and pixels with Y
>= 128 white (easier to OCR). Also forces background to
black.


Example usage:

C:\My Downloads\Subtitles\Mr. Bean's Holiday>C:\Projects\Blu-ray\hdsup2bdn\release\hdsup2bdn.exe --xml --enhancecontrast FEATURE_1_MERGED.Subpicture.14.sup
XML (BDN) output selected
Force all pixels to black except the main pattern
framerate defaults to 29.97
Input files are: FEATURE_1_MERGED.Subpicture.14.sup
hdsup2bdn version 1.04


--enhancecontrast forces all colors with Y < 127 to be black, and all other colors to be white. This is a cheap hack but hopefully works for most people!

looks good how would i get 1280x720 subpictures from a 1080p source?

jamos
27th February 2008, 00:37
i am getting a error using your program rectal-> No SP found in header. with the same file supread can read it fine.

Rectal Prolapse
27th February 2008, 18:24
jamos, hdsup2bdn only works on hd-dvd .sup files. It won't work on blu-ray .sups (yet - no ETA for that). The intent of hdsup2bdn is to create subtitles from HD-DVDs for authoring on Blu-ray disc.

I haven't tested on 1280x720p .sup files - it probably won't work!

Pelican9
27th February 2008, 19:41
Changes for v0.51

- New option: OCR export black and white only
- export 8 bit PNG (Scenarist compatible)

Change for v0.50

- New option: export png at 720p

You have to download the abc.png (http://pel.hu/down/abc.png), because it's changed from PNG24 to PNG8 too.

I'm too tired to testing it accurately so any feedback is helpful.

laserfan
27th February 2008, 22:05
Been using SUPread successfully on a few HD DVDs (thanks Pelican9) but have run into a problem. Has anyone here tried SUPread on Pan's Labyrinth (English track)? Between ST572 and 573 the time position goes from 1:09 to 00:01 as though a glitch exists in the joined evo (tried both evodemux and eac3to to join and both fail). Guess I can repair the timings but was hoping for an easier way out. :o

Also, SUPread doesn't OCR the odd bitmaps Pan's seems to use as well as on other discs. Is the Skew option explained somewhere so that I can try to tinker w/the setting and maybe OCR a bit better? :confused:

marco_ooo
27th February 2008, 23:30
Changes for v0.51

- New option: OCR export black and white only
- export 8 bit PNG (Scenarist compatible)

Change for v0.50

- New option: export png at 720p

You have to download the abc.png (http://pel.hu/down/abc.png), because it's changed from PNG24 to PNG8 too.

I'm too tired to testing it accurately so any feedback is helpful.


tested the latest version on the hd dvd from red dragon

the png are 1280x720

but the xml tell that they are 1920x1080 so scenarist give a error at the muxing point

a small part of the xml looks like this

<?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="FEATURE_1_MERGED.Subpicture.10" Content="" />
<Language Code="eng" />
<Format VideoFormat="1080p" FrameRate="23.976" DropFrame="False" />
<Events Type="Graphic" FirstEventInTC="00:00:54:04" LastEventOutTC="02:00:07:03" NumberofEvents="1334" />
</Description>
- <Events>
- <Event InTC="00:00:54:04" OutTC="00:00:56:20" forced="False">
<Graphic Width="1920" Height="1080" X="0" Y="0">line0001.png</Graphic>
</Event>

Pelican9
28th February 2008, 00:31
tested the latest version on the hd dvd from red dragon

the png are 1280x720

but the xml tell that they are 1920x1080 so scenarist give a error at the muxing point


Thank you.
Fixed. The new version is available (v0.51b2)

marco_ooo
28th February 2008, 01:01
Thank you.
Fixed. The new version is available (v0.51b2)

wow thats fast :thanks:

chrkou
28th February 2008, 04:28
Pelican9: Great work!
You said something about, other languages png files, have you done anything with Greek?

Thanks.

Pelican9
28th February 2008, 10:27
Pelican9: Great work!
You said something about, other languages png files, have you done anything with Greek?

Thanks.

"I can only show you the door. You're the one that has to walk through it. ..."
:)

marco_ooo
28th February 2008, 11:12
uhmmm scenarist is doing ok now but
if i play the movie the screen goes black with the subtitle in it
as soon the sub title goes the picture comes back

the png from subtitle workshop have a white background
mayby that has to do with it

Pelican9
28th February 2008, 12:03
uhmmm scenarist is doing ok now but
if i play the movie the screen goes black with the subtitle in it
as soon the sub title goes the picture comes back

the png from subtitle workshop have a white background
mayby that has to do with it

It means that the subpicture image is not transparent.
Could anybody tell me what Scenarist needs exactly?
Transparent or white background?
Or transparent and white?

Is the OCR unchecked anyway?

marco_ooo
28th February 2008, 12:14
i have attached a working png maybey you know what to do with it

FalconIA
28th February 2008, 12:42
I dump a sup from a bd by tsMemux 0.0.2.0 and try to save images by SUPread 0.51b3.
But the SUPread crashed at the 61th image.
Is anyone know the reason of that?
Thanks a lot.

SUP HERE (http://falconia.ca/download/TEMP/DISC1_SUB_JPN.7z)

jamos
28th February 2008, 12:59
It means that the subpicture image is not transparent.
Could anybody tell me what Scenarist needs exactly?
Transparent or white background?
Or transparent and white?

Is the OCR unchecked anyway?

I get the same thing no transparent color just a white background. Do I need the palette check box clicked? OCR is unchecked because this is coming from a sup file.

the file you posted before above pelican works correctly with transparency although its font color was transparent when it should be white, though as you said its ugly, but you could use it to see how it is different than your current output.

http://forum.doom9.org/showpost.php?p=1105525&postcount=387

Also the .png I sent you in that email works correctly.

DELPHIINES
28th February 2008, 13:52
I have tried to create a .png file for greek,with no luck.So i have managed to find another way to bypass the whole .png file issue.I am using subtitle creator to create a sup file from srt and then i use supread to create a hd sup.The hdsup is usually 5 times larger than sdsup.aproximately 5 mg.Is this as large as a hd sup file should be?I can test it i am still waiting for to tsremux or tsmuxer to add support for the stream of supread.Anyway thanks pelican for this great tool:thanks:

jamos
28th February 2008, 22:32
Pelican do you need me to test anything for you? current version is still not working with scenarist.

thanks

Rectal Prolapse
29th February 2008, 03:36
It means that the subpicture image is not transparent.
Could anybody tell me what Scenarist needs exactly?
Transparent or white background?
Or transparent and white?


It only requires transparent background. The output from hdsup2bdn didn't help you? hdsup2bdn outputs the PNG format scenarist wants.

hdsup2bdn also preserves the index table (including the color + alpha channel) that the original HD-DVD subtitle has - so maybe Scenarist requires index 0 to be fully transparent?

Pelican9
29th February 2008, 09:07
It only requires transparent background. The output from hdsup2bdn didn't help you? hdsup2bdn outputs the PNG format scenarist wants.

hdsup2bdn also preserves the index table (including the color + alpha channel) that the original HD-DVD subtitle has - so maybe Scenarist requires index 0 to be fully transparent?
SUPread makes the same, preserves the original palette and transparency info, simply put to a png file. I'll check it again.

DELPHIINES:
Your subtitle stream has a subtitle with two windows (and some error). I've never seen this structure before that's why SUPread cannot handle it correctly.
I'm working on the solution.

jamos:
Thanks, but I've no idea what's wrong, because SUPread produce the same type of PNG which has worked before...

Pelican9
29th February 2008, 11:44
New beta.
PNG transparency fixed(?), please try with Scenarist.

DELPHIINES:
Does the 61st subtitle contain two text simultaneously?
Window positions:
id: 0 [1560,58] - [1625,309] it's a vertical at top right
id: 1 [623,915] - [1295,1018] it's a horizontal at the bottom
You can check during playback of the movie (at 00:17:00).

I'm looking for subtitle stream with multiple text at the same time.
I would like to know if DELPHIINES's subtitle is correct or not.

jamos
29th February 2008, 14:22
New beta.
PNG transparency fixed(?), please try with Scenarist.



Same issues as before in scenarist. I know that true white in scenarist is transparent, hence why we have to change the font color to slight off white in subtitleworkshop4. So for text you may want to use a bit off white and for background use true white 255,255,255?? also the font does not look good reduced to 720.

This may also be a issue with converting the bitmap to 720p have not tried a 1080p one as of yet.

Maybe we should just concentrate on the bluray ocr capabilities of this product and produce good SRT files.

jamos
29th February 2008, 16:50
ok i think the issue is that because the font breaks up (gaps in the border) when you are converting it to 720 from 1080 that the color bleeds into the background. the conversion from 1080 to 720 is just really ugly.

maybe the best bet is to focus on improving bluray sup to srt ocr conversion (I believe you said you could do this pretty easy as you said the blurays fonts are just different?) as that way we can make srts for mkvs, or export png to scenarist from the ocr converted text.

btw the scenarist tranparent color is displayed here
http://img407.imageshack.us/img407/60/palettekr1.th.png (http://img407.imageshack.us/my.php?image=palettekr1.png)

DELPHIINES
29th February 2008, 18:09
No pelican the text is always at the horrizontal bottom one or more lines of text,always.And for the sdsup created by subtitle creator 2.2 is correct because i am using it to insert sub into dvds,and it works just fine.Hdsup created by supread i dont think so because if you access it with supread its blank,it says that the subs are loaded but when u go to the image tab its blank.Anyhow i hope i am helping you with this because i am an amature.

Rectal Prolapse
29th February 2008, 18:30
Pelican9, I forgot to mention that I had to use the PNG library function that inverts the alpha channel table (ie. alpha level 0 becomes 255 and alpha level 255 becomes 0). Maybe this is the issue?

Rectal Prolapse
29th February 2008, 18:31
Jamos, what application gave you the palette info in that screenshot? Thanks!

jamos
29th February 2008, 18:40
Jamos, what application gave you the palette info in that screenshot? Thanks!

subtitleworkshop4 exported that png which works in scenarist - But that palette info is from scenarist editor reading the exported subtitleworkshop4's .png palette - now i messed with the selected color in scenarist from that screenshot it was redish before I set it to transparent. I can export the palette but i think it is a scenarist only readable file.

if you have a sample png i can load it in and show you what its pallete looks like.

Pelican9
29th February 2008, 18:44
No pelican the text is always at the horrizontal bottom one or more lines of text,always.And for the sdsup created by subtitle creator 2.2 is correct because i am using it to insert sub into dvds,and it works just fine.Hdsup created by supread i dont think so because if you access it with supread its blank,it says that the subs are loaded but when u go to the image tab its blank.Anyhow i hope i am helping you with this because i am an amature.

SUPread is handling correctly your sup now.
This subtitle stream contains a lot of vertical subtitles...

jamos
29th February 2008, 18:45
Pelican if i resize the 1080p output from your program using Photoshop to 1280x720 the font looks perfect. so it is something that supread is doing when it is converting 1080p to 720p that causes the border on the fonts to breakup.

Pelican9
29th February 2008, 18:51
Pelican if i resize the 1080p output from your program using Photoshop the font looks perfect. so it is something that supread is doing when it is converting 1080p to 720p that causes the border on the fonts to breakup.

I think I not understand exactly.
Which input you use (BD, HD DVD, SRT)?
Which output you use (FULL HD PNG, 720p PNG)?
Which png works in Scenarist and which is not work?
What is the problem when doesn't work?

The 720p text looks ugly because I haven't figure out how can I handle the border where the pixels are semi transparent

jamos
29th February 2008, 19:00
I think I not understand exactly.
Which input you use (BD, HD DVD, SRT)?
Which output you use (FULL HD PNG, 720p PNG)?
Which png works in Scenarist and which is not work?
What is the problem when doesn't work?

The 720p text looks ugly because I haven't figure out how can I handle the border where the pixels are semi transparent

BD NTSC SUP input
720p output PNG
they work with scenarist but on playback the screen goes white and blanks out the movie when a subtitle occurs.

exported subtitleworkshop4 pngs work fine with scenarist but that program does not read sup.

different issue:
ocr function for converting BD SUP to .srt has many errors.

Pelican9
29th February 2008, 19:15
BD NTSC SUP input
720p output PNG
they work with scenarist but on playback the screen goes white and blanks out the movie when a subtitle occurs.

exported subtitleworkshop4 pngs work fine with scenarist but that program does not read sup.

different issue:
ocr function for converting BD SUP to .srt has many errors.

Thanks.
Did you try the 1080p PNG in Scenarist?

chrkou
29th February 2008, 19:21
Pelican9: I am trying to add, in Tsremux, a subtitle(HD SUP), generated from Supread. But i'm geting the error message.

jamos
29th February 2008, 19:29
Thanks.
Did you try the 1080p PNG in Scenarist?

not yet will try when i get home.

jamos
29th February 2008, 22:38
white screen background still coming up even with 1080p.

jamos
29th February 2008, 22:50
ok you have to set the palette for the second color to be transparent. not sure on how you can do that but that is what is causing the background not to be tranparent. another thing is the text has no color so that needs to be fixed also most likely the text color is the same palette item as the background. when i changed the palette below it fixed the transparency but the text color was transparent also. it almost looks like you had the first item on the palette transparent but the background was not set to it.

http://img135.imageshack.us/img135/4149/palettego2.th.png (http://img135.imageshack.us/my.php?image=palettego2.png)

jamos
1st March 2008, 03:14
here is the pxml output of a palette that works with scenarist you can open it with wordpad. color 255 needs to be transparent NOTICE that Transparency xml tag is set to 0 and I would assume the background would have to use palette entry 255. A Transparency Value of 255 is fully visible.


http://www.mediafire.com/?cjv52pxtdpt

Pelican9
1st March 2008, 07:59
jamos:
Could you try to input a HD DVD subtitle stream -> export PNGs -> import in Scenarist?

Pelican9
1st March 2008, 08:05
ok you have to set the palette for the second color to be transparent. not sure on how you can do that but that is what is causing the background not to be tranparent. another thing is the text has no color so that needs to be fixed also most likely the text color is the same palette item as the background. when i changed the palette below it fixed the transparency but the text color was transparent also. it almost looks like you had the first item on the palette transparent but the background was not set to it.

http://img135.imageshack.us/img135/4149/palettego2.th.png (http://img135.imageshack.us/my.php?image=palettego2.png)

It is the original palette and transparency info in the PNG. Every palette entry has a color and a transparency info.

DonCarlos
1st March 2008, 11:00
Hi

I am trying to convert some HDDVD subtitles to Blu ray subtitles. Than I want to mux those subtitles back in the stream with Scenarist. The video is in 23.976 fps. So I think I have to also set the subtitle fps to the same. Then I use non drop frame in Scenarist so I think I have to take the same in Supread. Then I export them as an bdn file. I import them in Scenarist and mux everything together(before that I put the offset to the first subtitle time, because Sceanrist treats the first one as 0). Ok the subtitles are at the right spot but slowly get out of sync.At the end of the movie they are out of sync about 6 seconds. So what am I doning wrong? Please help me

Thanks.

By the way I tried using hdsuprip2bdn too but I don't know where this program put the output files?

Pelican9
1st March 2008, 11:18
Hi

I am trying to convert some HDDVD subtitles to Blu ray subtitles. Than I want to mux those subtitles back in the stream with Scenarist. The video is in 23.976 fps. So I think I have to also set the subtitle fps to the same. Then I use non drop frame in Scenarist so I think I have to take the same in Supread. Then I export them as an bdn file. I import them in Scenarist and mux everything together(before that I put the offset to the first subtitle time, because Sceanrist treats the first one as 0). Ok the subtitles are at the right spot but slowly get out of sync.At the end of the movie they are out of sync about 6 seconds. So what am I doning wrong? Please help me

Thanks.

By the way I tried using hdsuprip2bdn too but I don't know where this program put the output files?

Try with 24fps. Open the HD DVD sup and click Save bitmaps.
hdsup2bdn put the files to the same folder where you running it.

DonCarlos
1st March 2008, 11:27
Try with 24fps. Open the HD DVD sup and click Save bitmaps.
hdsup2bdn put the files to the same folder where you running it.

I tried it with 24fps the was my thought too, but then I get an error in Scenarist because the framerate doesn't fit to the video, so scenarist doesn't want to mux it.

Then I don`t know why hdsup2bdn does not work for me?!
Could you please gie me an example command line on how to configure it for my job?Because it does something an says processing took 20 seconds but Ican't find a file anywhere.

Thank you.

Pelican9
1st March 2008, 11:59
Then I don`t know why hdsup2bdn does not work for me?!
Could you please gie me an example command line on how to configure it for my job?Because it does something an says processing took 20 seconds but Ican't find a file anywhere.


If you are not a unix/linux man it is hard to find the help.
D:\util\Projects\SUPread>hdsup2bdn --help
Allowed options:
--help produce help message
--version print version number
--original output PNG images in the original size (suitable for
OCR)
--fullpng output 1920x1080 PNG images [DEFAULT]
--nobdnfixtimes do not divide BDN times by 1.001 (BDN output only)
--bdnfixtimes divide BDN times by 1.001 (BDN output only) [DEFAULT]
--srtfixtimes divide SRT times by 1.001 (SRT output only)
--nosrtfixtimes divide SRT times by 1.001 (SRT output only) [DEFAULT]
--framerate arg frame rate [DEFAULT: 29.97]
--input-file arg input file
--srt output SRT file
--xml output Scenarist HDMV BDN file
--forcedsubs make all subtitles forced (BDN output only)
--dropframes flag all subtitle times as drop frames (BDN output
only)
--nopng don't generate any PNGs

hdsup2bdn file.sup --xml --framerate 23.976

Pelican9
1st March 2008, 12:21
I tried it with 24fps the was my thought too, but then I get an error in Scenarist because the framerate doesn't fit to the video, so scenarist doesn't want to mux it.

I've found a bug and fixed it. The new SUPread generate the same xml as hdsub2bdn.

DonCarlos
1st March 2008, 12:40
Ok thank you very much I will try it.

jamos
1st March 2008, 16:33
jamos:
Could you try to input a HD DVD subtitle stream -> export PNGs -> import in Scenarist?

If i had one. i have no hd dvd subtitles (only bluray) if someone could link one i would try.

edit: I just tried 1080p bluray subtitles and they are fine. so its the conversion of 1080 to 720p that is causing the issue with the blank white screen.
Like I said the 720p fonts have holes in them and the font color bleeds to the background.

B4tm4n
1st March 2008, 17:04
If i had one. i have no hd dvd subtitles (only bluray) if someone could link one i would try.


Here you go.

http://www.divshare.com/download/3923820-5d3

jamos
1st March 2008, 17:55
Here you go.

http://www.divshare.com/download/3923820-5d3

Thanks Bat,

yes HD dvd subtitles work fine with scenarist in 1080p.

jamos
1st March 2008, 18:08
720p subtitles now work! although the font is a bit messed up from downconverting.

Pelican9
1st March 2008, 18:24
720p subtitles now work! although the font is a bit messed up from downconverting.

What happened?

jamos
2nd March 2008, 02:39
sorry 720 subtitles look fine but they are out of sync for 23.976 video.