View Full Version : Converting Bluray disc subtitles


Rectal Prolapse
30th March 2007, 06:20
I'm wondering if this is possible yet.

I've tried ripping the data from a bluray disc's .m2ts file. I believe that PIDs starting from 1200 are the subtitle streams, but I have no idea what to do with them.

Anyone have any information on how to convert them to SRTs? Or where I can find the format specifications for them?

Pelican9
30th March 2007, 17:37
I'm wondering if this is possible yet.

I've tried ripping the data from a bluray disc's .m2ts file. I believe that PIDs starting from 1200 are the subtitle streams, but I have no idea what to do with them.

Anyone have any information on how to convert them to SRTs? Or where I can find the format specifications for them?

I think it's similar to the HD DVD's subtitle stream.
Could you send me a sample?

Rectal Prolapse
30th March 2007, 20:23
I'll try to do that this weekend. The router goes down a lot though, so that may not happen. :(

DeepBeepMeep
31st March 2007, 12:08
I'll try to do that this weekend. The router goes down a lot though, so that may not happen. :(

Rectale Prolapse, which tool have used to extract the stream? Thanks. I might try to use it as well to upload a sample for Pelican.

Rectal Prolapse
31st March 2007, 20:54
I used TSReader Lite. There are also pay versions of those, but I think the Lite version is all we need right now. I guessed that the PIDs for subs begin at PID 1200. I hope I am right!

I would like to try it with VLC too - and see if I get similar results.

enantiomer
13th April 2007, 17:22
Rectal Prolapse, I agree that PID 0x1200 and up are probably where the susbtitles streams start.

Pelican9: did you receive a Blu-ray subtitle stream sample? BTW thanks for your efforts on SUPread. Nice little proggie.

cfsmp3
13th April 2007, 20:46
Any chance I can get a sample as well? I'm doing lots of subtitles related work these days.

Pelican9
13th April 2007, 21:50
Pelican9: did you receive a Blu-ray subtitle stream sample?

Yes, I did. It's not the same as the HD DVD's subtitle stream. I think it contains some headers.

Any chance I can get a sample as well? I'm doing lots of subtitles related work these days.

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

If you figure out the file structure, I'll change SUPread.

Rectal Prolapse
15th April 2007, 20:50
Here is another rip of subtitles, from Memento blu-ray:

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

This should be a better rip than the first one, where I used TSReader Lite that doesn't rip from the beginning of the stream!

Pelican9
17th April 2007, 14:40
Here is another rip of subtitles, from Memento blu-ray:

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

This should be a better rip than the first one, where I used TSReader Lite that doesn't rip from the beginning of the stream!

I haven't got any info from these files. :-(

Rectal Prolapse
21st April 2007, 04:23
Yeah I know how you feel - it's a big job figuring these files out!

Fortunately, I think I figured out the Run Length Encoding scheme used for the bitmaps. However, I haven't figured out where the subtitle time and duration information is stored, and I also need to decode the color table somehow.

Some examples from my RLE findings:

00 47 80 00 00 = The next 1920 pixels across are of color index 0. The 00 pair at the end signifies the end of a line.

00 84 0e = The next 4 pixels are of the color index 14 (decimal).

00 9e 14 = The next 30 (0x1e) pixels are of the color 20.

00 c1 4e 33 = the next 334 pixels are of the color 51.

If the sequence doesn't begin with a 00 then the value indicates the color of the pixel at that point.

If the sequence ends with two 00's then that means we reached the end of the line.

Rectal Prolapse
21st April 2007, 19:47
More:

00 03 = The next 3 pixels use color index 0.

00 01 = The next pixel is color index 0.

So, basically, 00 is reserved as an RLE command. To get the color 0 you need to do the above.

Given the above, here are some examples:

00 47 80 00 00 00 42 0F 0E 14 00 84 FE 14 0E 00 0F

Breaks down into:

00 47 80 = 1920 pixels of color 0.
00 00 = end of line, go to the beginning of the next line.
00 42 0F = 527 pixels of color 0
0E = pixel at x location 528 is color 14.
14 = pixel at x location 529 is color 20.
00 84 FE = the next 4 pixels are of color 254.
14 = the next pixel is color 20.
0E = the next pixel is color 14.
00 0F = the next 15 pixels are color 15.

This will go on until 1920 pixels for the line have been specified, and shall end in a 00 00 pair.

Now, not all subpictures will be 1920 pixels across - this depends on the header before the bitmap info.

Pelican9
25th April 2007, 17:12
rle_coded_line() {
do {
if (nextbits != ‘0000 0000b’) {
pixel_code (8bit)
} else {
8-bit_zero (8bit)
switch_1 (1bit)
switch_2 (1bit)
if (switch_1 == ‘0b’) {
if (switch_2 == ‘0b’) {
if (nextbits != ’00 0000b’)
run_length_zero_1-63 (6bit)
else
end_of_line_signal (6bit)
} else {
run_length_zero_64-16K (14bit)
}
} else {
if (switch_2 == ‘0b’) {
run_length_3-63 (6bit)
pixel_code (8bit)
} else {
run_length_64-16K (14bit)
pixel_code (8bit)
}
}
}
} while (!end_of_line_signal)
}


pixel_code: An 8-bit code, specifying the pixel value as an entry number of a Palette with 256 entries.

8-bit-zero: An 8-bit field filled with ‘0000 0000b’.

switch_1: A 1-bit switch that identifies the meaning of the fields that follow: if set to the value ‘0b’, the
field indicates a run-length for a pixel value of ‘0x00’ or an end_of_line_signal; if set to the value ‘1b’,
the field indicates a run-length for a pixel value that is not ‘0x00’.

switch_2: A 1-bit switch that identifies the meaning of the fields that follow: if set to the value ‘0b’, the field indicates a small run-length or end_of_line_signal; if set to the value ‘1b’, the field indicates a long run-length.

run_length_zero_1-63: The number of pixels that shall be set to a value of ‘0x00’.

end_of_line_signal: A 6-bit field filled with ’00 0000b’. The presence of this field signals the end of the coded line.

run_length_3-63: The number of pixels that shall be set to the pixel value defined next. This field shall not have a value less than 3.

run_length_zero_64-16K: The number of pixels that shall be set to a value of ‘0x00’. This field shall not have a value less than 64.

run_length_64-16K: The number of pixels that shall be set to the pixel value defined next. This field shall not have a value less than 64.

Rectal Prolapse
5th May 2007, 22:40
Thanks Pelican9!

Last week I spent a lot of time doing more work reverse engineering m2ts subpicture streams.

I believe I have figure out the essentials. I will try to post more details in the coming days.

I can say with absolute certainty that the timestamps are NOT included in the elementary PG stream. They are embedded in the PTS values of the PES packets before each new subtitle.

These PES packets should be extracted by a tool (like TSReader or Manzanita) that preserves all the packets in the stream. Unfortunately this means we will need a transport stream parser.

I also discovered how subtitles are forced on.

There are separate commands for define the palette, the bitmap, and a command for blanking the subtitle. The latter is preceded by a PES packet that specifies the PTS.

One problem remaining is determining the subtitle timing relative to the presentation of the first video frame. I don't yet know how to get this value.

I hope to provide very specific details soon. Hopefully you and Haali and whoever else can make use of this information.

BTW, I used a clean-room approach to this - I do not have the full Blu-ray specification, only the publically available one. I also used the XVI hex editor and PowerDVD 7.3 for my experiments. Lots of trial and error was involved. Thanks to everyone who helped!

Pelican9
5th May 2007, 23:39
I can say with absolute certainty that the timestamps are NOT included in the elementary PG stream. They are embedded in the PTS values of the PES packets before each new subtitle.
Same as HD DVD.

These PES packets should be extracted by a tool (like TSReader or Manzanita) that preserves all the packets in the stream. Unfortunately this means we will need a transport stream parser.
I've just ask dmz01 to make a subtitle extractor in his app. (called TsRemux).
If he can make a .sup file I will change SUPread to handle it.

There are separate commands for define the palette, the bitmap, and a command for blanking the subtitle. The latter is preceded by a PES packet that specifies the PTS.
Same as HD DVD.

One problem remaining is determining the subtitle timing relative to the presentation of the first video frame. I don't yet know how to get this value.

Same as HD DVD. :-) We have to find the first video PTS and then subtract this value from every subtitle PTS. (It's very easy to find on HD DVD's DSI packet.)

Rectal Prolapse
5th May 2007, 23:51
Oh, I'm sure HD-DVD is the same. :)

I find it very strange that no one has posted their findings on these formats before though - is there another forum for that?

EDIT: Nevermind. :)

Rectal Prolapse
6th May 2007, 00:05
The subpicture stream consists of data inside sections. Each section begins with an identifier byte, followed by a 16 bit integer that contains the length of the data, followed by the data itself.

Identifiers, order of presentation found in typical subtitle stream:

16 00 13 07 80 04 38 40 00 01 00 00 00 01 00 00 00 00 00 00 00 00

16 = identifier
00 13 = size of section
07 80 04 38 = 1920x1080.
01 = do not clear. If set to 00 instead it will clear the subpicture!

40 00 01 00 = sequence number??

00 = if set to 40 instead of 00 the next subtitle will be forced on.

17 00 0A 01 00 00 00 00 00 07 80 04 38

17 = ?
07 80 04 38 = 1920x1080

14 04 FD 00 00 00 10 80 80 00

14 = palette definition
04 FD = size of section following in bytes.
00 10 80 80 00 = color index 0 with YCbCr = 10,80,80, alpha channel = 0.

15 89 92 00 00 01 C0 00 89 8B 07 80 04 38 00 47 80 00 00

15 = bitmap picture section
89 92 = size of section in bytes following.
00 00 01 C0 00 = unknown !
89 8B = appears to be another length indicator. 89 92 minus 5 bytes.
07 80 04 38 = 1920x1080 image dimensions.

80 00 00
80 = end of picture? No section? End of Epoch? Go blank?

Rectal Prolapse
6th May 2007, 00:13
We have to find the first video PTS and then subtract this value from every subtitle PTS. (It's very easy to find on HD DVD's DSI packet.)

This didn't seem to work on the test stream I had. It appeared to be off by 300-400ms. But then again it had VC-1 in it so maybe the TS analyzer (without VC-1 support) I had didn't know where the real video frame was.

Rectal Prolapse
6th May 2007, 00:14
BTW Pelican9, you implied that you already knew the format - is that true? If dmz01 can write a subtitle extractor then he must know the format already?

Is there a reason why this information isn't more widely known? On the other hand, I don't have any special access to Blu-ray specs - so NDAs and licenses are not a concern for me - just old-fashioned true reverse engineering. :)

drmpeg
6th May 2007, 02:43
Here's an update to xport that demuxes the subtitle (Presentation Graphics) stream.

http://www.w6rz.net/xportpgs.zip

An extra parameter has been added to select the subtitle stream.

xport -h movie.m2ts 1 1 1 1

Output filename is bits0001.pgs and the -u option dumps the PTS.

Ron

jokin
6th May 2007, 07:33
ok now we can extract is there any way to put them on a video via avs?

Pelican9
6th May 2007, 12:06
Here's an update to xport that demuxes the subtitle (Presentation Graphics) stream.

http://www.w6rz.net/xportpgs.zip

An extra parameter has been added to select the subtitle stream.

xport -h movie.m2ts 1 1 1 1

Output filename is bits0001.pgs and the -u option dumps the PTS.

Ron
You are very fast!
Thanks!

The -h worked well and create a huge pgs (43MB).
How does the -u option work?

Transport Sync Error, skipped 4 bytes, at 3218297
Transport Sync Error, skipped 4 bytes, at 3218298
Transport Sync Error, skipped 4 bytes, at 3218299
Transport Sync Error, skipped 4 bytes, at 3218300
Transport Sync Error, skipped 4 bytes, at 3218301
Transport Sync Error, skipped 4 bytes, at 3218302
Transport Sync Error, skipped 4 bytes, at 3218303
Transport Sync Error, skipped 4 bytes, at 3218304
Transport Sync Error, skipped 4 bytes, at 3218305
Transport Sync Error, skipped 4 bytes, at 3218306
Transport Sync Error, skipped 4 bytes, at 3218307


Is it possible to insert the PTS information to the subtitle stream and write a (semi) compatible .sup file?
The .sup file contains 10 extra byte before every subtitle
'SP',PTS(4bytes),0x00000000

Edit:
We can create a new file format for BD subtitles. We can use other two letters instead of 'SP' (for example 'BD' or something), and the 4 bytes long PTS value, and the subtitle segment data.

Pelican9
6th May 2007, 12:23
BTW Pelican9, you implied that you already knew the format - is that true? If dmz01 can write a subtitle extractor then he must know the format already?
Yes.
No.

Is there a reason why this information isn't more widely known?
Yes. This information is confidental.

drmpeg
6th May 2007, 12:39
You are very fast!
Thanks!

The -h worked well and create a huge pgs (43MB).
How does the -u option work?

Transport Sync Error, skipped 4 bytes, at 3218297
Transport Sync Error, skipped 4 bytes, at 3218298
Transport Sync Error, skipped 4 bytes, at 3218299
Transport Sync Error, skipped 4 bytes, at 3218300
Transport Sync Error, skipped 4 bytes, at 3218301
Transport Sync Error, skipped 4 bytes, at 3218302
Transport Sync Error, skipped 4 bytes, at 3218303
Transport Sync Error, skipped 4 bytes, at 3218304
Transport Sync Error, skipped 4 bytes, at 3218305
Transport Sync Error, skipped 4 bytes, at 3218306
Transport Sync Error, skipped 4 bytes, at 3218307


Is it possible to insert the PTS information to the subtitle stream and write a (semi) compatible .sup file?
The .sup file contains 10 extra byte before every subtitle
'SP',PTS(4bytes),0x00000000
Try:

xport -hus movie.m2ts 1 1 1 1

Ron

Pelican9
6th May 2007, 12:43
Try:

xport -hus movie.m2ts 1 1 1 1

Ron

I've tried, but nothing changed in the file.

drmpeg
6th May 2007, 13:52
I've tried, but nothing changed in the file.
I meant just to get rid of the error messages and dump the PTS. I'll add the PTS header tomorrow (left coast time).

Ron

Pelican9
6th May 2007, 14:08
I meant just to get rid of the error messages and dump the PTS. I'll add the PTS header tomorrow (left coast time).

Ron

Great! Thanks again.

But I've thought about the header, and it would be better to use another two letters instead of 'SP', because the structure is quite different and it would be easier to program.

dmz01
6th May 2007, 15:09
If dmz01 can write a subtitle extractor then he must know the format already?
No.



Pelican9 is correct. I don't know the format. You do not need to know a specific format information just to extract it from a well known container.

Rectal Prolapse
6th May 2007, 18:51
Thanks drmpeg! :)

Pelican9
6th May 2007, 23:47
SUPread 0.4 is ready to read BD subtitles... :)
http://pel.hu/down/SUPread_BD.jpg
Don't try to download, it's not available yet. I'm waiting for drmpeg's new xport version with PTS info.

drmpeg
7th May 2007, 07:02
Here's the update:

http://www.w6rz.net/xportpgs.zip

Make sure you clear your browser cache to get the latest. Files are dated 5/6/2007 at 10:55 PM.

I chose to use "PG" (for Presentation Graphics) instead of "SP".

Ron

Pelican9
7th May 2007, 09:36
Here's the update:

http://www.w6rz.net/xportpgs.zip

Make sure you clear your browser cache to get the latest. Files are dated 5/6/2007 at 10:55 PM.

I chose to use "PG" (for Presentation Graphics) instead of "SP".

Ron

Thanks!

This is the structure of one subtitle as I thought:
-------------
'PG', PTS, 0,0,0,0, (start time)
0x16, ... presentation composition definition (0x13 bytes)
0x17, ... window definition (0x0A bytes)
0x14, ... palette definition (0x4F8 bytes)
0x15, ... object definition (0x3087 bytes)
0x80, 0, 0 end of displayset
'PG', PTS, 0,0,0,0, (end time)
0x16, ... presentation composition definition 0x0B
0x17, ... window definition 0x0A
0x80, 0, 0 end of displayset
-------------
Next subtitle


This is the structure of the xported .pgs:
-------------
0x16, ... presentation composition definition (0x13 bytes)
0x17, ... window definition (0x0A bytes)
'PG', PTS, 0,0,0,0, (0xFB9B81) 3:03.215
0x14, ... palette definition (0x4F8 bytes)
0x15, ... object definition (0x3087 bytes)
'PG', PTS, 0,0,0,0, (0xFB9C00) 3:03.216
0x80, 0, 0 end of displayset
0x16, ... presentation composition definition 0x0B
0x17, ... window definition 0x0A
'PG', PTS, 0,0,0,0, (0xFE4620) 3:05.156
0x80, 0, 0 end of displayset
-------------
Next subtitle

