View Full Version : HD subtitle ripping (SUPread)
Pages :
[
1]
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Pelican9
30th January 2007, 16:25
I need a little(?) help.
I would like to get subtitles from HD DVDs.
I've written a demuxer sw (EVO demux (http://pel.hu/down/EVOdemux.exe)) 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.
emmel
30th January 2007, 19:38
Could anybody help me to understand the normal DVD's .sup files structure?
http://dvd.sourceforge.net/spu_notes
Pelican9
30th January 2007, 19:47
Thank you!
manusse
30th January 2007, 21:40
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
Pelican9
30th January 2007, 22:52
Thanks.
I think, the HD DVD's subpicture stream more different than I thought before.
I cannot find any similarity...
Diablo666
31st January 2007, 15:42
You could always try to add subtitles as an AdvancedSubtitleSegment within the .XPL file. See Here (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=925761&SiteID=1) for more info on this.
Pelican9
31st January 2007, 16:14
You could always try to add subtitles as an AdvancedSubtitleSegment within the .XPL file. See Here (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=925761&SiteID=1) 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. :(
Pelican9
1st February 2007, 01:39
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?
emmel
1st February 2007, 07:22
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.
Pelican9
1st February 2007, 15:01
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:
------------------------------------
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.
Pelican9
2nd February 2007, 16:57
I'v got the timing information. :)
I can make an .srt file looks like this:
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?
manusse
2nd February 2007, 17:17
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
nikopaha
3rd February 2007, 14:34
I'v got the timing information. :)
I can make an .srt file looks like this:
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!
mikegun
5th February 2007, 11:12
I'v got the timing information. :)
I can make an .srt file looks like this:
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
Isochroma
6th February 2007, 02:19
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:
http://isochroma.com/Testfiles/Misc/doom9/SubRip-Formats-1.png
http://isochroma.com/Testfiles/Misc/doom9/SubRip-Formats-2.png
Your work on the EVO demuxer is greatly appreciated, Pelican9! I hope that it is possible to get subtitles working as well.
Pelican9
6th February 2007, 09:34
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.
Isochroma
6th February 2007, 19:53
After much searching, I dug up this link:
Create SRT Subtitles From MythTV Recordings (http://www.mythtv.org/wiki/index.php/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 (http://web.quick.cz/FKasparek/Software/DVD/DVDSupTools.htm).
Now back to some maintenance: there is another thread which pretty much duplicates the subject of this one: Convert .sup to .txt (http://forum.doom9.org/showthread.php?t=121643)
Request is now made of the local admin to merge the threads.
manusse
6th February 2007, 20:42
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
Pelican9
7th February 2007, 00:50
After much searching, I dug up this link:
Create SRT Subtitles From MythTV Recordings (http://www.mythtv.org/wiki/index.php/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 (http://web.quick.cz/FKasparek/Software/DVD/DVDSupTools.htm).
Now back to some maintenance: there is another thread which pretty much duplicates the subject of this one: Convert .sup to .txt (http://forum.doom9.org/showthread.php?t=121643)
Request is now made of the local admin to merge the threads.
I'm talking about HD DVD subtitles...
Pelican9
7th February 2007, 00:55
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!
Isochroma
7th February 2007, 03:46
So there's two different .SUP formats? Sounds a bit confusing...
Pelican9
7th February 2007, 09:47
So there's two different .SUP formats? Sounds a bit confusing...
I don't know anything about the .sup format, but the subpicture streams are different. HD DVD sub has new commands, 8 bit RLE encoded bitmaps, etc.
Pelican9
8th February 2007, 00:49
I've decoded the HD DVD subpicture stream:
http://pel.hu/down/subpic.jpg
Isochroma
8th February 2007, 01:48
Yay! Good work Pelican9! Your genius is always inspiring, never tiring.
Now all that's left is to get it into a format that SubRip can OCR, then we'll be cooking with gas!
manusse
8th February 2007, 22:50
I would like to know a bit more about the HD-DVD subtitles spec so that we can improve SubtitleCreator and that it can eventually open (for viewing) HD sup files and also for generating new ones from srt files like it does for SD.
Could you please give some links and/or details about the HD-DVD subtitles'specification (new commands, 8 bit RLE encoded bitmaps, etc.)?
Thanks in advance
Manusse
:thanks:
Pelican9
9th February 2007, 00:22
manusse:
I've sent PM.
Pelican9
10th February 2007, 20:57
I've finished my HD SUP reader v0.1.
Download: SUPread (http://pel.hu/down/SUPread.exe)
It can show the subpictures but works only with .sup/.pts files demuxed by EVO demux (http://pel.hu/down/EVOdemux.exe)
Edit:
SUPread v0.11
- Custom background image (you can download this nice seal portrait (http://pel.hu/down/Back1920.bmp))
- Options page
- Autosave all settings
Pelican9
13th February 2007, 01:20
Changes:
- Read 'traditional' format .sup files, .pts file not needed anymore
- Read both SD and HD subtitles
Sagittaire
13th February 2007, 15:19
don't work for me ...
Pelican9
13th February 2007, 16:12
don't work for me ...
What do you mean?
Use the latest EVOdemux to create .sup file.
Sagittaire
13th February 2007, 16:35
What do you mean?
Use the latest EVOdemux to create .sup file.
yes ... PEVOB_1.Subpicture.00.sup (from batman begin HDDVD).
Pelican9
13th February 2007, 16:53
yes ... PEVOB_1.Subpicture.00.sup (from batman begin HDDVD).
Could you give me a more specific error report? :)
What happens?
Any error message?
Smoke?
Fire?
? :)
Sagittaire
13th February 2007, 17:04
Could you give me a more specific error report? :)
What happens?
Any error message?
Smoke?
Fire?
? :)
No work with the really last EVOdemux now ... sorry
Pelican9
13th February 2007, 17:23
Oh, no!
I've checked the program and realized that I've made a big mistake: turn off the subpicture display function... :-(
Sorry!
I'll correct it tonight.
Pelican9
13th February 2007, 20:58
I've turned on the subpicture displaying...
SUPread v0.21 (http://pel.hu/down/SUPread.exe)
Deckard2019
13th February 2007, 22:18
Is there a chance we could use SubRip OCR engine ?
SubRip can take image sequence as Input. Image Sequence comes from DVDSupDecode (http://web.quick.cz/FKasparek/Software/DVD/DVDSupTools.htm).
So maybe you could export each image to BMP and create output text file just as DVDSupDecode does ?
Output text file starts with :
;PEVOB_1.Subpicture.02.sup
FrameRate=23.976
Alpha=FFF0
And then :
Result is text file in format
{frame_from}{frame_to}{VTS_01_0.20_000001.bmp}
If you want me to test anything, just ask ...
Isochroma
13th February 2007, 22:43
I agree with Deckard2019; there's no reason to try re-doing an OCR engine when an already well-developed one exists: SubRip. The most efficient plan would be to output files which can be read by Subrip.
Pelican9
13th February 2007, 23:21
Can SubRip handle bmps of any size?
Is it enough to save only the subpicture part or does SubRip need the full size picture (1920x1080)?
Deckard2019
13th February 2007, 23:34
Take a look at DVDSupEncode cli options.
Frame size seems to be full (720x576, 720x480, 352x240), defined in DVDSupEncode.ini.
Don't know if 1920x1080 bitmap res will then be a valid input for SubRip.
Maybe try to export @1920x1080 and feed SubRip with these bitmaps ?
If SubRip does not accept, try a PAL or NTSC resize ?
But I don't what the bitmap will look like after a resize ...
Isochroma
13th February 2007, 23:52
If not, a basic bilinear resize to 720x480 should do nicely. Avisynth provides the function, can be done separately or internally.
Kiriakos
20th February 2007, 17:19
Firstly, thanks for the very usefull programs that you are feeding us with, Pelican9. Really great!
I am wondering, what is wrong with my system and the .srt file that outputs SUPread, looks like this:
1
12:01:14 AM,145 --> 12:01:18 AM,480
Line 1
2
12:01:18 AM,550 --> 12:01:21 AM,042
Line 2
3
12:01:21 AM,152 --> 12:01:24 AM,350
Line 3
4
12:01:24 AM,456 --> 12:01:29 AM,291
Line 4
.........
..........
...........
The time numbers are in a strange format as you can see!!!!
Any ideas?
Thanks again.
Kiriakos
21st February 2007, 16:09
Firstly, thanks for the very usefull programs that you are feeding us with, Pelican9. Really great!
I am wondering, what is wrong with my system and the .srt file that outputs SUPread, looks like this:
1
12:01:14 AM,145 --> 12:01:18 AM,480
Line 1
2
12:01:18 AM,550 --> 12:01:21 AM,042
Line 2
3
12:01:21 AM,152 --> 12:01:24 AM,350
Line 3
4
12:01:24 AM,456 --> 12:01:29 AM,291
Line 4
.........
..........
...........
The time numbers are in a strange format as you can see!!!!
Any ideas?
Thanks again.
Found it. It was the format of the time (control panel>regional settings> etc) on my system. It seams that SUPread uses this setting to form the .srt file.
Another one: It seams that if the movie has over 1000 lines of subtitles, in SUPread you can see in "Image" tab, only the first 999. From there and above, it sticks and shows the 999nth. :confused:
Pelican9
22nd February 2007, 10:45
Found it. It was the format of the time (control panel>regional settings> etc) on my system. It seams that SUPread uses this setting to form the .srt file.
Another one: It seams that if the movie has over 1000 lines of subtitles, in SUPread you can see in "Image" tab, only the first 999. From there and above, it sticks and shows the 999nth. :confused:
Thank for your report, I'll fix it soon.
The used time format is the system's default setting as you described. (The same problem was in EVOdemux.)
Edit:
I've fixed the time format and the other problem with lines above 1000
Deckard2019
22nd February 2007, 22:06
Any news about exporting bitmaps ?
Thank you.
Pelican9
23rd February 2007, 00:55
Any news about exporting bitmaps ?
Thank you.
I'm working on EVOdemux...
Off:
... Nehogy már! Te vagy a blade, blade runner. :)
Kiriakos
23rd February 2007, 01:23
I've fixed the time format and the other problem with lines above 1000
You are a king!
:thanks:
Pelican9
24th February 2007, 18:56
Changes for v0.23
- New option 'Auto read'
- New option 'Output folder'
- New feature 'Save BMPs'
SUPread v0.23 (http://pel.hu/down/SUPread.exe)
Pelican9
24th February 2007, 21:06
Is there a chance we could use SubRip OCR engine ?
SubRip can take image sequence as Input. Image Sequence comes from DVDSupDecode (http://web.quick.cz/FKasparek/Software/DVD/DVDSupTools.htm).
So maybe you could export each image to BMP and create output text file just as DVDSupDecode does ?
Output text file starts with :
And then :
If you want me to test anything, just ask ...
I've created a subrip.txt but Subrip makes an error...
Deckard2019
24th February 2007, 21:17
Thank a lot for the feature !
Did you try to resize bitmaps to DVD resolution (720x480 or 720x576) before using SubRip ?
Pelican9
24th February 2007, 21:34
Thank a lot for the feature !
Did you try to resize bitmaps to DVD resolution (720x480 or 720x576) before using SubRip ?
I'm trying with an NTSC DVD, so the bitmaps are 720x480...
I cannot create a valid txt, or valid bmp. :-(
Subrip always give access violation error...
Could you send me a valid file?
My txt:
;VTS_01_1.Subpicture.00.sup
FrameRate=23.976
Alpha=FFF0
{107}{218}{VTS_01_0.20_000001.bmp}
{239}{298}{VTS_01_0.20_000002.bmp}
{311}{441}{VTS_01_0.20_000003.bmp}
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.