[Matroska-devel] DivX XSUB subtitle format

Steve Lhomme steve.lhomme at free.fr
Tue Dec 27 22:23:44 CET 2005

Hi all,

As the source of the XSUB encoder are public and in DrFFMPEG here is the 
format of the XSUB subtitle in .divx/DMF files :

typedef struct Color
   uint8_t red;
   uint8_t green;
   uint8_t blue;
} Color;

// DivX Subpicture Packet header
typedef struct DivxSubPictPackHdr
   // Duration in the following format
   // [HH:MM:SS.XXX-hh:mm:ss.xxx]
   // Note: There is no NUL at the end
   char duration[27];

   // Subpicture dimensions & coordinates
   uint16_t width;
   uint16_t height;
   uint16_t left;
   uint16_t top;
   uint16_t right;
   uint16_t bottom;
   uint16_t fieldOffset;

   // Background, pattern, emphasis1, emphasis2 colors
   Color background;
   Color pattern;
   Color emphasis1;
   Color emphasis2;
} DivxSubPictPackHdr;


This is stored in little-endian with the exact size for each field. I 
think Gabest shouldn't have a hard time supporting the format too.

robUx4 on blog <http://robux4.blogspot.com/>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xsub.c
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20051227/41ed0622/attachment.c>

More information about the Matroska-devel mailing list