What is the extra (first or second) PTS?
Could you change something or I have to handle this structure?

drmpeg
7th May 2007, 10:52
I know what's wrong. Some segments have a PTS/DTS PES header, and I was only putting a header in the .pgs file on the segments with just a PTS.

Here's the update:

http://www.w6rz.net/xportpgs.zip

Files are dated 5/7/2007 at 2:48 am

For the segments with DTS, I've put the DTS after the PTS.

"PG", PTS (4 bytes), DTS (4 bytes)

If you think the DTS is useless, and you'd rather have 0x0, let me know.

Ron

Pelican9
7th May 2007, 12:01
I know what's wrong. Some segments have a PTS/DTS PES header, and I was only putting a header in the .pgs file on the segments with just a PTS.

Here's the update:

http://www.w6rz.net/xportpgs.zip

Files are dated 5/7/2007 at 2:48 am

For the segments with DTS, I've put the DTS after the PTS.

"PG", PTS (4 bytes), DTS (4 bytes)

If you think the DTS is useless, and you'd rather have 0x0, let me know.

Ron

Yesss! Much better! Thank you!
All segment have their own PTS/DTS info.

What do you think about the file extension?
I mean the .sup is well known as subtitle file.
But on the other hand .pgs shows that it is a different structure.

manusse
7th May 2007, 18:45
I vote for the ".sup" extension because there are already too many subtitle extensions and this will mean that it's a binary subtitle (a.k.a. image).

Cheers
Manusse

Pelican9
7th May 2007, 23:23
I know what's wrong. Some segments have a PTS/DTS PES header, and I was only putting a header in the .pgs file on the segments with just a PTS.

Ron!

Did you decrease the PTS values with the PTS of the first video frame?
I think you didn't, because the subtitles are delaying about 10 sec.
Could you check it?
And I vote the .sup extension too.
Thanks in advance.

Edit:
SUPread v0.4b1 (http://pel.hu/down/SUPread.exe)

drmpeg
8th May 2007, 11:23
Ron!

Did you decrease the PTS values with the PTS of the first video frame?
I think you didn't, because the subtitles are delaying about 10 sec.
Could you check it?
And I vote the .sup extension too.
Thanks in advance.

Edit:
SUPread v0.4b1 (http://pel.hu/down/SUPread.exe)
The PTS/DTS is not adjusted. It's directly from the bitstream. Here's an update where the initial video PTS is subtracted from all PGS PTS/DTS values. Also, filename changed to .sup as suggested.

http://www.w6rz.net/xportpgs.zip

File times are 5/8/2007 at 3:16 am.

Ron

Pelican9
8th May 2007, 12:51
The PTS/DTS is not adjusted. It's directly from the bitstream. Here's an update where the initial video PTS is subtracted from all PGS PTS/DTS values. Also, filename changed to .sup as suggested.

http://www.w6rz.net/xportsup.zip

File times are 5/8/2007 at 3:16 am.

Ron
THANKS!
(The working link: http://www.w6rz.net/xportpgs.zip)

Edit:
Something wrong with the PTS/DTS adjusting.
Original - Adjusted:
0xFBB289 - 0xFBB28A
0xFBB281 - 0xFBB282
0xFBB249 - 0xFBB24A
...
Like the first video PTS is -1 (or 0xFFFFFFFF)

I've expected something like this:
Original - Adjusted:
0xFBB289 - 0xEDF6E9
0xFBB281 - 0xEDF6E1
0xFBB249 - 0xEDF6A9
...

Edit 2:
It was my fault.
I've used this command:
xport -h 00001.m2ts 1 9 9 1
because I didn't want to demux the video and the audio stream but only the subtitle stream (not enough space on this drive).
Is there a way to skip the video stream demux but get the first video PTS and make a .sup?

manusse
8th May 2007, 13:20
Could you post an example of such an extracted SUP file so that I can try working on its import by SubtitleCreator?
(Or better a file from which to extract the sup plus the command line I must use).
A short sample will be enough.

Thanks
Manusse

jokin
8th May 2007, 15:08
I used SUPread on the xported sup and it seems after SUPread is done the SRT times are behind by 11 seconds

Rectal Prolapse
8th May 2007, 16:29
Pelican9, do the subtitle times look correct? On my tests I wasn't able to get PTS times that were in sync with the video - they were too early by a second (using TSPE 0.3 and stepping through the PTS values in the video and the PG stream).

I'm hoping the xport times are correct. :)

Pelican9
8th May 2007, 18:22
It looks like good (in sync with the video) with the adjusted PTS values.

Pelican9
8th May 2007, 18:23
I used SUPread on the xported sup and it seems after SUPread is done the SRT times are behind by 11 seconds

Did you demuxed the subtitle with the video stream?
Without the video the PTS adjusting is not work.

Pelican9
8th May 2007, 18:42
A short sample will be enough.


PM sent

jokin
9th May 2007, 07:52
Did you demuxed the subtitle with the video stream?
Without the video the PTS adjusting is not work.

Thanks for pointing that out. All is good now.

Pelican9
9th May 2007, 14:06
Edit 2:
It was my fault.
I've used this command:
xport -h 00001.m2ts 1 9 9 1
because I didn't want to demux the video and the audio stream but only the subtitle stream (not enough space on this drive).
Is there a way to skip the video stream demux but get the first video PTS and make a .sup?

Ron:
Could you check this?
The first PTS of video stream #1 could be good.

drmpeg
10th May 2007, 11:59
Ron:
Could you check this?
The first PTS of video stream #1 could be good.
I've added a new option (-j) to just demux the subtitle stream.

http://www.w6rz.net/xportpgs.zip

Files are timestamped 5/10/2007 3:52 AM.

xport -hj movie.m2ts 1 1 1 1

Ron

Pelican9
10th May 2007, 20:54
I've added a new option (-j) to just demux the subtitle stream.

http://www.w6rz.net/xportpgs.zip

Files are timestamped 5/10/2007 3:52 AM.

xport -hj movie.m2ts 1 1 1 1

Ron

It works like a charm.

Thanks.

hhp
13th May 2007, 03:56
Becaus there is more language subtitle in Blu-ray, is it possible to outport the subtitle in idx/sub format. Any way thanks again to your great program.

Pelican9
14th May 2007, 10:42
Becaus there is more language subtitle in Blu-ray, is it possible to outport the subtitle in idx/sub format. Any way thanks again to your great program.

You can demux all subtitle streams one by one...

hhp
15th May 2007, 07:57
You can demux all subtitle streams one by one...

I means there is many different language subtitles can't OCR by Supread, like Chinese. If outport to idx/sub type then we can use in player program even no ocr.

Carpo
15th May 2007, 10:40
heres the prob - i am trying to back up ghost in the shell 2 blue ray edition, back up goes fine i get all the folders i supposed to, in the bdmv folder i have 2 m2ts files when i try to get the subs from them using the commands i have seen in this thread - xport -hj 00000.m2ts 1 1 1 1 - all i get is a mpv mpa and a 40k bup file, which after looking at it is part of the jap text in the very fitst scene, i get nothing else after that.

if more info is need please tell me what and how and i will post what ever you need if i can get this to work i will have to del the back up as 34GB is a lot to leave laying about.

Thanks

manusse
15th May 2007, 21:08
@hhp,

The HD subtitles don't use the same exact format as the SD subtitles (which is what idx files are, SD subtitles). So they can't be directly converted to idx files. They must first be downsized to SD definition and their number of colors must be reduced to 3 + background. I've already done it for HD-SUP (using SubtitleCreator).

Is this what you need? Or do you want to keep the resolution and number of color as it is? If this is the case I don't think there is a software that can display them at the moment.

Cheers
Manusse

hhp
17th May 2007, 15:09
I just want to think a way to use the original subtitle when playing movie by kmplayer, any way i can use the English subtitle to resync my chinese subtitle.

manusse
17th May 2007, 15:14
@hhp,

Actually, the VobSub format (sub/idx) supported by KMPlayer is SD only. To my knowledge HD-VobSub files don't exist yet.
So if you want to use the original subtitles, you should use the method I've described (convert them to SD) using one future version of SubtitleCreator. At present only HD-DVD subtitles are supported but in the future, BD-DVD subtitles should be also.

Cheers
Manusse

Zelos
18th May 2007, 23:04
Is there anyway to extract only Audio stream ? :D

dmz01
19th May 2007, 00:45
FYI, TsRemux now supports adding SUP files. Since I don't have any software players that can check if I'm doing it correctly, I need someone to test it for me. Let me know what you find.
:thanks:

dmz

Momber
19th May 2007, 13:56
What is TsMuxer? Do you mean tsremux?

dmz01
19th May 2007, 14:47
What is TsMuxer? Do you mean tsremux?

Yes, It's been a long day. :)

Momber
20th May 2007, 03:36
Is the OCR module not properly implemented in SUPread yet or am I doing something wrong? I tried changing parameters in the options tab but no matter what, SUPread won't recognize any characters.
The bitmaps are fine btw (demuxed from BluRay with xport).

Example OCR output:

1
00:00:10,177 --> 00:00:19,811
·e····us··es·····ou···
·sc··?·c·s···-····e···e·'

2
00:01:05,857 --> 00:01:12,239
····e·c········.

zgx
21st May 2007, 13:34
Is there anyway to extract only Audio stream ? :Dxport -h file.m2ts 1 X Y

X = a number that is not a valid video stream .. like "9" for example

Y = the number of the audio stream you would like to extract.

Pelican9
21st May 2007, 17:05
Is the OCR module not properly implemented in SUPread yet or am I doing something wrong? I tried changing parameters in the options tab but no matter what, SUPread won't recognize any characters.
The bitmaps are fine btw (demuxed from BluRay with xport).

Example OCR output:

1
00:00:10,177 --> 00:00:19,811
·e····us··es·····ou···
·sc··?·c·s···-····e···e·'

2
00:01:05,857 --> 00:01:12,239
····e·c········.

Unfortunatelx some title uses font type which is quite different (e.g 't' smaller than 'i'). The other problem is the foreiign (not english) characters, which is not implemented yet. Share the stream and I'll check it.

Momber
21st May 2007, 17:20
Share the stream and I'll check it.
Already deleted. Sorry.
Found a replacement at http://subscene.com/subtitlesearch.aspx so it's no problem.

S.

changomacanaz
23rd May 2007, 23:07
I used TSReader Lite. There are also pay versions of those, but I think the Lite version is all we need right now. I guessed that the PIDs for subs begin at PID 1200. I hope I am right!


Presentation graphics streams are in PIDs 0x1200 to 0x121f, Text subtitles are in PID 0x1800. Subtitles in text format allow the viewer to change subtitle font style and position... although many content providers use bitmaps for subtitles like in the old dvd, you might not be able to find the subtitles in the stream if you only scan 0x1200 PIDs

Zelos
27th May 2007, 20:19
xport -h file.m2ts 1 X Y

X = a number that is not a valid video stream .. like "9" for example

Y = the number of the audio stream you would like to extract.


thanks ;)

hhp
29th May 2007, 14:23
I convert srt to sup via SubtitleCreater 2.2.2 and want to remux into Blu-ray m2ts file by TsRemuxer. But there's is a error when muxing, is the problem caused by SubtitleCreater becasue of the width only upto 720? or by which way can I get the Blu-ray Sup from srt subtitle?

hm10
29th May 2007, 15:40
I convert srt to sup via SubtitleCreater 2.2.2 and want to remux into Blu-ray m2ts file by TsRemuxer. But there's is a error when muxing, is the problem caused by SubtitleCreater becasue of the width only upto 720? or by which way can I get the Blu-ray Sup from srt subtitle?

I too have this problem =\

manusse
29th May 2007, 19:30
Blu-ray sup, HD-DVD sup and PAL/NTSC sup file don't use the same format. At present there is no program that allows to generate HD-SUP or BD-SUP from srt files. I think Pelican9 is preparing a version of SUPRead that will do it. (see here (http://forum.doom9.org/showthread.php?p=1006013#post1006013)).
SubtitleCreator should also later be able to do it. (You'll have to wait a few months for that).

Cheers
Manusse

hhp
31st May 2007, 14:11
Thanks for the answer of manusse. just have to wait for your working result now.

kensystem
7th June 2007, 23:21
So how hard would it to be to print the timestamp and maybe even other metadata fields to stdout, that the AVCHD cams embed in the stream? I'm interested in it mostly for educational purposes, but also it could be useful of the executable could just print these and exit so that shell/CGI/etc scripts can read the file's datetime and other info.

Rectal Prolapse
18th June 2007, 21:34
Pelican9, I have a feature request. :)

Would it be possible to have an option to only extract forced subtitles? That would be great for movies that are dubbed in english but have the occasional foreign speaker with forced subs.

Rectal Prolapse
19th June 2007, 06:51
There appears to be a bug in xport's subtitle demux feature. In some cases subtitles are being skipped over.

I've discovered this with the Face/Off Blu-ray disc (Japanese version). Around 200 lines of dialog are missing. I confirmed this appears to be a bug in xport, as PowerDVD 7.3 has no trouble displaying all of them.

Also, I realize that it may be easier to have xport output the timestamps for Forced subtitles. I have no idea if the .sup format has flags for forced subs.

Rectal Prolapse
19th June 2007, 21:55
Not so fast - there may also be a bug in supread too - xport reports a subtitle with a valid timestamp, but it is missed by supread.

I guess I will PM you now Pelican9 - this is a tough nut to crack. :)

Pelican9
20th June 2007, 10:44
Not so fast - there may also be a bug in supread too - xport reports a subtitle with a valid timestamp, but it is missed by supread.

I guess I will PM you now Pelican9 - this is a tough nut to crack. :)

Send me the .sup file.

Pelican9
20th June 2007, 20:57
SUPread makes new subtitle line if it finds an "Epoch Start" composition state. I'll try to fix it.

Edit:
I've changed the condition of the new line.

Rectal Prolapse
21st June 2007, 03:06
Great! I can't wait to try out the fix. :)

Pelican9
21st June 2007, 07:55
You can try, but I recommend to wait for the next stable version.

Rectal Prolapse
21st June 2007, 17:37
Okay, will do!

chrkou
27th June 2007, 18:20
Pelican 9 Any news, about making hd .sup subtitles with supread?

