Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th January 2007, 16:25   #1  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
HD subtitle ripping (SUPread)

I need a little(?) help.
I would like to get subtitles from HD DVDs.
I've written a demuxer sw (EVO demux) which can produce the subtitle streams, but no software is able to handle these files.
The files are good because I've checked Softpedia's HD DVD demuxer and my .sup is perfectly matching theirs.
I think this subtitle stream similar to DVD's subtitle stream but it contains higher resolution bitmaps.
I haven't found any information about neither HD DVD nor DVD subtitle streams.
Could anybody help me to understand the normal DVD's .sup files structure?
Is there any documentation about it?
Is the .sup file containing timing information or bitmaps only?
I think only the .ifo contains these infos on DVD, but I'm not sure.

Last edited by Pelican9; 17th May 2007 at 09:12.
Pelican9 is offline   Reply With Quote
Old 30th January 2007, 19:38   #2  |  Link
emmel
Registered User
 
Join Date: Feb 2006
Posts: 133
Quote:
Originally Posted by Pelican9 View Post
Could anybody help me to understand the normal DVD's .sup files structure?
http://dvd.sourceforge.net/spu_notes
emmel is offline   Reply With Quote
Old 30th January 2007, 19:47   #3  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Thank you!
Pelican9 is offline   Reply With Quote
Old 30th January 2007, 21:40   #4  |  Link
manusse
SubtitleCreator's Co-Dev
 
manusse's Avatar
 
Join Date: Oct 2005
Location: France
Posts: 579
Quote:
Is the .sup file containing timing information or bitmaps only?
For a DVD the .sup holds the bitmap, plus its position, its start time (PTS) and duration, plus also the indexes of the colors on a palette (CLUT) stored in the corresponding IFO file.

Some other references about SUP format:
http://www.mpeg.org/MPEG/DVD/Book_B/Subpic.html
http://dvd.sourceforge.net/dvdinfo/spu.html

Manusse
manusse is offline   Reply With Quote
Old 30th January 2007, 22:52   #5  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Thanks.
I think, the HD DVD's subpicture stream more different than I thought before.
I cannot find any similarity...

Last edited by Pelican9; 31st January 2007 at 11:24.
Pelican9 is offline   Reply With Quote
Old 31st January 2007, 15:42   #6  |  Link
Diablo666
Registered User
 
Join Date: Jan 2007
Posts: 2
You could always try to add subtitles as an AdvancedSubtitleSegment within the .XPL file. See Here for more info on this.
Diablo666 is offline   Reply With Quote
Old 31st January 2007, 16:14   #7  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by Diablo666 View Post
You could always try to add subtitles as an AdvancedSubtitleSegment within the .XPL file. See Here for more info on this.
Thanks, I've known that method, but this is another task.
I would like to get the original subtitle timing info, because it very useful to synchronize my freshly created sub.
But unfortunately nobody experienced with this new .sup format.

Last edited by Pelican9; 31st January 2007 at 16:17.
Pelican9 is offline   Reply With Quote
Old 1st February 2007, 01:39   #8  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by manusse View Post
For a DVD the .sup holds the bitmap, plus its position, its start time (PTS) and duration, plus also the indexes of the colors on a palette (CLUT) stored in the corresponding IFO file.
I'm confused.
Where is the PTS information?
I've found it only in the SP_PCKs, but the .sup doesn't contains the packet headers only the SPUH, PXD, SPDCQST datas.
It contains only relative timing to PTS.
Am I wrong?
Pelican9 is offline   Reply With Quote
Old 1st February 2007, 07:22   #9  |  Link
emmel
Registered User
 
Join Date: Feb 2006
Posts: 133
Quote:
Originally Posted by Pelican9 View Post
Where is the PTS information?
In a 'classical' sup-file, there is a 64-bit PTS right after the start code 'SP'. Then comes the packet_size, data_size,... etc. The duration is in the control sequence.
emmel is offline   Reply With Quote
Old 1st February 2007, 15:01   #10  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by emmel View Post
In a 'classical' sup-file, there is a 64-bit PTS right after the start code 'SP'. Then comes the packet_size, data_size,... etc. The duration is in the control sequence.
I'll try what happen if I put into my .sup file start 'SP' chars and PTS.

OK. I'm a little bit further now.
The structure of HD DVD's subpicture stream:
Code:
------------------------------------
00000000: SPUH
0000000A: PXD [006F24]
          ----
