XSUB

From MultimediaWiki
Revision as of 04:07, 4 August 2007 by Reimar (talk | contribs)
Jump to navigation Jump to search

XSUB is the subtitle format used in DivX 6 files. Each packet consists of a header and after that RLE-encoded data. The header starts with timing information in the format (27 bytes, no terminating zero):

[HH:MM:ss.mmm-HH:MM:ss.mmm]

Then, encoded as 16 bit little endian except for the colour entries, follow:

width of encoded image
height of encoded image
x coordinate of top left subtitle corner
y coordinate of top left subtitle corner
x coordinate of bottom right subtitle corner
y coordinate of bottom right subtitle corner
length of the RLE data
four colour entries (red, green, blue, eight bits per component, unsigned)

Width, height and coordinates probably all must be a multiple of 2. It is unclear what the behaviour is if the coordinates are not consistent with width and height, the encoder does not produce such files.

After this follows the RLE-encoded data. Missing: specification of RLE-encoding used.