Pelican9
27th June 2007, 20:36
I've stucked at the transparency of PNG pictures.
(If somebody familiar with handling of the PNG images in delphi please help me.)
If I'll fix it, you can reauthor any HD DVD with Sonic Scenarist.
The rebuilt (by EVOdemux) EVO cannot play in powerdvd because the map files don't match with the EVOs.
(I'm looking for the specs of the map files too.)
The next task to fix the BD .sup export (because it's almost ready) and make an srt (text) to subtitle (image) routine and then you can remux any BD title with a new subtitle track (with Tsremux).
After that I'll make the HD DVD .sup export. This one is not so important, because no tool for remux a HD DVD with a new subtitle stream...

You can call me pel or pelican, the '9' is an unwanted extension here (pelican was already reserved).

Ralin
23rd July 2007, 12:29
Hi!
This thread looks kinda dead but it was the most "on-topic" I could find.
I have been trying to fix subtitles for The Rock BluRay so I can mux them to a downscaled 720p MKV.
However using OCR with Supread fails, as output is garbish.
-Kl. 0000 tr··s··r········.
-Hvem r·al·l·erje6 med·
Bri6ade·e·eral ·ra·cirY. Hummel,
mari·ei···ter¡et.je· er p· Alcatraz.

I read in some other thread that you could use SubtitleCreator to downscale the subs (size is 1920x1080 and theres too many colors if I remember correct?) to SD-Subtitles, but SubtitleCreator only manages to open the .sup-file, saving it gives me a huge errormessage ( Original SUP (http://privat.ralin.org/subtitlecreatorbits0001.BD.23.976.txt)
Exported SUP from SUPread (http://privat.ralin.org/subtitlecreatorbits0001.txt) ) Im stuck on what to do next, my ideal goal would be to get a Sub/Idx-file for muxing, but what steps would be necessary to get there?
Is doing the job manually my only option?

For info:
SUPRead.exe Version 0.45b MD5:B15C3DBCC6538A8494A8E3090CA4B5AC
SubtitleCreator.exe Version 2.2.2 MD5:2D8C4DB5F80418E5014D629DB4B9569F

Links for sup-files:
This is the original SUP from the disc (http://privat.ralin.org/bits0001.rar)
This is from export sup in Supread (http://privat.ralin.org/bits0001.BD.23.976.rar)

Rectal Prolapse
23rd July 2007, 16:31
The best method I found was to use ABBYY's FineReader 8.0 program. Tell Supread to output BMPs, then use ABBYY's FineReader for OCR. However, you need to find a way to convert FineReader's text output into SRT format...so if you know how to program in Python, .NET, or some other language then you will have great results.

BTW, I get 99% accuracy using FineReader. However, I did have to use a photoshop batch action to change the background color to black, as Supread outputs a gray color, which messes up OCR because each white letter has a black outline. Changing the background to black eliminates this.

Ralin
24th July 2007, 01:04
...

I can't code, so thats that then :p
So everyone else is sitting there manually doing the job?

ahmguy
9th August 2007, 05:12
Hi, Can any one upload sample Presentation Graphics Stream ?

:thanks:

Pelican9
9th August 2007, 16:20
Hi, Can any one upload sample Presentation Graphics Stream ?

:thanks:

You can find on my page.

Ralin
11th August 2007, 02:06
btw, I just output a stream to BMP, going to try the approach given by Rectal Prolapse above, and the subtitles.scn-sst -file contains: 1 00:01:17:07 00:01:19:08 line0001.png
The output however is BMP...
edit: Using supread 0.45b
edit2: and speaking of that file, what is it really for?

Pelican9
11th August 2007, 11:02
That file is for the Scenarist which can read PNG only.

ahmguy
11th August 2007, 13:52
You can find on my page.
Thanks for help. But, I did not able to get sample PG stream on ur page.

It will be nice if u can provide link.

Thanks,

Ahmguy.

Pelican9
11th August 2007, 15:29
ahmguy:
For example bits0001.sup

ahmguy
11th August 2007, 15:52
ahmguy:
For example bits0001.sup
Pelican9:
Thanks for help.

I think "bits0001.sup" is subtitle file and does not contain any Presentation Graphics Stream PGS.

I wish to have PGS sample stream. It will be nice if some one can provide it.

Thanks,

Ahmguy.

Addition :

May be I was wrong.

[/off] I am vary much new to subtitle and PGS. I was trying to compare stream with doc and I did not work.[/off]

Thanks,

Viral

Pelican9
11th August 2007, 16:42
You think wrong.
Why do you ask if you know everything better? :)

woah!
12th August 2007, 20:13
hi

is there any way to add a delay to a subtitles.scn-sst file?

i looked at tsremux but it seems the delay area at the bottom is grayed out for me anyways. i have succeeded in authoring the png's into SACA and the result plays fine in powerdvd showing the subs, but they are 12 secs to late to the voice. this is constant delay throughout the movie.

other than that issue tho it all seems to be ok :)

Pelican9
12th August 2007, 20:22
woah!:
Do you mean you've suceeded with subtitles.scn-sst and pngs made by SUPread?
I can create a delay option in SUPread, but I think it's meanless, I cannot imagine how that 12 sec delay occured.
Could you try another movie?

woah!
12th August 2007, 20:26
yes i used tsremux to demux the subread track from ghostrider blueray, i opened it in supread and exported to .pngs

i then imported those into sonic aca with no issues (it seems) but the start time in the sst file is 1min 06secs but to match up to the voice it needs 12sec delay? weird huh..

Pelican9
12th August 2007, 20:31
What the first time value on the SRT page in SUPread?

woah!
12th August 2007, 21:13
Blu-ray subtitle found.
------------1----------
00000002: PTS=005B7DE2 (00:01:06,622)
0000000A: PCS (13) state: 2
0000002A: WDS1 (0A) id: 0 [674,876] - [1254,1025]
00000041: PDS (142) 64 palettes
00000190: ODS (6931) 580 x 149
00006ACE: END
00006AD3: PTS=006012EE (00:01:09,959)
00006ADB: PCS (0B) state: 0
00006AF3: WDS1 (0A) id: 0 [674,876] - [1254,1025]
00006B0A: END



so the voice starts at 54secs into the movie and the subs start at 1min 06sec by my eye. the audio is completely sync with the video.

Rectal Prolapse
12th August 2007, 21:21
woah, sounds like you need to apply a PTS delay offset to the subs (the timestamps never start at zero by the way - usually there is a 10 second or more delay added for some unknown reason). xport with the PGS extraction option is able to apply the proper offset.

What is SACA? And, are you playing the subs in PowerDVD using external subs? Were they left in bitmapped format? I would like to get bitmapped subs working in other players that support DirectVobSub, but for now I have to convert to text-format. I'd rather avoid that step to save time and fixing OCR errors.

woah!
12th August 2007, 21:31
what is the cmd in xport for extracting the subs ? didnt know it could do them.

these are png files in sonic advanced content author. they are subs that can be turned on/off with the menu.

Pelican9
12th August 2007, 21:59
xport -hj something.m2ts 1 1 1 1
The last 1 is the subtitle number.

woah!
12th August 2007, 22:17
hmm what version of xport do you have? i see no j option listed?

if i use 1 0 0 1 it doesnt run on v0.96

Pelican9
12th August 2007, 22:21
You have to give the video stream number because xport makes the PTS offset from the first video PTS.

xport Transport Stream Demuxer 0.96+

Usage:
xport <-pavtdszgh2uj> <infile> <program number> <video stream number> <audio stream number> <subtitle stream number>

Options:
p = parse only, do not demux to video and audio files
a = dump audio PTS
v = dump video PTS
u = dump subtitle (PGS) PTS
t = GOP timecode mode, count repeated fields/frames
d = dump all PID's (useful for debugging muxers, but tons of output)
s = suppress TS rate dumping (useful when piping output to a file)
z = demux to PES streams (instead of elementary streams)
g = dump ATSC PSIP information
h = input file is in HDMV (AVCHD and Blu-ray) format (192 byte packets)
2 = only extract 2 channels of HDMV LPCM audio from multi-channel tracks

j = just demux subtitle stream

woah!
12th August 2007, 22:29
where is 0.96+

i only have 0.96 from his site, i just downloaded a 0.97 version now from his site but that still doesnt have the j option :(

H:\>xport -hj Z:\GHOST_RIDER_BR\BDMV\STREAM\00066.m2ts 1 1 0 1
xport Transport Stream Demuxer 0.97

Usage:
xport <-pavtdszgh2> <infile> <program number> <video stream number> <aud
io stream number>

Options:
p = parse only, do not demux to video and audio files
a = dump audio PTS
v = dump video PTS
t = GOP timecode mode, count repeated fields/frames
d = dump all PID's (useful for debugging muxers, but tons of output)
s = suppress TS rate dumping (useful when piping output to a file)
z = demux to PES streams (instead of elementary streams)
g = dump ATSC PSIP information
h = input file is in HDMV (AVCHD and Blu-ray) format (192 byte packets)
2 = only extract 2 channels of HDMV LPCM audio from multi-channel tracks

Pelican9
12th August 2007, 22:41
You can download from my page:
http://pel.hu/down/xportsup096+.zip

woah!
12th August 2007, 23:00
yep there is a problem with tsremux demux by the look of it. heres the 1st sub info using xport:

00000002: PTS=004B7DF2 (00:00:54,972)
0000000A: PCS (13) state: 2
0000002A: WDS1 (0A) id: 0 [674,876] - [1254,1025]
00000041: PDS (142) 64 palettes
00000190: ODS (6931) 580 x 149
00006ACE: END
00006AD3: PTS=005012FE (00:00:58,308)
00006ADB: PCS (0B) state: 0
00006AF3: WDS1 (0A) id: 0 [674,876] - [1254,1025]
00006B0A: END

54secs start :)

will see if i can author it and will let you know. thx

Pelican9
12th August 2007, 23:05
Bingo!
That's why I didn't want to make that feature to SUPread...

woah!
12th August 2007, 23:09
i thought tsremux was the only way to extract the subs, didnt know xport had a version for it :)

Pelican9
12th August 2007, 23:23
I've just written a pm to drmpeg to ask to put back this feature to the newest version of xport.

Pelican9
12th August 2007, 23:24
i thought tsremux was the only way to extract the subs, didnt know xport had a version for it :)
Tsremux was not the only one but until this time it worked without any problem...

Rectal Prolapse
12th August 2007, 23:26
Pelican9, seems there is still a bug in processing the Face/Off subtitles. :(

Line 19 of the bitmap shows corruption in the image - seems two lines on that screen are running into each other and also combing!

anyways, thanks for this new version...

woah!
12th August 2007, 23:32
well i think tsremux needs to use the video stream aswell when extracting the sub, i tried in xport with no video/audio picked and it output the same timings as tsremux did before. with the video/audio streams 1 1 1 1 in xport it then gave me the correct timings.

Pelican9
12th August 2007, 23:40
Pelican9, seems there is still a bug in processing the Face/Off subtitles. :(

Line 19 of the bitmap shows corruption in the image - seems two lines on that screen are running into each other and also combing!


Did you send that subtitle to me?
What was the file name (if yes)?

Edit:
I've just found it.
Strange. Didn't I fix this bug at around version 0.4?
I'll try to fix it again tomorrow.

ahmguy
13th August 2007, 08:22
You think wrong.
Why do you ask if you know everything better? :)
Pelican9:
Thanks for help.

I think "bits0001.sup" is subtitle file and does not contain any Presentation Graphics Stream PGS.

I wish to have PGS sample stream. It will be nice if some one can provide it.

Thanks,

Ahmguy.

Addition :

May be I was wrong.

[/off] I am vary much new to subtitle and PGS. I was trying to compare stream with doc and it did not work.[/off]

Thanks,

Viral

Pelican9
13th August 2007, 17:56
Pelican9:
Thanks for help.

I think "bits0001.sup" is subtitle file and does not contain any Presentation Graphics Stream PGS.

I wish to have PGS sample stream. It will be nice if some one can provide it.

Thanks,

Ahmguy.

Addition :

May be I was wrong.

[/off] I am vary much new to subtitle and PGS. I was trying to compare stream with doc and it did not work.[/off]

Thanks,

Viral

You can think anything, believe or not, but that is definitely a PGS.
Read this and the HD subtitle ripping thread and you can find the structure of the sup file.
And please do not ask PGS again and again and again. :)

ahmguy
14th August 2007, 11:43
You can think anything, believe or not, but that is definitely a PGS.
Read this and the HD subtitle ripping thread and you can find the structure of the sup file.
And please do not ask PGS again and again and again. :)
Thanks... This really cleared my view.

Sorry if u felt, I ask u too many times.

big-guy
15th August 2007, 21:41
Hello,
I'm trying to rip a BD movie. And I've finally gotten the right subtitle stream. Through xsport. The only problem remaining is, that the imagesubs aren't OCR'd that great. This is a result I get:

·· ··: :· ··· ·:·· :·-·:···,
?····· ··· :····.

While the text is pretty clearly on the picture.
Is there any way to fix that? The OCR method of Subrip is easier, you put in the letters one by one, for the ones he doesn't know. And eventually it will OCR without me typing.

Another 'error' I have, is that the timing is doubled, it is correct. But this is the beginning of my srt file:

1
00:00:56,431 --> 00:00:57,431
Was any of this for good or bad?
I really couldn't say.

2
00:00:57,432 --> 00:00:58,432
Was any of this for good or bad?
I really couldn't say.

3
00:00:58,433 --> 00:00:59,433
Was any of this for good or bad?
I really couldn't say.

4
00:00:59,434 --> 00:01:00,434
Was any of this for good or bad?
I really couldn't say.

5
00:01:00,435 --> 00:01:01,435
Was any of this for good or bad?
I really couldn't say.

6
00:01:01,436 --> 00:01:01,687
Was any of this for good or bad?
I really couldn't say.

7
00:01:02,771 --> 00:01:03,771
But like most people, I guess...


The subs are repeated, depending on how long the subtitles are meant to be displayed.
Is there any way to fix that? Except for manual editing that is...

Thanks in advance.

Pelican9
15th August 2007, 22:00
Is there any way to fix that?

There is no way without your help.
Share the .sup file.

Jan Marijniszoon
16th August 2007, 20:45
You can download from my page:
http://pel.hu/down/xportsup096+.zip

Could you please make a mirror for the 'normal' latest version of xport too?

I can't connect to his website!

Thanks alot in advance!

Pelican9
16th August 2007, 23:07
You can download now from my page.

Jan Marijniszoon
16th August 2007, 23:54
You can download now from my page.

Thanks a bunch!
Let me take this opportunity to thank you also for your devotion in making such applications as EVOdemux!

If it weren't for guys like you and drmpeg, guys like me would be helpless in setting the first steps in exploring high definition content.

So again: thank you very much for all of your work!

big-guy
17th August 2007, 00:17
There is no way without your help.
Share the .sup file.

OK, you can get it here:
http://files-upload.com/files/439799/bits0001.rar

Please let me know what you can do with it.

:thanks:

Pelican9
17th August 2007, 00:38
Unfortunately this font is too small for recognizing. :(
The first titles have the same font size and I make my program with these fix size parameters. It was a mistake.
The other problem (six times the same line) is not my fault.
The stream contains this information (bad authoring?).

big-guy
17th August 2007, 00:42
Unfortunately this font is too small. :(

:(.
Ok, will continue manual ripping then :(. Thanks for the effort.
How big are the normal fonts then :?.

Yeah about the 6 lines, I figured it was due to that as well. Also when exporting all the subs to .png, they also come back every second. Not really efficient :?.

Is it maybe possible to have an OCR implementation like in SubResync or SubRip (idx/vob subs). There you only have to enter one type of letter the first time it comes around. So it remembers the characters on the fly. That way you don't have to type whole sentences when it's not detected with automatic OCR.
I don't know how hard that is to implement. Also don't know if those tools are open source, so you can see their code.

For now will continue manually.

Taxidermista
12th September 2007, 18:23
I'm trying to convert the spanish subs from IMAX Roving on Mars Blu-Ray to srt using SUPread 0.46b but the ocr crashes during the process, on lines 45, 120, 192 and 193.

I've uploaded the sup file here (http://rapidshare.com/files/55193746/Roving.on.Mars.BluRay.spanish.subs.rar.html).

I'm thinking now after checking the video that it crashes when there is a "double subtitle" in the same frame, up and down.

ahmguy
13th September 2007, 13:41
I'm trying to convert the spanish subs from IMAX Roving on Mars Blu-Ray to srt using SUPread 0.46b but the ocr crashes during the process, on lines 45, 120, 192 and 193.

I've uploaded the sup file here (http://rapidshare.com/files/55193746/Roving.on.Mars.BluRay.spanish.subs.rar.html).

I'm thinking now after checking the video that it crashes when there is a "double subtitle" in the same frame, up and down.
I tried your stream . I got same result. When we see Image for that subtitle, It contains junks around text. The object has not been encoded or decoded properly. (May be RLEncoding / Decoding error). Thus, OCR may not able to correct it. Correct me if i m wrong.

Rectal Prolapse
13th September 2007, 17:25
Try using an older version of supread (like 0.4). Pelican9 mentioned that he probably re-introduced a bug from a long time ago.

reallygreatidea
7th November 2007, 20:18
Yep, use an older version...I had the same problem and used the 0.4 and it was fine.

ArcticFox
24th November 2007, 22:26
Is there any way to get supread to remember the characters im inputting, having to constantly put the same letters in for over 1000 subtitles is rather tiring. Especially when i have to do it for each 13 tv show episodes.

Taktaal
25th November 2007, 00:58
Try Suprip instead http://x0r.ch/suprip/

ArcticFox
25th November 2007, 11:14
I did try but im getting unhandled exception "palette unknown == 5" on my Robin Hood series 1 blu-ray

Taktaal
27th November 2007, 21:10
Hm, could you upload the .sup somewhere to have a look at? Unfortunately I only have a HD-DVD drive so I need more Bluray samples to improve compatibility.

Thanks
v

ArcticFox
27th November 2007, 21:28
blu-ray.sup (www.mbryce.co.uk/blu-ray.sup)

Cheers.

Taktaal
3rd December 2007, 00:05
Ok I fixed the bug, the subtitle now correctly converts. Download the new version from http://x0r.ch/suprip/

I still have some issues with subtitle bitmaps that are split over two 0x15 blocks. There seem to be some rather inconsistent interpretations on when to end the processing on the first block, and when to start it in the second.

i.e. in the image 350 of the above .sup file, the first block ends with
00 87 FF 10 0F 14 0C 00 88 02 0C 16 07 00 00 00

00 87 FF = 7 pixels of color FF
10 0F 14 0C = 4 single pixels
00 88 02 = 8 pixels of color 02
0C 16 07 = 4 single pixels
00 00 = end of line
00 = ?? (why is there a stray 00 at the end of the block)

The next block starts with
50 47 08 B2 3D DE 08 B2 39 B0 15 09 4E 00 00 00 40 8C FF 04 23 14 13 00 86 06

50 47 = PG
08 B2 3D DE 08 B2 39 B0 = PTS values
15 = bitmap block following
09 4E = length
00 00 = ?? (can't be valid pixels otherwise we have two end of lines right after each other)
00 40 8C = 140 (!) pixels of color FF right in the middle of the text
04 23 14 13 = 4 single pixels (this is where the stream starts making sense again)
00 86 06 = 6 pixels of color 06

ArcticFox
5th December 2007, 19:27
Works like a charm, thanks a lot.

lanfeust9
13th January 2008, 03:13
I have used "xport -hj 00000.m2ts 1 1 1 1" to create the sup file from xport 0.96+.

Supreap does not see the subtitles correctly and is not able to detect half of the letters from most of words. When not detected correctly the letter is surrounded with red in supreap.

I don't know if I can say the name of the movie I am testing this with, it's a blueray disc.

I am using supreap 0.93, any idea on the problem?

Taktaal
13th January 2008, 12:10
Is it such a nasty porn movie you can't even say the title? :p

If we should have a look at it we need the .sup file itself so we can test our programs.

lanfeust9
13th January 2008, 20:24
No it's 300, I would not need the subtitles for a porn :).

Could you pm me an address where I can send you the sup file to, it is an 18MB file ?

If you don't have any, I could open an FTP tomorrow between 8AM and 10 PM GMT +1, can't be opened at all time otherwise I can't sleep.

Edit: posted on RS

lanfeust9
13th January 2008, 22:05
It's now on RS:

http://rapidshare.com/files/83572942/bits0001.sup

lanfeust9
13th January 2008, 23:02
Ok that was me probably, I did not see that I could change the "similarity tolerance" value. By increasing it I get all the words recognised most of the time I think.

I am now trying to get it to work on my PopCornHour box... (HD multimedia player).

Thx.

Zow
24th January 2008, 10:21
I am so lost here:-(

I am trying to rip subtitles from a Blu-Ray movie, but just can't figure out how to.

I've used TsRemux and remuxed the largest m2ts file (the main feature) to a TS file, which I can now import into AutoMKV. in addition to the AVC Video Stream and Dolby Digital Audio Stream, I selected Presentation Graphics Stream #1 and #2, assuming the first one is English subtitles.

When I import the TS file into AutoMKV, I see the video and the audio, but not the subtitles.

So, I tried to figure out a way to rip just the subtitles stream, then import it into AutoMKV.

My problem is, I can't find any application among the ones listed here, which would read any of the files in the Blu-Ray structure, or can find the subtitles in the TS file.

I know I am missing something obvious, but can someone point me in the right direction?

Rectal Prolapse
24th January 2008, 18:36
Use xport to demux the subtitle stream. Then use supread or suprip on the resultant .sup file created by xport.

I don't have time to give you more details, but that should get you searching. :)

Zow
24th January 2008, 19:11
Thanks, Rectal Prolapse. [Edit: Eh, I get easily confused:-( Tried xportpgs, but at least the version I found, starts a DOS window, then it quits within a split-second. I am on Vista Ultimate.]

Zow
25th January 2008, 10:15
O.K., found another version on http://www.w6rz.net/, but it still quits immediately.

Is it Vista-friendly?

Any ideas?

Rectal Prolapse
25th January 2008, 21:20
You need to very carefully read the posts by drmpeg on how to use xport. And very carefully read the xport command-line help.

You do realize xport is a command-line tool right? ANyways, I'm sure you can figure it out. :)

Zow
29th January 2008, 20:31
You need to very carefully read the posts by drmpeg on how to use xport. And very carefully read the xport command-line help.

You do realize xport is a command-line tool right? ANyways, I'm sure you can figure it out. :)

Rectal Prolapse, thanks.

But, my brain is prolapsing, from beating my head against the wall:-(

I understand that xport is a command line tool, but shouldn't it start up, so that I can type in the commands in that pretty black box?

On my Vista Ultimate system, when I try to open xport, I get a split-second glimpse of the black box, then it quits.

So, I am in the dark, so to speak, and could use a small bit of hand-holding:-)

Rectal Prolapse
30th January 2008, 23:03
Zow, xport is a command-line tool, so it can't be run straight from the desktop. :)

You need to open a command prompt first. In XP, you go to the Accessories menu then select "Command Prompt". You need a command prompt first, before running xport or any other command-line program.

Then you need to change the current directory to where xport resides, or ensure xport is in the command prompt path.

If the above doesn't make sense, I suggest you google first!

I hope that helps!

reallygreatidea
20th February 2008, 18:32
This was a great help for me too!! Thanks a lot!

saint-francis
20th March 2008, 01:45
My goal = turn BD subtitles into VobSub format subtitles.
My obstacle = this doesn't seem possible.

I just read through this entire thread since I have lost track of it in the past several months and I can see no clear way of doing this. I seem to remember somewhere in the past there being mention of converting BD sup. to HD DVD .sup. Is this so? If this is possible then they could be converted via SubtitleCreator. If not it looks like an uphill climb to convert BD .sup files to .srt. Personally I do not enjoy making .srt's. I find the process arduous. I have thought that the OCR process went well and then muxed the movie only to find that every letter Y is capital or something like that 7 months later when I go to watch the movie. At that point it's even more of a hassle to re rip the disk and run the OCR process over again. The methods people are using for BD subtitles -> .srt looks even more labor intensive.

Any help?

Rectal Prolapse
20th March 2008, 16:26
"Easy way": Convert the BD subtitles into PNGs or BMPs using supread. Find a tool that will downscale the PNGs into SD resolution (photoshop batch?). Then convert them to SUB/IDX format. It is possible that someone is already doing this (subrip author?).

saint-francis
20th March 2008, 17:49
OK. Thanks for the tip.
How does one convert the downscaled .PNG's to VobSub format?
And how to downscale exactly? What is the resolution of the .PNG's I will be working with and what would they then need to be changed to?
Also don't HD subtitles have more colors than VobSub can handle? How to deal with that?

Rectal Prolapse
20th March 2008, 20:59
Conversion of PNG/BMP to 4 color vobsub may have been done by some unknown tool out there. (Subtitle Creator? Subrip? I don't know).

If you know your way around photoshop you could probably batch convert to the needed resolution - vobsub uses DVD resolution so that should be a clue there. Converting to 2 bit color should be doable as well.

You'll need to figure out the above yourself, sorry.

manusse
20th March 2008, 21:33
Hi,

I've written the code that converts the HD-SUP subtitles to SD in SubtitleCreator. You can have a look.
Standart definition mostly can be:

PAL: 720x576
NTSC: 720x480

There are some other resolutions possible but they are not supported by SubtitleCreator. The number of colors in SD sup or VobSub files is 4 in a palette of 16 (you can change the index used for each subpic but it's not very common) and the palette is in the idx file whereas in SD-SUP files, there is a 256 color palette with each subpic. I've written a very simple routine to convert them to SD. It first analyzes the 256 colors of the first subpic and choose the darkest, the brightest and a color in-between, plus a transparent background. Then I first resample the HD-SUP to SD resolution (nearest neighbor gives quite acceptable results and is fairly fast) and in a second step choose the correct color between the 3 available plus the transparent one. I don't know how to do it for BD-SUP files.

Cheers
Manusse

saint-francis
21st March 2008, 06:48
what I know about programing could be fit on the back of a postage stamp. What I know about photoshop is maybe a little greater but not much. That being said, I am going to make this work. I will start experimenting this weekend. I don't think I will really be able to contribute to the community (no matter how much I long to) but I will post my results.
Thank You both for your input.

Kurtnoise
21st March 2008, 09:17
why not convert BD sup file to srt (via SupRip) and then convert the srt to VobSub with SC ?

saint-francis
21st March 2008, 17:06
why not convert BD sup file to srt (via SupRip) and then convert the srt to VobSub with SC ?

This is why:

6
00:02:33,019 --> 00:02:34,361
(G RU NTI NG)

17
00:03:02,515 --> 00:03:03,925
(SCREAMI NG)

18
00:03:09,422 --> 00:03:10,923
(MAN G ROAN I NG)


That is from a .srt generated by SupRip.
I just made it and It took me about 30 minutes to properly edit it. There were all kinds of other spelling errors also. I tried to redo the process thinking that I might have accidentally misinterpreted a character (l for I) but SupRip seems to have saved my incorrect response and it won't let me give new input; even when I delete the program and try a fresh copy. While I must admit that the work is worth it when compared to watching a movie in a foreign language with no subs, it's still an arduous process.

BTW SUPread makes the same mistake with the I and l now too.

Taktaal
22nd March 2008, 15:43
It seems like you have a subtitle with a lot of space between letters. Try raising the "Space Width" option until the unwanted spaces disappear.

If you accidentally misidentified a character, you can select it again, change the letter, and press OK. The stored character will be changed.

azad
22nd March 2008, 21:06
Does Suprip has a problem with calculating the right endtime of a subtitle?
This only occurs with sup's from BDs.

Look at this:
1
00:00:39,622 --> 00:00:39,557
Line 1

2
00:02:28,481 --> 00:02:28,412
Line 2

3
00:02:31,067 --> 00:02:31,054
Line 3

4
00:04:13,795 --> 00:04:13,725
Line 4

Taktaal
23rd March 2008, 14:18
Looks like. Can you upload the .sup file somewhere so I can check that out?

azad
23rd March 2008, 15:19
Looks like. Can you upload the .sup file somewhere so I can check that out?

Here's the link to the .sup file
http://rapidshare.de/files/38905852/bits0001.sup.html

This is not the same .sup file I took the timecodes from in the last post, but the result is the same.
This problem seems to occur for all BD .sup's I ripped with xport 0.96+.

kurt
28th March 2008, 07:33
is there an option in xport to demux all BD subtitle streams at once (and nothing else)?

Pyth0n
28th March 2008, 07:48
Can you put a custom format for SUP files?

Now PS3 can playback 5.1 profiles. Have been testing and I'm able to playback any MKV file with 1280x544 in the PS3 XMB remuxing them with m2ts using smartlabs tsremuxer 1.6.1.

It's great since for PS3 we won't need to convert anymore, it's just remux and burn to BD Structure DVD if the movie have DTS audio.

laserfan
28th March 2008, 15:43
It seems like you have a subtitle with a lot of space between letters. Try raising the "Space Width" option until the unwanted spaces disappear.

If you accidentally misidentified a character, you can select it again, change the letter, and press OK. The stored character will be changed.Yes, I have found SupRip to work wonderfully well, and I especially appreciate the pop-up descriptions of the "adjustment" settings, and the ability to see instantly how well my new settings work.

Not sure why you're taking such a low-profile w/this tool Taktaal, but it is excellent (much better than SupRead) thanks very much!!! :)

Ryu77
28th March 2008, 16:49
Can you put a custom format for SUP files?

Now PS3 can playback 5.1 profiles. Have been testing and I'm able to playback any MKV file with 1280x544 in the PS3 XMB remuxing them with m2ts using smartlabs tsremuxer 1.6.1.

It's great since for PS3 we won't need to convert anymore, it's just remux and burn to BD Structure DVD if the movie have DTS audio.

Since when did the PS3 suddenly be able to play AVC with 5.1 level?

I think you are mixing things up a little. What is happening is that the original file is encoded with the 5.1 level but the encoding options above the 4.1 level weren't enabled... So when you remux with tsMuxeR and change the level to 4.1, the PS3 has no problem playing it.

Try doing that with an actual 5.1 level AVC encode... I think you will find the outcome is different.

Note: There is a working method that allows you to create a 720p AVCHD disc for the PS3 with swtichable subtitles, see here: http://forum.doom9.org/showthread.php?t=134402. At this point, this is the only way to make this happen until... 1) SUPread outputs 720p, or 2) tsMuxeR supports input of srt subtitles.

Robertus
29th March 2008, 01:44
hello guys

i have a problem with supread, because, it convert the subtitle with some error, some characthers are wrong...

so i ask, there are another way to put into mkv files the subs without error?

i try sup2vobsub, but it not work with .sup bluray files.... incredible....

if i use sub2vobsub i have idx file 1kb, sub file 0kb

E:\>sup2vobsub -create 00000.track_4608
sup-file: 00000.track_4608.sup
sub-file: 00000.track_4608.sub
idx-file: 00000.track_4608.idx

Sub 1
PTS: 00:21:58:730
Packet size: 936
Data packet size: 0
Parse control sequence:
(ptr=0) Date: a8 3
(ptr=2) Next: 0
(ptr=4) Cmnd 0: force diaplaying
(ptr=5) Cmnd 1: start date
(ptr=6) Cmnd 0: force diaplaying
(ptr=7) Cmnd 1: start date
(ptr=cool.gif Cmnd 0: force diaplaying
(ptr=9) Cmnd 0: force diaplaying
(ptr=10) Cmnd 2: stop date
(ptr=11) Cmnd 3e:Unknown command
(ptr=12) Cmnd 3: palette: 1 9 5 0
(ptr=15) Cmnd 47:Unknown command
(ptr=16) Cmnd 14:Unknown command
(ptr=17) Cmnd 3d:Unknown command
(ptr=1cool.gif Cmnd 55:Unknown command
(ptr=19) Cmnd 9b:Unknown command
(ptr=20) Cmnd 14:Unknown command
(ptr=21) Cmnd 3d:Unknown command
(ptr=22) Cmnd 53:Unknown command
(ptr=23) Cmnd 50:Unknown command
(ptr=24) Cmnd 17:Unknown command
(ptr=25) Cmnd 0: force diaplaying
(ptr=26) Cmnd a:Unknown command
(ptr=27) Cmnd 1: start date
(ptr=2cool.gif Cmnd 0: force diaplaying
(ptr=29) Cmnd 2: stop date
(ptr=30) Cmnd 3e:Unknown command
(ptr=31) Cmnd 3: palette: 1 9 0 3
(ptr=34) Cmnd 4: alpha channel: 0 0 8 7
(ptr=37) Cmnd 50:Unknown command
(ptr=3cool.gif Cmnd 47:Unknown command
(ptr=39) Cmnd 14:Unknown command
(ptr=40) Cmnd 3d:Unknown command
(ptr=41) Cmnd 53:Unknown command
(ptr=42) Cmnd 50:Unknown command
(ptr=43) Cmnd 0: force diaplaying
(ptr=44) Cmnd 0: force diaplaying
(ptr=45) Cmnd 0: force diaplaying
(ptr=46) Cmnd 0: force diaplaying
(ptr=47) Cmnd 14:Unknown command
(ptr=4cool.gif Cmnd 0: force diaplaying
(ptr=49) Cmnd 9d:Unknown command
(ptr=50) Cmnd 0: force diaplaying
(ptr=51) Cmnd 1: start date
(ptr=52) Cmnd 1: start date
(ptr=53) Cmnd da:Unknown command
(ptr=54) Cmnd 80:Unknown command
(ptr=55) Cmnd 80:Unknown command
(ptr=56) Cmnd ff: end
Duration: 5.490 s
Writing PES for vobsub:
Remaining bytes: 936
PES packet: 1
Header size: 29
Writing 936 bytes
Padding 1083 bytes


i try with subtitlecreator, but the program crash...

i go to Tools - manipulate SUP or Vobsub file - Open Sub - File type - SUP files

i load the .sup files but the program load without a motivation

the mouse cursor loading for 1,2 mins

when finish loading, i save the idx/sub but i have a 2kb files (idx/sub) and the .sup is 10mb...


is right that at the moment there aren't good way to have the correct subtitle intomkv from bluray discs?

thank u for the support

ps. supread is a very nice tool, i try suprip but not work fine...
supread create a .srt file... and convert with some error, but if supread can convert .sup file to .idx\.sub files, i think that there aren't problem.

Rectal Prolapse
29th March 2008, 04:57
Robertus, the format of .sup files made by EvoDemux and xport are not compatible with tools that expect regular (non-high-def) .sup files that are made from DVDs. Sorry. :(

manusse
29th March 2008, 12:37
Already answered here: http://forum.videohelp.com/topic348294.html

guru1968
29th March 2008, 17:30
hello guys,

just wanna know what's the current state w.r.t. BD subtitle ripping?

neither supread nor suprip work for me
- supread (v0.52b2) says Subpicture format error
- suprip (0.93) does not find all the subtitles, always stops after a few minutes...

I de'muxxed the sup streams via tsMuxeR (1.5.0)
- could that be the problem?
- is there any other (better?) way to get the sup streams from a blu-ray m2ts file?

I guess the development of these two subtitle tools is still on-the-go, or am i wrong??

greetz,
guru

p.s.
here's what SUPread verbosely outputs before saying "ERROR Subpicture format error." in the status line:

N:\Temp\00000.track_4608.sup loading
Blu-ray presentation graphics found.

------------1----------
00000002: PTS=009A225D (00:01:52,237)
0000000A: PCS (13) state: 2
0000002A: WDS0 (0A) id: 0 -
00000041: PDS (4E4) 250 palettes
00000532: ODS0 (7713) 439 x 156
00007C52: END
00007C57: PTS=009C8A37 (00:01:53,989)
00007C5F: PCS (0B) state: 0
00007C77: WDS0 (0A) id: 0 -
00007C8E: END
------------2----------
00007C93: PTS=009E6E18 (00:01:55,365)
00007C9B: PCS (13) state: 2
00007CBB: WDS0 (0A) id: 0 -
00007CD2: PDS (4E4) 250 palettes
000081C3: ODS0 (F991) 982 x 155
00017B61: END
00017B66: PTS=00A7318C (00:02:01,747)
00017B6E: PCS (0B) state: 0
00017B86: WDS0 (0A) id: 0 -
00017B9D: END
------------3----------

Kurtnoise
29th March 2008, 19:11
why not upgrading to the latest tsMuxer and retry ?

guru1968
29th March 2008, 20:11
thanks for the reply, but that doesn't work, same error as before...

BUT:
this definitely is a tsMuxeR issue - using sups demuxxed by xportpgs work MUCH better, at least SUPread no longer is complaining, it found 843 subtitles, btw exactly the same amount suprip found now ;-)

thanks,
guru

azad
29th March 2008, 21:01
@Taktaal

Did you already figure out something regarding the wrong subtitle timecodes when using BD .sup files?

Pyth0n
30th March 2008, 00:55
Since when did the PS3 suddenly be able to play AVC with 5.1 level?

I think you are mixing things up a little. What is happening is that the original file is encoded with the 5.1 level but the encoding options above the 4.1 level weren't enabled... So when you remux with tsMuxeR and change the level to 4.1, the PS3 has no problem playing it.

Try doing that with an actual 5.1 level AVC encode... I think you will find the outcome is different.


tsMuxer doesn't change the profile from 5.1 to 4.1. At least when I add the m2ts remuxed with tsmuxer the profile of the video stream still is kept as 5.1.

I don't know how de video was encoded and with wich flags, i'm only telling what's in the profile. As far as I tested sometimes in the past PS3 didn't played if the video profile was marked as 5.1. It's accepting that now or tsmuxer is showing wrong info about the video and is not converting the profile.

Ryu77
30th March 2008, 02:41
tsMuxer doesn't change the profile from 5.1 to 4.1. At least when I add the m2ts remuxed with tsmuxer the profile of the video stream still is kept as 5.1.

I don't know how de video was encoded and with wich flags, i'm only telling what's in the profile. As far as I tested sometimes in the past PS3 didn't played if the video profile was marked as 5.1. It's accepting that now or tsmuxer is showing wrong info about the video and is not converting the profile.

The PS3 is probably just reading the header or metadata (wherever that information is stored?) differently now. Maybe the new firmware changed that? You will still find that if you come accross a "true" 5.1 level encode (with that level's encoding settings enabled), the PS3 will not play it.

Greif
30th March 2008, 18:37
this definitely is a tsMuxeR issue - using sups demuxxed by xportpgs work MUCH better, at least SUPread no longer is complaining, it found 843 subtitles, btw exactly the same amount suprip found now ;-)

What was the command line you used for demuxing the sup with xportpgs? When I try I get a constant stream of the following:


Transport Sync Error, skipped 2 bytes, at 2074
Discontinuity!, pid = 2631 <0x0a47>, received = 0, expected = 1, at 2075
Transport Sync Error, skipped 6 bytes, at 2075
Transport Sync Error, skipped 4 bytes, at 2076
Discontinuity!, pid = 4113 <0x1011>, received = 15, expected = 14, at 2077
Transport Sync Error, skipped 4 bytes, at 2077
Transport Sync Error, skipped 4 bytes, at 2078

I'm using xportpgx 0.96 and tsmuxer 1.71b

guru1968
30th March 2008, 19:43
@Greif:

the SUB demux problem is fixed in tsMuxeR 1.7.2
- at least for the problems I had...

but to answer your question:
I used "-jhus" options
- problem with xportpgs is that you can only extract one subtitle at a time and it writes those in the xportpgs installation directory; be sure to at least rename the "bits0001.sup" before doing the next subtitle...

p.s. I was discovering a few errors in the subtitle pictures (glitches in the characters) from within the stream demuxxed by xportpgs - didn't find those in the streams demuxxed by the new tsMuxeR; maybe I just not found them again (they were very few in numbers) or this is an issue in xportpgs...

ylagace
30th March 2008, 20:41
I have read all the threads I could find on this subject and some people seem to indicate that the tools should work but I am stuck when I follow the same instructions.

I am trying to convert the POC3 (Bluray) english subtitles.

I tried two ways to create the sup file:

1. Use xport -jh 00001.m2ts 1 1 1 1 (the pgs version 0.96)
I get a short 2MB bits0001.sup file that subrip 0.93 can open but I have only 143 subtitles. I am missing quite a lot of subtitles. I do get discontinuity errors from xport while running it.

2. Use TSMuxer to extract the sup file and I get a 24MB file (seems better). I only demux the PGS nothing else. But if I try to read with suprip 0.93 I get only the first subtitle, nothing else. I f I try to read with supread then I get "Subpicture format error" message. And SubtitleCreator will not convert it if I try to use the conversion Tool.

I am only trying to create a SRT file so I can play the subtitles in Nero ShowTime 8 or on my popcorn hour A100.

I have been using EVOdemux and suprip 0.93 for my HD-DVD title and the subtitles are coming great. It is the bluray that are giving me a lot of trouble.

I am using Vista 32 bit if maybe that explains my problem.

If anybody has experienced this problem and resolved it some hints would be appreciated.

guru1968
31st March 2008, 18:27
maybe you are using the wrong m2ts (is this the biggest m2ts in the STREAM folder? I mean really big-10 to 40Gig)
- or maybe the main movie is split into several m2ts files (e.g. Alien vs Predator does that)

your xportpgs option are wrong, need to give -jhus

version 1.7.2 of tsMuxeR has the PGS problems fixed - I did not run into the Subpicture format error with this version

hope that helps a bit...

ylagace
1st April 2008, 02:35
Thanks guru!

Yes 00001.m2ts is the full movie for POC3.

OK TSmuxer 1.7.2 gives me all the subtitles now (1653).

xport -jhus gives me the same limited file, only 2.2MB (155 subtitles)

I will keep working with TSmuxer for now! It came right on time!

I still have to fix the timestamps but I have some advice for that.

guru1968
1st April 2008, 11:59
suprip0.93 seems to not use the correct fade-out timestamps, for me they're always earlier(!) than the fade-in timestamps...

But: SUPRead seems to get the timestamps correct, thought the OCR is worse than that of suprip - at least it seems not to 'learn' unrecognized chars, i.e. you always need to correct them - whereas in suprip you only need to correct those once...
(as I am german, I always need to type our famous ä, ö, ü, ß every single time again and again and again....)

maybe an intelligent sed-script could combine the correct timestamps from SUPread with the correct texts from suprip... ;-)

Rectal Prolapse
1st April 2008, 16:43
guru - you could probably do it with Subtitle Workshop.

Have two SRT files, one from supread with the correct timestamps and the second from suprip with better OCR results.

Don't bother doing the OCR using supread.

Load the suprip SRT into subtitle workshop (2.5 version should work), and tell subtitle workshop to resync the subtitles using the times in the supread SRT file. :)

laserfan
1st April 2008, 18:34
Load the suprip SRT into subtitle workshop (2.5 version should work), and tell subtitle workshop to resync the subtitles using the times in the supread SRT file. :)Yes, or just use SW's Adjust ("First spoken, last spoken") feature and that will work too.

ylagace
2nd April 2008, 01:54
Thanks for the suggestions but supread 0.21 still gives me "loading Subicture format error" when I load the sup file created with TSMuxer 1.7.2. suprip is working fine with that file but the timestamp have negative duration.

I patch them using WordPad (Replace/All) and I use Set automatic duration in Subtitle Workshop but I seem to get an offset in subtitles timing toward the end of the POC3 movie. I say I might because I jumped forward in time by 2.5 hours in Nero 8 as I do not have time to watch it from the beginning this week. Not sure if it is Nero 8 or the srt timing. I will have to try next weekend. I wish I could try the other method of syncinc using the srt file in workshop...

azad
2nd April 2008, 10:28
guru - you could probably do it with Subtitle Workshop.

Have two SRT files, one from supread with the correct timestamps and the second from suprip with better OCR results.

Don't bother doing the OCR using supread.

Load the suprip SRT into subtitle workshop (2.5 version should work), and tell subtitle workshop to resync the subtitles using the times in the supread SRT file. :)

Thanx for the tip. I'll give it a try. Till now I use UltraCompare to combine the correct timestamps from supread with the ocr'ed subtitles from suprip. It works for 95% of all lines but some lines I still have to correct manually, so maybe subtitle workshop is the better choice. :)

Rectal Prolapse
2nd April 2008, 20:25
supread is at version 0.52 if I remember correctly.

B4tm4n
2nd April 2008, 20:43
supread is at version 0.52 if I remember correctly.

0.52b :p

Pelican9
3rd April 2008, 13:05
It seems I can work on SUPread again.

What is the most important feature request/bug fix what I have to do first?

Lot of people have sent me character sets, but I've no time to find all the character sets and their coding, so if you want a new character set try to make it based on my instruction written in this thread.

For the 720p BD stream export (I think it is the most wanted feature) I need the same things (abc.png, data.pas but with smaller characters to fit to the smaller screen).

Thank you Scott (from the States) who is the first (and only) user who has donated my work.
In March the downloads of my three tools from pel.hu have reached the hundred thousands number.

Ryu77
3rd April 2008, 14:33
720p output! Please! Please! Please!...

I think you get my point. :)

Also Pelican9, I sent a quick question about BDedit to your private messages. It would be very much appreciated if you could take a quick look.

hm10
3rd April 2008, 18:06
Lot of people have sent me character sets, but I've no time to find all the character sets and their coding.

i sent you the chars and the codes

guru1968
4th April 2008, 20:53
most wanted feature? ...better OCR, I guess... :rolleyes:

or at least one, that 'learns' like in suprip; for me being german, in suprip I only need to type ä, ö, ü, ß once - while in SUPread I need to type those every time :-(

or maybe add some robustness - have a look here: LINK (http://forum.doom9.org/showthread.php?p=1119694#post1119694)

jamos
6th April 2008, 02:42
It seems I can work on SUPread again.

What is the most important feature request/bug fix what I have to do first?

Lot of people have sent me character sets, but I've no time to find all the character sets and their coding, so if you want a new character set try to make it based on my instruction written in this thread.

For the 720p BD stream export (I think it is the most wanted feature) I need the same things (abc.png, data.pas but with smaller characters to fit to the smaller screen).

Thank you Scott (from the States) who is the first (and only) user who has donated my work.
In March the downloads of my three tools from pel.hu have reached the hundred thousands number.

Hey Pel glad your back. Can you fix the issue with scenarist and putting in a dummy subtitle at the beginning. Please take out that feature as it just causes scenarist to not work right (delays the subtitles). You do not need to put in a dummy subtitle in scenarist as you just put in the offset as normal.

Is there a way to get older versions of supread? I would love if you could download older versions as this new version just does not work with scenarist without manually editing the xml file.

thanks,
JAMOS

hubblec4
7th April 2008, 14:19
hello

i have the same problems with bluray.sup

but i think in the next time that will be fixed by some progs like supread or bdedit.

at the moment i convert my bluray.sup to "DVD.idx/sub" in 3 steps.

step 1: extract the bluray.sup with TSremux1.7.2

step 2: load the bluray.sup in supread052b2 Option->Stream exp. klick on Hd DVD than export the file to hd-dvd.sup

step 3: open the hd-dvd.sup with subtitlecreater2.2.2 tools-->manipulate sup -->open hd-dvd.sup and save as dvd.idx/sub


thats the best way for me to keep the original subpictures at time.

I hate "OCR" :-) its to many work.


hubble

hubblec4
7th April 2008, 14:23
It seems I can work on SUPread again.

What is the most important feature request/bug fix what I have to do first?



The most important feature is to export the hd-dvd.sup or bluray.sup to a dvd.idx/sub


i will make a donate when i find it in your prog.
Pelican....your prog supread is great. thanks


hubble

saint-francis
7th April 2008, 15:06
The most important feature is to export the hd-dvd.sup or bluray.sup to a dvd.idx/sub


i will make a donate when i find it in your prog.
Pelican....your prog supread is great. thanks


I second this. Personally I am not interested in ocr for subtitles when one can convert them to vobsub format perfectly. And I too would donate if this feature is implemented. ;)

manusse
7th April 2008, 18:59
The most important feature is to export the hd-dvd.sup or bluray.sup to a dvd.idx/sub

As you mention before the hd-dvd.sup to dvd.idx/sub is already possible using SubtitleCreator. Do you need some improvements to this feature?

Cheers

Manusse

quantum
8th April 2008, 14:42
As you mention before the hd-dvd.sup to dvd.idx/sub is already possible using SubtitleCreator. Do you need some improvements to this feature?I don't know if it's a limitation of the idx/sub format (or the ripped source), but SubtitleCreator seems to generate SD resolution graphic subtitles. This is better than nothing, but a HD resolution subtitle looks much better.

hubblec4
8th April 2008, 18:26
....., but SubtitleCreator seems to generate SD resolution graphic subtitles. This is better than nothing, but a HD resolution subtitle looks much better.

yes it is better than nothing.

the ocr doesn't work for subtitles in greek or arabien and so on.

The best solution will be: mkv(mkvmerge) and vsfilter to implement the support for bluray.sup and hd-dvd.sup !


hubble

manusse
8th April 2008, 20:06
I don't know if it's a limitation of the idx/sub format (or the ripped source), but SubtitleCreator seems to generate SD resolution graphic subtitles. This is better than nothing, but a HD resolution subtitle looks much better.

Originally, there was the SD-SUP file format and the SD-idx/sub format. Pel developped the new HD-SUP formats (Blu-Ray SUP and HD-DVD Sup which are internally different). Those 2 new formats share the same extension as SD-SUP but they are not compatible with it. This means that you can't mux them using SD muxers.

Regarding idx/sub it's much more simple. There is no HD idx/sub format at the moment. The problem is "what do you want to do with this format?". If what you want to do is mux them to mkv or avi to use them in your player, this also means that the player must accept them. At present, the players only accept SD idx/sub subtitles.

Let me try to sum this up:

1°) Converting HD/BD sup files to HD idx/sub means nothing as this format doesn't exist.
2°) Supposing there were a HD idx/sub format, there is no player able to display them so it will be useless.

What could be done is enhancing VobSub so that is can support HD idx/sub format or more simply HD-Sup formats. But this means some developpers with a good knowledge of it spending a lot of time to develop the compatibility with those new HD formats. To my knowledge, nobody works on this at present.

At present, the only possible solution is down-sampling the HD sup files to SD and converting them to the VobSub format and this is what SubtitleCreator does for HD-DVD sup files.

I hope I've made it clear.

Cheers
Manusse

quantum
9th April 2008, 03:55
I hope I've made it clear.

That is very clear. Thanks for the explanation.

frank
9th April 2008, 18:26
I prefer OCR and then conversion to .srt
Time correction is very easy with SupRip.

You can use these subpictures with
- MPC Homecinema (new MPC)
- ffdshow (fast decoder)
- TMPGEnc 4.0 Xpress

without any problems.
And you get high resolution!

quantum
10th April 2008, 13:20
I prefer OCR and then conversion to .srt
Time correction is very easy with SupRip.
SupRip (http://exar.ch/suprip) (not to be confused with Subrip) is a great little tool. It seems to be somewhat under appreciated. I'll bet the similar names cause confusion.

You can use these subpictures with
- MPC Homecinema (new MPC)
- ffdshow (fast decoder)
- TMPGEnc 4.0 Xpress

And Zoom Player if you install DirectVobSub. I'll bet they work in some other players like VLC.

And you get high resolution!
To my understanding, SupRip generates text based subtitles, so they will be rendered by the player at the display's native resolution. This indeed is the best visual quality. In addition, you can change the font and color if your player supports that feature (such as MPC).

I resisted the idea of an OCR based subtitle ripper/generator, but SupRip surprised me with its ease of use. It learns characters, so you only need to correct once. Also, unlike traditional OCR, bitmap characters are digital and identical, so the learning is accurate with only one recognition/correction.

It's a little more work, but I think text based subtitles look significantly better.

SupRip works with subs demuxed from Evodemux also.

saint-francis
10th April 2008, 15:02
Does suprip accurately keep the position of subtitles? For example when they are placed in different places on the screen so as to be close to the character which is speaking. Also some movies have different colored subtitles for different characters when there are multiple people talking close together. Does suprip handle this well? SubtitleCreator does a brilliant job with this, but only for HD DVD. I even got SubtitleCreator to handle these strange blocks of text in Transformers that were some kind of commentary.

Rectal Prolapse
10th April 2008, 16:46
saint-francis: I think the version of suprip I tried didn't position the subtitles - they were not 1920x1080, only placed in a bounding box that ONLY fit the subs.

I could be wrong and there may be an option to render in the video frame.

quantum
10th April 2008, 20:11
Does suprip accurately keep the position of subtitles? ...
I don't know (yet). I did notice it handles italics, such as when two speakers are talking at the same time, one is italic and the other is not. However I did not notice positioning. I will try some experiments to figure this out.

Rectal Prolapse
11th April 2008, 05:09
What could be done is enhancing VobSub so that is can support HD idx/sub format or more simply HD-Sup formats. But this means some developpers with a good knowledge of it spending a lot of time to develop the compatibility with those new HD formats. To my knowledge, nobody works on this at present.


I've been looking at the MPC-HC source code and have been running tests on m2ts files with Haali Media Splitter.

I am now working on adding Blu-ray subpictures into MPC's internal subtitle filter - which is based on VobSub.

It should be easy to add HD-DVD subpicture support, using the decoding routines I wrote for the hdsup2bdn tool I wrote, but I'm targeting blu-ray first.

I hope to have an alpha out within the month.

saint-francis
11th April 2008, 12:10
I hope to have an alpha out within the month.

Do you have any plans to patch VobSub with the code you are developing for MPC?

Rectal Prolapse
11th April 2008, 16:08
Good question - I think it should be possible, as MPC's subtitle code is pretty much a copy of VobSub code.

saint-francis
11th April 2008, 16:12
you rock! After that all we'll need is for VobSub to handle demuxing and converting subtitles from .m2ts like it now does from .VOB. These are exciting times.

hhp
13th April 2008, 01:40
It seems I can work on SUPread again.

What is the most important feature request/bug fix what I have to do first?

Lot of people have sent me character sets, but I've no time to find all the character sets and their coding, so if you want a new character set try to make it based on my instruction written in this thread.

For the 720p BD stream export (I think it is the most wanted feature) I need the same things (abc.png, data.pas but with smaller characters to fit to the smaller screen).

Thank you Scott (from the States) who is the first (and only) user who has donated my work.
In March the downloads of my three tools from pel.hu have reached the hundred thousands number.


srt->sup export is my first most wantted feature let me waiting for a year. Being a Chinese,I hope this tool can export Chinese sup from Chinese srt file, then I can import by tsremux or tsmuxer and play by PS3.
After reading this thread, I cant find the instruction you wrote. Please let me know if I can help you to implement this feature.
If this tool can support Unicode, is this help for solving this problem of different character code?
Anyway, thanks for your great job of developing this program and nice to see you again.:thanks:

Taktaal
13th April 2008, 18:29
@Taktaal

Did you already figure out something regarding the wrong subtitle timecodes when using BD .sup files?

I posted the new version 0.94 today that fixes this problem. Thanks for helping out with the .sup file.

wind1212
14th April 2008, 10:55
srt->sup export is my first most wantted feature let me waiting for a year. Being a Chinese,I hope this tool can export Chinese sup from Chinese srt file, then I can import by tsremux or tsmuxer and play by PS3.
After reading this thread, I cant find the instruction you wrote. Please let me know if I can help you to implement this feature.
If this tool can support Unicode, is this help for solving this problem of different character code?
Anyway, thanks for your great job of developing this program and nice to see you again.:thanks:

I'm a Chinese too.
I hope this tool can export Chinese sup from Chinese srt file, then I can import by tsremux or tsmuxer and play by PS3.

Thanks for your great job Pelican9

azad
15th April 2008, 12:52
I posted the new version 0.94 today that fixes this problem. Thanks for helping out with the .sup file.

Great news! :)
THANK YOU for fixing this problem and developing such a great tool!

laserfan
15th April 2008, 15:59
Great news! :) THANK YOU for fixing this problem and developing such a great tool!Indeed, it is a wonderful tool, and has gotten too little attention around here I think! ;)

Rectal Prolapse
15th April 2008, 16:07
And suprip is also very fast. :)

azad
23rd April 2008, 11:37
I posted the new version 0.94 today that fixes this problem. Thanks for helping out with the .sup file.

Thanks for the update. Now the timecodes seem to be right.

One more thing, the forced subtitle detection for blu-rays doesn't work. If I choose the option button for forced subtitles, all subtitle lines disappear although the subtitle stream definitely contains forced subs.

Taktaal
17th May 2008, 10:08
What movie is it? I'm actually still trying to get a movie with authentic forced subtitles to test this. I've found out that quite a few Bluray movies that include foreign language speech don't have their subtitles set to forced correctly.

azad
19th May 2008, 08:13
I belief it was the EU/German BD of "Perfect Stranger".
I don't have the disc anymore, but I'll try to get it again and check it.

kurt
20th May 2008, 20:52
I'm trying to convert a blu-ray sup file (http://home.arcor.de/kurdt/divers/00001.track_4610.sup) to srt with latest suprip but it gives me just a blank srt file after ocr...

any hints?

instructions doesn't help:

1. Demux the SUP file from the EVO using EVOdemux
2. Start SupRip
3. Load the SUP file with the "Load" button
4. Mouseover the option fields to see help considering their function
5. Either use "Auto-OCR" to automatically scan the whole file and leave any unknown characters alone, or check "Automatically continue" and press "OCR" to get prompted for any unknown characters
6. Go to the SRT tab
7. Review the subtitles and statistics. Change some options there if you want
8. Save the SRT file with the "Save" button


all works 'till
#7: there is nothing :(

btw: th sup has been demuxed with tsmuxer. and doing OCR with supread gives no ouput too ....

laserfan
23rd May 2008, 03:28
I would like to try converting a foreign language 2.40 BD film to Xvid 1280x536, and embed its English subtitles in the re-encoding process, to assure the ST appear on my widescreen projection system i.e. otherwise they fall-off the bottom of the screen. Does anyone here know how to do that, or can suggest a possible method? I can likely extract the PNGs from the ST track and resize them, but I'm not sure where to go with them from there i.e. how to convert from 1920x1080 to 1280x536 and then overlay this onto an Xvid encoding process so it is synchronized with the main feature? Any ideas are welcome!

saint-francis
23rd May 2008, 04:40
I would like to try converting a foreign language 2.40 BD film to Xvid 1280x536, and embed its English subtitles in the re-encoding process, to assure the ST appear on my widescreen projection system i.e. otherwise they fall-off the bottom of the screen. Does anyone here know how to do that, or can suggest a possible method? I can likely extract the PNGs from the ST track and resize them, but I'm not sure where to go with them from there i.e. how to convert from 1920x1080 to 1280x536 and then overlay this onto an Xvid encoding process so it is synchronized with the main feature? Any ideas are welcome!

Easy! Convert to HD DVD .SUP with supread-> convert to vobsub format with subtitlecreator -> use vsfilter to hardcode it to your movie.
You are talking about hardcoding the subtitles, right?

laserfan
23rd May 2008, 13:50
Easy! Convert to HD DVD .SUP with supread-> convert to vobsub format with subtitlecreator -> use vsfilter to hardcode it to your movie.
You are talking about hardcoding the subtitles, right?Yes, I wanna hardcode the subs into the frames. But how to get an HD .sup into SubtitleCreator? I don't know which menu option in SC is used to import a .sup file? :o

saint-francis
23rd May 2008, 15:17
But how to get an HD .sup into SubtitleCreator?

Tools -> Manipulate Sup or VobSub File -> Open sub. It converts the HD DVD .SUP to SD on the fly. From there just save it as VobSub format.

laserfan
23rd May 2008, 16:10
Tools -> Manipulate Sup or VobSub File -> Open sub. It converts the HD DVD .SUP to SD on the fly. From there just save it as VobSub format.Although I'm sure I've tried that several times in the past, it's never worked for me. Maybe I was trying to open corrupt sups, or maybe if it's converting "on the fly" I didn't wait for it to complete.

In any case you've given me the direction I needed and I appreciate it very much! Thanks! :)

EDIT: Oh, my--I was missing Step 1 "Convert to HD sup"! It works! You're a saint SF! ;)

EuropeanMan
26th May 2008, 01:10
ok, can someone PLEASE tell me HOW i can rip subtitles from a blu-ray disc?

i've ripped the files onto my hard-drive...do i then DEMUX the m2ts completely? because the only thing i need from the bluray disc are subs...nothing else, not video nor audio...thanks.

saint-francis
26th May 2008, 01:19
Personally I use TsMuxeR to demux the subtitles. You need to manually add the individual .m2ts files if there is seamless branching. Hopefully eac3to will support BD subtitle demuxing in the near future.

EuropeanMan
26th May 2008, 01:37
i've got it to .sup i believe...thanks for that.

i''ll try to experiment to get it to .srt format somehow

EuropeanMan
26th May 2008, 02:51
crap...why is it when i use supread.exe that when it gets converted to .srt i only see "line 1" etc etc...? where are the actual subtitles?

laserfan
26th May 2008, 16:35
You forgot maybe to click the "OCR All" button first!?

BTW another tool which (when it works) is very nice for OCR is SupRip. Don't forget to save as srt before closing! ;)

kurt
27th May 2008, 21:19
I'm trying to convert a blu-ray sup file (http://home.arcor.de/kurdt/divers/00001.track_4610.sup) to srt with latest suprip but it gives me just a blank srt file after ocr...

any hints?

instructions doesn't help:



all works 'till
#7: there is nothing :(

btw: th sup has been demuxed with tsmuxer. and doing OCR with supread gives no ouput too ....
strange... the same file is actually working on 2 other computers - no problems with converting to srt. But not at this computer. I'm using exactly the same suprip version and deleted to be sure the default.font.txt (name\anwendungsdaten\suprip\)... somehow the srt can't be created - its empty, no lines at all...

any ideas whats going wrong?

XP prof (same as the other one)
SP3 (")

asarian
4th June 2008, 11:24
Well, I used SUPread to create a series of png images, but that's where i'm lost. I want to hardcode the subs into an AVC/H.264 stream. And while this forum is replete with guides on how to do this for DVD, I can't seem to find any way to do this with HD material.

Could someone maybe clue me in a bit? :)

Thanks.

MatMaul
4th June 2008, 13:24
I am now working on adding Blu-ray subpictures into MPC's internal subtitle filter - which is based on VobSub.

It should be easy to add HD-DVD subpicture support, using the decoding routines I wrote for the hdsup2bdn tool I wrote, but I'm targeting blu-ray first.

I hope to have an alpha out within the month.
Any news ? :)

asarian
5th June 2008, 10:01
You forgot maybe to click the "OCR All" button first!?

BTW another tool which (when it works) is very nice for OCR is SupRip. Don't forget to save as srt before closing! ;)

Well, not to be rude, but SUPRIP (0.95) sure is a huge disappointment. Out of the 864 lines processed, it managed to have errors in 864 of them! In fact, its ability to OCR subtitles is limited to recognizing about 1 or 2 letters per line! (see attached image). That makes it, no offence, totally and utterly useless. Unless I completely misunderstood what it's supposed to be doing... but I doubt that.

asarian
5th June 2008, 13:28
i've got it to .sup i believe...thanks for that.

i''ll try to experiment to get it to .srt format somehow

I keep wondering why all this convoluted OCR-ing is necessary to begin with. Has anyone ever thought of just superimposing the graphics in the .sup file directly onto the stream you're trying to hardcode the subs in? Wouldn't that be much cleaner?

manusse
5th June 2008, 16:09
Hi,

Has anyone ever thought of just superimposing the graphics in the .sup file directly

Oh, what a great idea! I'm just kidding. Don't take the other people here for idiots, please. Many people have been in the subtitle stuff for years and that's thanks to them that we can do all those stuffs, ripping, incrusting, overlaying, inserting to DVDs, Ocring...

If some users want to OCR, that's that they have a good reason for it and there are many reason possible for that. Now what is your question anyhow? Ask it politely and you may get an answer.

I don't want to be rude too but the way you write looks a bit aggressive to me.

Cheers
Manusse

laserfan
5th June 2008, 18:23
Well, not to be rude, but SUPRIP (0.95) sure is a huge disappointment.Hey, I didn't write it! :p

I have used SupRip (by Taktaal) a few times, and either it didn't work at all (crashed on opening the .sup) or it worked beautifully--great UI I think. Your mileage obviously varied! ;)

Maybe it has something to do with the rip tool you used to extract that particular subtitle. In any case unfortunately there is not a separate thread for SupRip so reporting issues is not easy AFAICT.

asarian
5th June 2008, 18:25
Hi,

Oh, what a great idea! I'm just kidding. Don't take the other people here for idiots, please.

And don't take my sarcasm too literal either, please.

Many people have been in the subtitle stuff for years and that's thanks to them that we can do all those stuffs, ripping, incrusting, overlaying, inserting to DVDs, Ocring...

If some users want to OCR, that's that they have a good reason for it and there are many reason possible for that. Now what is your question anyhow? Ask it politely and you may get an answer.

I don't want to be rude too but the way you write looks a bit aggressive to me.

More like frustrated. :) I have a perfectly good set of images (from the .sup file); and then I learn that I'm to OCR them, and feed em back as .srt file, to be rendered again as part of the stream; only to find out that suprip can't recognize 99% of all letters -- making the whole process unusable. So, yes, at that point I was experiencing some frustration over the need to go the OCR route to begin with. And wondering, indeed, why the images inside the .sup file can't be used for rendering in the first place. And a bit surprised to learn that, apparently, this has not been done yet.

So, my question is this: isn't there a program out there that can simply accomplish the task of 'superimposing' the images from a .sup file over an AVC stream?

Still, my apologies for my earlier tone. I can see how it didn't come off well.

asarian
5th June 2008, 18:33
Hey, I didn't write it! :p

I have used SupRip (by Taktaal) a few times, and either it didn't work at all (crashed on opening the .sup) or it worked beautifully--great UI I think. Your mileage obviously varied! ;)

Maybe it has something to do with the rip tool you used to extract that particular subtitle. In any case unfortunately there is not a separate thread for SupRip so reporting issues is not easy AFAICT.

I ripped em with the latest tsMuxeR, and suprip reads it in just fine; and even seems to recognize all the letters:

http://img372.imageshack.us/img372/1458/labyrinthfu3.th.jpg (http://img372.imageshack.us/my.php?image=labyrinthfu3.jpg)

As you could probably tell, this sort of error-rate left me a mite frustrated. :)

manusse
5th June 2008, 21:32
Hi,

Just have a look here (http://forum.doom9.org/showpost.php?p=1141003&postcount=217) to convert your Blu-Ray sups to VobSub (sub/idx). Note that this process will degrade a bit your subtitles because VobSub is a SD (not HD) format that uses 3 colors per subpic. Currently there is no means to directly display HD SUP subtitles over the video because this format is very recent.

VobSub subtitles can then be superimposed on the video with MPC for example (KMP also).

Cheers
Manusse

EDIT: Also what you can try is : Convert your BD-Sup to HD-DVD-Sup. Open this HD-DVD Sup with SubtitleCreator. Save is as Sup (not VobSub this case), then open it with DVDSubEdit and try the automatic OCR. It may work although the HD->SD converting process degrades the bitmaps. If it's working then you'll get a nice srt file that when rendered will be smoother than the converted VobSub file. But if it doesn't work well (bad OCR recognition), then the VobSub way is the easiest way.

asarian
5th June 2008, 22:12
Hi,

Just have a look here (http://forum.doom9.org/showpost.php?p=1141003&postcount=217) to convert your Blu-Ray sups to VobSub (sub/idx). Note that this process will degrade a bit your subtitles because VobSub is a SD (not HD) format that uses 3 colors per subpic. Currently there is no means to directly display HD SUP subtitles over the video because this format is very recent.

VobSub subtitles can then be superimposed on the video with MPC for example (KMP also).

Cheers
Manusse
Well, that's a good start! :) Thanks!

EDIT: I don't mind a minor degradation in font-quality (though the Bluray font looks pretty slick). But at least this way I won't have to manually edit 2000+ lines in an OCR-ed .srt file. :)

laserfan
6th June 2008, 00:45
I ripped em with the latest tsMuxeR, and suprip reads it in just fine; and even seems to recognize all the letters...Actually, no asarian--it's showing you the Bitmap SupRip is looking-at, and that it's not recognizing MOST of the letters! The Red outline means "not OCRing" and the Green means, "good". I don't know what is happening, it does look very bad, but if you want to play some more with this you should try adjusting the Options lower left. Just change the numbers, click "Apply", and then click OCR again until it starts working! If you get lost, click Defaults to start over.

I don't have the BD disc, but the HD-DVD interestingly has a different # of subs--also note "The civil war is over" is capitalized differently! Look too at my different settings--I used 0.93, and only had to "train" about a dozen letters or so. Yeah I couldn't help myself, just did this again:

http://img78.imageshack.us/img78/4744/pansbr9.th.jpg (http://img78.imageshack.us/my.php?image=pansbr9.jpg)

asarian
6th June 2008, 09:43
Thanks. :)

Yeah, that's what I meant: it 'seems' to recognize the characters (at least it boxes them correctly), but then fails to OCR them properly, after all. Ay any rate, you're new settings look very encouraging. :) Guess it couldn't handle their width (which still *does* surprise me, as, like I said, from the way it boxes them, it seems to grasp their dimensions pretty well).

For this movie (Pan's Labyrinth, as you astutely figured out), yesterday I found a ready-made .srt subtitle-set at divxtitels.com; but, needless to say, that's just a stop-gap, because eventually I'll run into a BD, like a director's cut or some such, that differs from the DVD. So, your methods, and that of manusse, have proven vital to my understanding of which route to take when dealing with BD .sup files!

So, thanks be to you all!

ArcticFox
25th June 2008, 13:35
Anyone know how to get in contact with the author of SupRip, i have a subtitle from Metal Gear Solid 4 Documentary blu-ray that it cant read properly, its only showing 1 out of 1 subtitles, there are supposed to be 568.

Subtitles (http://www.mbryce.co.uk/eng.sup)

ArcticFox
25th June 2008, 15:21
Thanks. :)

Yeah, that's what I meant: it 'seems' to recognize the characters (at least it boxes them correctly), but then fails to OCR them properly, after all. Ay any rate, you're new settings look very encouraging. :) Guess it couldn't handle their width (which still *does* surprise me, as, like I said, from the way it boxes them, it seems to grasp their dimensions pretty well).

For this movie (Pan's Labyrinth, as you astutely figured out), yesterday I found a ready-made .srt subtitle-set at divxtitels.com; but, needless to say, that's just a stop-gap, because eventually I'll run into a BD, like a director's cut or some such, that differs from the DVD. So, your methods, and that of manusse, have proven vital to my understanding of which route to take when dealing with BD .sup files!

So, thanks be to you all!
Am i missing something?

Why dont you manually enter the letters yourself?

Load the SUP, click automatically continue with the next Subtitle, then click OCR, a letter will popup at the bottom thats not recognised, enter it into the field next to it and press enter and it will move onto the next letter.

Just keep going and eventually it will automatically recognise everything and process the rest of the SUP file, it saves this into a file so the next time you load a SUP it will be more efficient at OCR.

MatMaul
3rd July 2008, 14:39
I am now working on adding Blu-ray subpictures into MPC's internal subtitle filter - which is based on VobSub.

It should be easy to add HD-DVD subpicture support, using the decoding routines I wrote for the hdsup2bdn tool I wrote, but I'm targeting blu-ray first.

I hope to have an alpha out within the month.
Up !
even if it is not finished we would be happy to have the current code and some docs to try to finish it.

Thanks !

jamos
4th July 2008, 14:58
And don't take my sarcasm too literal either, please.


So, my question is this: isn't there a program out there that can simply accomplish the task of 'superimposing' the images from a .sup file over an AVC stream?




Yes, Scenarist does this but its not free.

Taktaal
7th July 2008, 00:20
Anyone know how to get in contact with the author of SupRip, i have a subtitle from Metal Gear Solid 4 Documentary blu-ray that it cant read properly, its only showing 1 out of 1 subtitles, there are supposed to be 568.

Subtitles (http://www.mbryce.co.uk/eng.sup)

It seems that this movie uses some feature I haven't yet seen where it defines subtitle coordinates twice. I started working on it, it should probably be fixed this week.

azad
7th July 2008, 11:55
@Taktaal
Good to see you're still working on suprip! :)
Some time ago you were searching for BD sups containing real forced subtitles. Do you still need an example?

I found one on a Region B Sony BD and could upload a sample.

Taktaal
7th July 2008, 18:43
Oh yes please it's so hard to find a sample that works.

azad
7th July 2008, 19:26
Okay, here it is:
http://rapidshare.com/files/127926810/00032.track_4611.sup.html

The first 5 subtitles in this sup file are forced.
Good luck! ;)

azad
10th July 2008, 19:41
@Taktaal

I got a BD sup file that is 195MB, suprip won't load it, because its larger than 100MB. Is this a bug?

Taktaal
13th July 2008, 23:09
I thought 100mb was a safe bet for maximum reasonable file size. I upped it to 1gb now.

Also, that movie you linked up there seems to have actually marked its forced subtitles, so I got it working in the new version.

Anyone know how to get in contact with the author of SupRip, i have a subtitle from Metal Gear Solid 4 Documentary blu-ray that it cant read properly, its only showing 1 out of 1 subtitles, there are supposed to be 568.

Subtitles (http://www.mbryce.co.uk/eng.sup)

It's working better now, but still not perfectly. As far as I understand, that movie has in some places two subtitles displayed at the same time (maybe one on top, the other on the bottom?) Is this correct?

I think this should happen from 0:00:09 to 0:00:17 and 0:02:18 to 0:02:22 if I understand the display codes correctly.

azad
14th July 2008, 20:26
@Taktaal

Thanks for the update and keep up the good work! :)

The forced subtitle detection works perfectly now for this movie.

Here is a link to another sup file where the end times are not correct, respectively suprip detects the same line again and again just changing the starttime of the subtitle and leaving the endtime at 00:00:00,000 as you can see in the example below:
http://rapidshare.com/files/129696705/00005.track_4611.sup.html

1
00:00:00,194 --> 00:00:00,319
Line 1

2
00:00:22,216 --> 00:00:00,000
Line 2

3
00:00:22,299 --> 00:00:00,000
Line 3

4
00:00:22,383 --> 00:00:00,000
Line 4

5
00:00:22,466 --> 00:00:00,000
Line 5

6
00:00:22,550 --> 00:00:00,000
Line 6

azad
15th July 2008, 20:46
@Taktaal
Good news, the Forced Subtitle detection works also perfectly for another Sony BD. :)

Since the Forced Subtitle detection seem to work, at least for Sony BD's, would it be possible to add a feature to just OCR the Forced Subtitles? That would save a lot of work, because in most cases I just want to get the Forced Subtitles out of the sup file.

azad
16th July 2008, 15:44
Here's another one, most of the subtitle lines end up with 00:00:00,000.

http://rapidshare.com/files/130135131/forced.sup.html


21
00:11:25,851 --> 00:00:00,000
Line 21

22
00:11:26,852 --> 00:00:00,000
Line 22

23
00:11:27,853 --> 00:00:00,000
Line 23

24
00:11:28,854 --> 00:11:29,980
Line 24

25
00:11:30,189 --> 00:00:00,000
Line 25

26
00:11:31,190 --> 00:00:00,000
Line 26

27
00:11:32,191 --> 00:11:33,359
Line 27

SpaceAgeHero
31st July 2008, 08:43
Taktaal,

I've got a problem with the german subtitles of Independence Day Blu-ray.
SupRip keeps telling me that:

************** Ausnahmetext **************
System.Exception: Eine Ausnahme vom Typ SupRip.SubtitleImage+EndOfImageReachedException wurde ausgelöst.

bei SupRip.SubtitleImage.ColumnContainsPixels(Byte[,] image, Int32 column, Int32 limit, Int32 y1, Int32 y2)
bei SupRip.SubtitleImage.FindLetters()
bei SupRip.SubtitleImage.CreateSubtitleArray()
bei SupRip.SubtitleFile.GetSubtitleImage(Int32 n)
bei SupRip.MainForm.LoadSubtitleImage(Int32 number)
bei SupRip.MainForm.LoadSubtitleImage(Int32 number)
bei SupRip.MainForm.LoadSubtitleFile(String fileName)
bei SupRip.MainForm.loadButton_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Sup files have been uploaded to here if you'd like to investigate.

http://rapidshare.de/files/40125119/independence.day.german.rar.html

Furthermore, in which character code does SupRip save SRT files? I'm asking this because in the end umlaut characters aren't displayed correctly.
"Ä" is displayed as "├ä" - "Ü" is displayed as "├£" and so on.

Hoping for a new release soon. :D Thanks. :)