00006F2E: SP_DCSQ_STM: 0000
00006F30: SP_NXT_DCSQ_SA: 00007348
00006F34: STA_DSP 
00006F35: SET_COLOR2 
00007236: SET_CONTR2 
00007337: SET_DAREA2 (630, 844) - (1303, 911)
0000733E: SET_DSPXA2 top: 0000000A, bottom: 000037B8
00007347: CMD_END 
          ----
00007348: SP_DCSQ_STM: 0151
0000734A: SP_NXT_DCSQ_SA: 00007348
0000734E: STP_DSP 
0000734F: CMD_END 
------------------------------------
00007350: SPUH
0000735A: PXD [006762]
          ----
0000DABC: SP_DCSQ_STM: 0000
0000DABE: SP_NXT_DCSQ_SA: 0000DED6
0000DAC2: STA_DSP 
0000DAC3: SET_COLOR2 
0000DDC4: SET_CONTR2 
0000DEC5: SET_DAREA2 (682, 806) - (1247, 911)
0000DECC: SET_DSPXA2 top: 0000000A, bottom: 0000338A
0000DED5: CMD_END 
          ----
0000DED6: SP_DCSQ_STM: 0102
0000DED8: SP_NXT_DCSQ_SA: 0000DED6
0000DEDC: STP_DSP 
0000DEDD: CMD_END 
------------------------------------
0000DEDE: SPUH
0000DEE8: PXD [005BAC]
          ----
00013A94: SP_DCSQ_STM: 0000
00013A96: SP_NXT_DCSQ_SA: 00013EAE
00013A9A: STA_DSP 
00013A9B: SET_COLOR2 
00013D9C: SET_CONTR2 
00013E9D: SET_DAREA2 (654, 846) - (1275, 911)
00013EA4: SET_DSPXA2 top: 0000000A, bottom: 00002DDE
00013EAD: CMD_END 
          ----
00013EAE: SP_DCSQ_STM: 00F3
00013EB0: SP_NXT_DCSQ_SA: 00013EAE
00013EB4: STP_DSP 
00013EB5: CMD_END 
------------------------------------
SPUH: Subpixel Unit Header
PXD: Pixel data 8 bit RLE

Only the SP_PKT header in the EVO file contains the PTS information which I need (not the stream itself), so I have to write to somewhere this data during demuxing the original EVO...
Because only one PTS at the start is not enough, every SP_DCSQ need one.

Last edited by Pelican9; 2nd February 2007 at 01:30.
Pelican9 is offline   Reply With Quote
Old 2nd February 2007, 16:57   #11  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
I'v got the timing information.
I can make an .srt file looks like this:
Code:
1
0:01:14,046 --> 0:01:18,608
line 1

2
0:01:18,684 --> 0:01:21,210
line 2

3
0:01:21,286 --> 0:01:24,586
line 3

4
0:01:24,656 --> 0:01:29,094
line 4

5
0:01:29,161 --> 0:01:31,653
line 5

...
Is it useful for anybody?
Do you suggest a better format to store the timing information?

Last edited by Pelican9; 2nd February 2007 at 17:03.
Pelican9 is offline   Reply With Quote
Old 2nd February 2007, 17:17   #12  |  Link
manusse
SubtitleCreator's Co-Dev
 
manusse's Avatar
 
Join Date: Oct 2005
Location: France
Posts: 579
Maybe VobSub (ie sub/idx) format could also be supported. Basically it's very closed to SUP. There is some padding and the header is slightly different but the subtitle information is exactly the same. The idx file stores the timings and the indexes of the subtitles (sadly it doesn't store their durations). The VobSub format is currently supported by many software players whereas the sup format is (to my knowledge) only supported for remuxing a DVD.
Anyway, one day SubtitleCreator will probably allow to convert between both format for HD-DVDs as it already can do it for DVDs.

Cheers
Manusse
manusse is offline   Reply With Quote
Old 3rd February 2007, 14:34   #13  |  Link
nikopaha
Registered User
 
Join Date: Dec 2003
Posts: 6
Quote:
Originally Posted by Pelican9 View Post
I'v got the timing information.
I can make an .srt file looks like this:
Code:
1
0:01:14,046 --> 0:01:18,608
line 1

2
0:01:18,684 --> 0:01:21,210
line 2

