View Full Version : A pair: IDX \ SUB format


A_C_ONE
26th September 2007, 04:59
I need a great deal of help from an expert. I am a developer and created a small programm to convert SUB to SRT subtitles and perform a lot of operation with SUB (text) subtitles. Now my goal is to "teach" my applet to recognize BMPs in a VOB SUB file. The one whis goes in pair with IDX.
IDX a pretty straightforward textual file, to read it - there is no problem.
The format of SUB file - which contains bitmaps of subtitles - is a problem, I tried to find out any information on the internet - to no avail. There are no description or specifications of a SUB format. SUB format remains a black box for me. I 'm talking not about general description of a SUB format, or what is it for etc.etc.etc, but a description of SUB format - exactly.
I am not talking about OCR program, I didn't go that far. For the start I would want to "chop" the SUB, according to data i IDX file -positions.
And then display those chops in a BMP control, like image control or so. Or to save them (decode probably and save) as BMP files.
I repeat,I am not close to astage of OCRing - I want to display bitmaps, found in SUB - in a picture control (ActiveX) or save as separate bmp files.

I deeply appreciate any help in this matter.

with regards
a developer

manusse
26th September 2007, 20:41
Hi,

The Sub file in a Sub/Idx pair look a bit like a sup file. You can have a look at those threads to understand how they work:

The SUP format:

http://www.mpeg.org/MPEG/DVD/Book_B/Subpic.html
http://dvd.sourceforge.net/dvdinfo/spu.html

A thread about some programs that can convert sup files to sub/idx:

http://forum.doom9.org/showthread.php?t=111664

You can have a look at SubtitleCreator's source code (http://subtitlecreator.svn.sourceforge.net/viewvc/subtitlecreator/trunk/)that can read sub/idx files. I think there is no written specification available.

[Edit] You can save the pictures in a sub/idx pair of files to bitmaps using SubtitleCreator (Tools->Manipulate... menu)

Cheers
Manusse

A_C_ONE
27th September 2007, 10:56
Thank you very much, Manusse, for steering me in a right direction.
I guess, there are really no written specs of SUB format, but source code of Subtitle's Creator is a great help here.