Taktaal
2nd August 2008, 19:06
I fixed all of the above problems with the new version 1.00

Furthermore, in which character code does SupRip save SRT files? I'm asking this because in the end umlaut characters aren't displayed correctly.
"Ä" is displayed as "├ä" - "Ü" is displayed as "├£" and so on.

Suprip saves umlauts in Unicode. I tested them with both Mplayerc and VLC, and both those applications seem to properly support extended Unicode letters so I thought they'd be ok. With what mediaplayer did you try to play your movie so that you got the erroneous display?

laserfan
2nd August 2008, 21:48
I fixed all of the above problems with the new version 1.00Thank you Taktaal for your very nice app!!!

:thanks:

GZZ
2nd August 2008, 22:02
Is there any way to have a function to save the sup file at a lower resolution. Lets say you load a 1920x1080 subtitle file and if its possible then output it as 1280x720. Then I dont have to do bluray subs -> SRT -> Bluray Subs.

SpaceAgeHero
2nd August 2008, 23:01
@ Taktaal,

first off - thanks for the new version. :)
SupRip recognizes the subtitles now.

Unicode with srt's seems to be problematic for me however. I just used your latest version to convert Independence Day German subtitles and muxed them into the mkv. Umlauts are still not displayed correct with the latest MPC (included in latest K-Lite Codec Pack). I just attached an image of what's supposed to read "NÖRDLICHE WÜSTE - IRAQ" and what it actually looks like in MPC.