3
0:01:21,286 --> 0:01:24,586
line 3

4
0:01:24,656 --> 0:01:29,094
line 4

5
0:01:29,161 --> 0:01:31,653
line 5

...
Is it useful for anybody?
Do you suggest a better format to store the timing information?
Yes. Share the code!
nikopaha is offline   Reply With Quote
Old 5th February 2007, 11:12   #14  |  Link
mikegun
one inch man
 
Join Date: Oct 2001
Posts: 263
Quote:
Originally Posted by Pelican9 View Post
I'v got the timing information.
I can make an .srt file looks like this:
Code:
1
0:01:14,046 --> 0:01:18,608
line 1

2
0:01:18,684 --> 0:01:21,210
line 2

3
0:01:21,286 --> 0:01:24,586
line 3

4
0:01:24,656 --> 0:01:29,094
line 4

5
0:01:29,161 --> 0:01:31,653
line 5

...
Is it useful for anybody?
Do you suggest a better format to store the timing information?
would be great, thanks
__________________
- free speech for the dumb -
mikegun is offline   Reply With Quote
Old 6th February 2007, 02:19   #15  |  Link
Isochroma
Registered User
 
Join Date: Mar 2005
Posts: 468
Yes indeed! I have Fearless and need to be able to extract and OCR the subtitles; the HD-DVD version has extra scenes and different timing from the regular DVD version.

More specifically, what is needed is some output files that are compatible with SubRip, so they can be OCR'd:





Your work on the EVO demuxer is greatly appreciated, Pelican9! I hope that it is possible to get subtitles working as well.

Last edited by Isochroma; 6th February 2007 at 02:34.
Isochroma is offline   Reply With Quote
Old 6th February 2007, 09:34   #16  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by Isochroma View Post
More specifically, what is needed is some output files that are compatible with SubRip, so they can be OCR'd:
Yes, exactly. But I have not found information about these file formats yet. So, I'm trying to make BMPs now.
Pelican9 is offline   Reply With Quote
Old 6th February 2007, 19:53   #17  |  Link
Isochroma
Registered User
 
Join Date: Mar 2005
Posts: 468
After much searching, I dug up this link:

Create SRT Subtitles From MythTV Recordings

It outlines a method to convert .SUP files into SRT, using DVDSupDecode and SubRip's Open Image Sequence feature.
DVDSupDecode.exe -bitmap -pal 1002_20061008220300.sup
Apparently this DVDSupDecode is the answer; it is available as part of the DVD Subtitle Tools.

Now back to some maintenance: there is another thread which pretty much duplicates the subject of this one: Convert .sup to .txt

Request is now made of the local admin to merge the threads.

Last edited by Isochroma; 6th February 2007 at 20:03.
Isochroma is offline   Reply With Quote
Old 6th February 2007, 20:42   #18  |  Link
manusse
SubtitleCreator's Co-Dev
 
manusse's Avatar
 
Join Date: Oct 2005
Location: France
Posts: 579
@Pelican9

Quote:
But I have not found information about these file formats yet
If you need some help to convert SUP files to SUB/IDX, you can look at SubtitleCreator's code (available on SourceForge, SVN repository).

Cheers
Manusse
manusse is offline   Reply With Quote
Old 7th February 2007, 00:50   #19  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by Isochroma View Post
After much searching, I dug up this link:

Create SRT Subtitles From MythTV Recordings

It outlines a method to convert .SUP files into SRT, using DVDSupDecode and SubRip's Open Image Sequence feature.
DVDSupDecode.exe -bitmap -pal 1002_20061008220300.sup
Apparently this DVDSupDecode is the answer; it is available as part of the DVD Subtitle Tools.

Now back to some maintenance: there is another thread which pretty much duplicates the subject of this one: Convert .sup to .txt

Request is now made of the local admin to merge the threads.
I'm talking about HD DVD subtitles...
Pelican9 is offline   Reply With Quote
Old 7th February 2007, 00:55   #20  |  Link
Pelican9
Coder
 
Pelican9's Avatar
 
Join Date: Jan 2007
Location: Around the World
Posts: 697
Quote:
Originally Posted by manusse View Post
If you need some help to convert SUP files to SUB/IDX, you can look at SubtitleCreator's code (available on SourceForge, SVN repository).
Thanks!
Pelican9 is offline   Reply With Quote
Reply

Tags
supread, suprip

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 06:13.


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