Because of this problem I used to resave the srt files into ANSI code. Everything works fine with ANSI.

Many thanks again however for this nice app. :)

Edit: When I open a srt file saved by SupRip with a texteditor it shows me that it is in UTF-8 Format. :confused:

Adub
7th August 2008, 20:18
UTF-8 is fast becoming the standard, so that should not be an issue.

One issue is that you should never use codec packs. All you need is ffdshow and the latest build of Media Player Classic Homecinema (run a google search).

Uninstall that codec pack of yours, download and install the latest ffdshow, and download the latest version of Media Player Classic Homecinema. Set the output to VMR9 in the options menu, select the subtitles you want, and everything should play fine. This is of course assuming that your subtitle was ripped correctly.

azad
9th August 2008, 20:45
@Taktaal

Version 1.00 works great!
Thanks again for all the hard work you put into this tool.


I just tested the BD Forced Subtitle detection with another Region B disc, this time no Sony BD, and it worked perfectly! ;)

Kurtnoise
10th August 2008, 10:12
@Taktaal: here is (http://www.mediafire.com/?bjq4j9jkzuq) a HDSUP file which isn't supported by SupRip...Hoping you'll find the problem. :)

boombastic
17th August 2008, 13:00
Hell oto everyone.
First of all let me thank you for your work.
I'm going to backup my Pathfinder bluray disc (region 2,Italy).
There are a lot of subtitle.
Can i just extract the subtitle with "xport -hu movie.m2ts 1 1 1 1" and mux them into the mkv?How can i determine whic subtitle is the italian one and if is forced or not?
Thanks in advance!

saint-francis
17th August 2008, 15:06
First off, use eac3to to demux the subtitles. Second, you can just mux them into a .mkv but you will be hard pressed to play them since neither vobsub or MPC can decode them. So you need to convert them to some kind of format that you can play.

boombastic
17th August 2008, 15:24
First off, use eac3to to demux the subtitles. Second, you can just mux them into a .mkv but you will be hard pressed to play them since neither vobsub or MPC can decode them. So you need to convert them to some kind of format that you can play.

This is the log of eac3to for the title containing the main movie:

"C:\Programmi\eac3to\eac3to.exe" "D:\Pathfinde
r\PATHFINDER_F1" 1)
M2TS, 1 video track, 6 audio tracks, 1:47:11
1: Chapters, 25 chapters
2: MPEG2, 1080p24 /1.001 (16:9)
3: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz
4: DTS, Italian, 5.1 channels, 24 bits, 768kbit/s, 48khz
5: DTS, German, 5.1 channels, 24 bits, 768kbit/s, 48khz
6: AC3, Polish, 2.0 channels, 224kbit/s, 48khz, dialnorm: -27dB
7: AC3, English, 2.0 channels, 224kbit/s, 48khz, dialnorm: -27dB
8: AC3, German, 2.0 channels, 224kbit/s, 48khz, dialnorm: -27dB


which stream should i extract for the subtitle?To which format should i convert them to play in MPC?

azad
17th August 2008, 19:57
@boombastic

There doesn't seem to be a subtitle stream on this BD. But actually I can't believe this. So what eact3o version do you use? Try the latest version, this should recognize all subtitle streams.

All BD subtitles are shown like this in eact3to: 0...99: Subtitle (PGS), language

boombastic
17th August 2008, 22:36
@boombastic

There doesn't seem to be a subtitle stream on this BD. But actually I can't believe this. So what eact3o version do you use? Try the latest version, this should recognize all subtitle streams.

All BD subtitles are shown like this in eact3to: 0...99: Subtitle (PGS), language

I re-download and used the last version of eac3to but i obtain the same output....it's very strange.Maybe there's a switch or a particolar option to use?

I succesfully extract a .sup file with the last version of xport

xport -hu movie.m2ts 1 1 1 1

but if i open it with suprip there's only the english subtitle....

SpaceAgeHero
17th August 2008, 23:13
I re-download and used the last version of eac3to but i obtain the same output....it's very strange.Maybe there's a switch or a particolar option to use?

I succesfully extract a .sup file with the last version of xport

xport -hu movie.m2ts 1 1 1 1

but if i open it with suprip there's only the english subtitle....

Hhm, you better report that problem to madshi in the official eac3to thread then.

azad
18th August 2008, 08:30
@boombastic
Try using tsmuxer to check the appropriate m2ts file for subtitle streams.

I succesfully extract a .sup file with the last version of xport

xport -hu movie.m2ts 1 1 1 1

but if i open it with suprip there's only the english subtitle....
You have to choose the right subtitle stream number.

xport -hu movie.m2ts 1 1 1 1

This command line extracts the 1st subtitle of the m2ts file. To extract the italian subs you have to know the right stream number. Like mentioned before, try using tsmuxer or powerdvd (if eac3to doesn't work) to find out the right stream number.

boombastic
18th August 2008, 17:29
Finally i found that tsmuxer can show me the correct lan guage for each subtitle and save it to a .sup file. Then i load it with Suprip to ocr it and merge it to audio and video with mkvmerge.
The only thing that doesn't work is the distinction of fored sutitle:TsMuxer cannot tell me which one is a forced one;ifi load into suprip the smaller sized one (which is truly the forced one) and flag the option "Forced subtitle only" no line is processed.
Anyway finally all went ok!Thanks for your help!!!

azad
18th August 2008, 18:40
The only thing that doesn't work is the distinction of fored sutitle:TsMuxer cannot tell me which one is a forced one;ifi load into suprip the smaller sized one (which is truly the forced one) and flag the option "Forced subtitle only" no line is processed.

In most cases on BD "forced subtitles" are only a separate subtitle stream and not real forced subtitles as you know it from dvd. Only real forced subtitles are detected by suprip's "Forced Subtitle" function.

Adub
25th August 2008, 19:00
There's a new version of Suprip available. It fixes a bug when displaying Unicode characters.

BZeeme
31st August 2008, 09:21
Could someone give me a brief outline of how to use SUPread to convert .sup to .srt? I've been using SupRip but lately had to do a lot of editing of the resultant .srt in Word (it has problems with , and ' and also leaves some unicode in the output .srt).

BZee

nautilus7
31st August 2008, 10:13
Use SupRip instead. It's better.

dEATHfLOWEr
31st August 2008, 10:21
I read the whole threat and can't seem to find de definitive answer. Is there a way to export a BD/HDDVD .sup to BMP's with a .srt file reffering to the BMP's? Because I find the .sup> OCR > .srt checking in Notepad (because all the L's are I and C's are O's etc) > muxing back to bitmaps with MNToolnix to make a MKV with embedded subs quite a hassle.

I actually want to keep the subtitle resolution because I just want to make a MKV file from a BD or HDDVD disc while maintaining the 1920x1080 video resolution.

XhmikosR
31st August 2008, 11:26
You can just export the original .sup file with eac3to or with any tool you like, and then play the mkv with MPC-HC which now supports playback of .sup subtitles. It needs some fixes though, but you can save a lot of time.

nautilus7
31st August 2008, 12:21
XhmikosR are you sure about this? Can mpc-hc play matroska with external sup subtitles? I didn't manage to do it.

XhmikosR
31st August 2008, 12:48
Not external .sup files. Just mux the subs with the video and then you can play the mkv with the .sup in it.

nautilus7
31st August 2008, 13:14
I can't mux .sup with mkvmerge. It won't accept sup format.

XhmikosR
31st August 2008, 14:20
Oh, yes my fault. I thought I muxed it first to mkv but no. Only if you play the m2ts allows you to watch the .sup with MPC-HC.

rica
31st August 2008, 15:24
I read the whole threat and can't seem to find de definitive answer. Is there a way to export a BD/HDDVD .sup to BMP's with a .srt file reffering to the BMP's? Because I find the .sup> OCR > .srt checking in Notepad (because all the L's are I and C's are O's etc) > muxing back to bitmaps with MNToolnix to make a MKV with embedded subs quite a hassle.

I actually want to keep the subtitle resolution because I just want to make a MKV file from a BD or HDDVD disc while maintaining the 1920x1080 video resolution.

The best way i think:

Extract sup with eac3to.

Convert to srt via SupRip's latest version. (thanks XhmikosR btw) _you have to teach the program at the beginning but don't worry it seems difficult but it is much easier than you think.

Remux to mkv with mkvmergegui or

Remux just video and audio and make an m2ts or ts with TSMuxer and put it into the same folder where srt is located and rename *.ts/m2ts and *.srt with the same name. Like test.ts and test.srt
(You can not mux srt by TSMuxer since it converts srt back to PGS.)

Watch them on MPC-HC with or without DXVA mode... (for Vista EVR Custom Presenter, for XP VMR9 (renderless) has to be selected.)


_ _ _ _ _

dEATHfLOWEr
31st August 2008, 18:32
The best way i think:

Extract sup with eac3to.

Convert to srt via SupRip's latest version. (thanks XhmikosR btw) _you have to teach the program at the beginning but don't worry it seems difficult but it is much easier than you think.
_ _ _ _ _

Well that is the problem. I want to leave out OCRing, as it takes to much time correcting all the bad guesses (with the change of leaving some errors in, which are unnoticed till you play the movie).

With DVD's it is possible with Subrip (not to be confused with SupRip) to save all the bitmaps together with an SRT file which pointed to these bitmaps. That way you could skip the OCR part and retain the original subs and quality.

rica
31st August 2008, 21:31
I'm afraid that is the only toy we have in our hands for the time being :)

BZeeme
1st September 2008, 09:59
Use SupRip instead. It's better.

That's what I have been using. I got it working better now. I had to drop the similarity tolerance from the default 50 to 15. Now I have to do more entry of unrecognized characters but the resultant .srt is much better. I then use find and replace in MS Word to make corrections.

Taktaal
1st September 2008, 20:31
The recent versions are much better than the earlier ones at distinguishing between I and l. However, in fonts where the two are completely equal this doesn't help much of course. I've been working on a system that integrates some dictionary work for deciding between those two letters, but that code doesn't work really well yet, so I haven't put it into the release versions. In retrospect, it would probably be easier to just build a time machine and kill the dumbass who had the idea of making two letters look exactly the same.

azad
2nd September 2008, 17:47
In retrospect, it would probably be easier to just build a time machine and kill the dumbass who had the idea of making two letters look exactly the same.
:D Great! Thanks for this one! And I agree of course! :)

Zwitterion
20th September 2008, 16:31
The best method I found was to use ABBYY's FineReader 8.0 program. Tell Supread to output BMPs, then use ABBYY's FineReader for OCR.
I use this method, works like a charm. However, I found one subtitle stream which doesn't work with SUPread. It opens, but displays just black screens instead of subtitles. The stream is from the American version of Sunshine (SUP sample (http://www.mediafire.com/?3qxxeslght1)).

Suprip displays the subtitles, but unfortunately can't save them as bitmaps (yet?). Having that feature would be great.

Could anyone try with an older version of SUPread whether it can read the sample? I can't find them on the net...

Jaja1
22nd September 2008, 12:05
Could anyone try with an older version of SUPread whether it can read the sample?
None of the versions of supread I have were able to read the sample. I do encounters lots of sup files that can't be read by supread, while suprip is able to read them. So it would be nice if suprip could save subtitles to bitmaps or another image format.

Originally Posted by Rectal Prolapse
The best method I found was to use ABBYY's FineReader 8.0 program. Tell Supread to output BMPs, then use ABBYY's FineReader for OCR.How do you convert then the txt output of Finereader to srt or whatever subtitle format? The output of Finereader is just a flat txtfile.

B4tm4n
22nd September 2008, 12:10
How do you convert then the txt output of Finereader to srt or whatever subtitle format? The output of Finereader is just a flat txtfile.

AFAIK srt is just a text file with the srt extention.

Zwitterion
22nd September 2008, 12:42
How do you convert then the txt output of Finereader to srt or whatever subtitle format? The output of Finereader is just a flat txtfile.

I use Rectal Prolapses tool SRTmaker to merge an SRT with Finereaders HTML output.
http://forum.doom9.org/showpost.php?p=1050444&postcount=227
http://forum.doom9.org/showpost.php?p=1050444&postcount=228

I haven't needed the Photoshop step until now. The whole procedure usually works like a charm. I have to open the resulting SRT with a Word processor and then save it again with "insert line breaks" checked, because otherwise I'd have a problem with disappearing line breaks in Notepad.

I really hope Suprip will support saving subtitles as images. :)

Jaja1
24th September 2008, 10:36
Awesome!

One not so minor detail though :)
I don't know s*t about Visual Studio. Is SRTMaker a tool that needs to be compiled first, since I don't see an executable?

Zwitterion
24th September 2008, 11:48
The executable was here:
http://forum.doom9.org/showpost.php?p=1056641&postcount=254

asarian
24th September 2008, 12:39
Well that is the problem. I want to leave out OCRing, as it takes to much time correcting all the bad guesses (with the change of leaving some errors in, which are unnoticed till you play the movie).

With DVD's it is possible with Subrip (not to be confused with SupRip) to save all the bitmaps together with an SRT file which pointed to these bitmaps. That way you could skip the OCR part and retain the original subs and quality.
I wonder if someone ever came to the idea of using the .bmp's from a .sup file and kinda use them as a transparent layer to superimpose over an existing stream? This OCR'ing seems hopelessly the wrong way.

Jaja1
25th September 2008, 12:13
Thanks Zwitterion for the help. And lots of thanks to Rectal Prolapse for creating this tool.

cavediver
14th October 2008, 00:36
I extracted the 1st English PGS stream from Apocalypto BD AnyDVD HD rip with tsMuxer then loaded the .sup file into Suprip (v. 1.01), and pressed Auto-OCR. Suprip didn't correctly ocr the file. The SRT tab indicates under "statistics" that all 448 subtitles contain errors and 0 were correctly OCR'd. Any suggestions for how I might get this to work?

azad
14th October 2008, 19:52
@cavediver
Don't use the Auto-OCR option, because Suprip won't ask for letters it can't recognize correctly, instead it just chooses a letter which it thinks might be the best choice. Thats the cause for all the errors you get.

Use the OCR option + "Automatically continue ...", then Suprip will ask you for every letter which can't be recognized and it will start to "learn" recognizing the letters you manually entered.

cavediver
16th October 2008, 03:53
@cavediver
Don't use the Auto-OCR option, because Suprip won't ask for letters it can't recognize correctly, instead it just chooses a letter which it thinks might be the best choice. Thats the cause for all the errors you get.

Use the OCR option + "Automatically continue ...", then Suprip will ask you for every letter which can't be recognized and it will start to "learn" recognizing the letters you manually entered.

Thanks. That worked.

revy
18th October 2008, 23:49
I thought 100mb was a safe bet for maximum reasonable file size. I upped it to 1gb now.

Also, that movie you linked up there seems to have actually marked its forced subtitles, so I got it working in the new version.



It's working better now, but still not perfectly. As far as I understand, that movie has in some places two subtitles displayed at the same time (maybe one on top, the other on the bottom?) Is this correct?

I think this should happen from 0:00:09 to 0:00:17 and 0:02:18 to 0:02:22 if I understand the display codes correctly.

I'm currently ripping this and yes, on the top it says the name and job of the person who is talking, on the bottom is the talk.

In the last version SupRip misses every talk when one of those top frames appears. And in some cases the top frames aren't correctly ripped. ( only half of the text appears )

And the program doesn't detect italic phrases it seems.

GZZ
9th November 2008, 19:26
The subpicture stream consists of data inside sections. Each section begins with an identifier byte, followed by a 16 bit integer that contains the length of the data, followed by the data itself.

Identifiers, order of presentation found in typical subtitle stream:

16 00 13 07 80 04 38 40 00 01 00 00 00 01 00 00 00 00 00 00 00 00

16 = identifier
00 13 = size of section
07 80 04 38 = 1920x1080.
01 = do not clear. If set to 00 instead it will clear the subpicture!

40 00 01 00 = sequence number??

00 = if set to 40 instead of 00 the next subtitle will be forced on.



Did anyone find out what the last 15 byte (marked with bold) is, I'm trying to stick together som documentation and I cant figure these bytes out ??

Taktaal
17th November 2008, 02:45
16 00 13 07 80 04 38 40 00 01 00 00 00 01 00 00 00 00 00 00 00 00

16 = identifier of a metainformation section
00 13 = length of the data in this section
07 80 = width
04 38 = height
40 00 01 00 00 00 = unknown
01 = number of subtitles in this frame
00 00 00 00 00 00 00 00 = metadata about one subtitle

Most sections of type 16 are 19 bytes long, those are the ones where only one subtitle is on the screen at any one time. Some of them are longer though, 27 bytes if there are two subtitles at once. Maybe it's also possible to have three on screen, but I haven't seen this yet in a movie. The "number of subtitles in this frame" value also goes up if there are more subtitles than one.

What bytes 1 to 3 do in the metadata, I don't know
The fourth byte is the most interesting one. If the subtitle is forced, the bit 64 (on Intel processors) is set.
The last four bytes are used only by some subtitles to place the text on the screen. It just defines the x and y coordinate of the top left corner of where the bitmap should be placed. Most Bluray movies however store their subtitles as full 1920x1080 bitmaps and just lay that over the movie, using 100% transparent pixels on most of the image.

happyprozak
20th November 2008, 03:35
Hi Taktaal,

I tried using Suprip 1.01 for Pirates of the Caribbean 1 and 2 on blu-ray and Suprip displays the text but it has a problem putting boxes around the letters. I played with the settings for width etc. and I couldn't get suprip to put boxes around the letters properly. Is this a known issue? Or maybe theres something in these subtitles that is throwing off your program?

I'd be glad to send you the subtitles. I don't know where I could upload them but I'd be glad to email them to you.

Taktaal
20th November 2008, 19:40
I know that the current letter boxing algorithm isn't very good. I'm currently working on a completely new one.

GZZ
23rd November 2008, 20:29
Thanks TakTaal for the information. Still a bit confussed on the Metadata part, gonna look into that.

But I have a little gap left in my code, that I dont know what is (I have marked it with red). If you know, please explain it.

PG FOUND
PTS StartTime: 00:00:36,119
DTS StartTime: 00:00:36,055

PCS: (0000000A)
Identifier: 22 (0x16)
EndOfSection: 32
Resolution: 1920 x 1080
Subtitle in this frame: 1
Metadata: 00 00 00 00 00 00 03 8C

PG FOUND
PTS StartTime2?: 00:00:36,118
DTS StartTime2?: 00:00:36,055

WDS0: (0000002A)
Identifier: 23 (0x17)
EndOfSection: 65
Resolution: 1920 x 117
Position: 0 x 908
Unknown ?: 50 47 00 31 83 76 00 00 00 00

PDS: (00000041)
Identifier: 20 (0x14)
Palettes Found: 22
EndOfSection: 190
Unknown ?: 50 47 00 31 84 33 00 31 83 76

ODS0: (000000BE)
Identifier: 21 (0x15)
EndOfSection: 27191
DataArray Length: 696C

END: (00006A37)

PG FOUND
PTS EndTime: 00:00:40,415
DTS EndTime: 00:00:40,414

PCS: (00006A44)
Identifier: 22 (0x16)
EndOfSection: 27228
Resolution: 1920 x 1080

WDS0: (00006A5C)
Identifier: 23 (0x17)
EndOfSection: 27251
Resolution: 1920 x 117

END: (00006A73)


------------------------------
END OF SUBTITLE 1
------------------------------

And another note, anyone of you know if its possible to convert PTS time into DTS time ?

rack04
24th November 2008, 15:15
Does anyone have a sample m2ts or evo with subtitles that I could experiment with? Here (ftp://mplayerhq.hu/MPlayer/samples/evob/Subtitle-sample.evo) is one that I initially tested but it's really to short to get any good practice with.

GZZ
24th November 2008, 15:47
You can create your own bluray subtitle in TSmuxer from at SRT file or if you have a HD-DVD/Bluray you can demux a subtitle from.

Zorg
29th November 2008, 11:54
Is it possible to add to TSmuxer the bold and italics processing in srt files? I'd guess it's not a big problem.

EDIT: Apparently it was not :) I found a version of TSmuxer 1.8.8 which is able to do this! (unofficial?I thought there was 1.8.4b so far...)
http://www.videohelp.com/download/tsMuxeR_1.8.8b.zip

wangchuanyan1982
13th January 2009, 09:28
I'm wondering if this is possible yet.

I've tried ripping the data from a bluray disc's .m2ts file. I believe that PIDs starting from 1200 are the subtitle streams, but I have no idea what to do with them.

Anyone have any information on how to convert them to SRTs? Or where I can find the format specifications for them?

i am doing the same work ,could you support some info for me ,thank you

B4tm4n
13th January 2009, 19:27
i am doing the same work ,could you support some info for me ,thank you

http://www.videohelp.com/tools/SUPread

I think supread is what your after.

Rectal Prolapse
14th January 2009, 17:35
wang, don't worry about that - supread or suprip will work for you.

wangchuanyan1982
15th January 2009, 08:01
wang, don't worry about that - supread or suprip will work for you.

i want to know the format of pgs ,
15 85 6e 0 0 0 c0 0 85 67 3 5f 0 95 0 92 ff 1e 32 0 c3 4b ff 0 0 0
the above ii think is first line of the sub bitmap,how can i translter it ,
15 is identifier
85 6e is the size of section
0 0 ls one line end
but how ls the RLE in this ,i can not guess it ,could you help me ?thank you very much!

wangchuanyan1982
15th January 2009, 08:03
More:

00 03 = The next 3 pixels use color index 0.

00 01 = The next pixel is color index 0.

So, basically, 00 is reserved as an RLE command. To get the color 0 you need to do the above.

Given the above, here are some examples:

00 47 80 00 00 00 42 0F 0E 14 00 84 FE 14 0E 00 0F

Breaks down into:

00 47 80 = 1920 pixels of color 0.
00 00 = end of line, go to the beginning of the next line.
00 42 0F = 527 pixels of color 0
0E = pixel at x location 528 is color 14.
14 = pixel at x location 529 is color 20.
00 84 FE = the next 4 pixels are of color 254.
14 = the next pixel is color 20.
0E = the next pixel is color 14.
00 0F = the next 15 pixels are color 15.

This will go on until 1920 pixels for the line have been specified, and shall end in a 00 00 pair.

Now, not all subpictures will be 1920 pixels across - this depends on the header before the bitmap info.
16 0 13 7 80 4 38 40 0 0 80 0 0 1 0 0 0 0 2 11 3 6c

17 0 a 1 0 2 11 3 6c 3 5f 0 95

14 1 42 0 0 1 da 80 80 ff .......3f 10 80 80 a7 40 6e 80 80 ff

15 85 6e 0 0 0 c0 0 85 67 3 5f 0 95 0 92 ff 1e 32 0 c3 4b ff 0 0 0

what about this ?some different?

Rectal Prolapse
16th January 2009, 22:14
Oh - you didn't clarify you wanted to know the binary format of a .sup file.

Unfortunately you will need to purchase the full Blu-ray specification - the information I posted is incomplete!

You could look at the MPC-HC (Media Player Classic - Home Cinema) source code for how to decode the PG streams though. Look for the thread here on doom9 about that player:

http://forum.doom9.org/showthread.php?t=123537

wangchuanyan1982
19th January 2009, 04:13
Oh - you didn't clarify you wanted to know the binary format of a .sup file.

Unfortunately you will need to purchase the full Blu-ray specification - the information I posted is incomplete!

You could look at the MPC-HC (Media Player Classic - Home Cinema) source code for how to decode the PG streams though. Look for the thread here on doom9 about that player:

http://forum.doom9.org/showthread.php?t=123537

thank you

Rectal Prolapse
8th March 2012, 05:30
New tool for Blu-ray sup files:

http://forum.doom9.org/showthread.php?t=164370

Nibbio
25th October 2016, 12:49
I need the same answers. Thank you for the topic, guys.