Video XNB specifications


Reffering to this XNB specification I worked out how a video file is build up. The Informations are written to the xnb file using a binary stream.

header
At the beginning we write the header of the file
'X', 'N', 'B', 'w'|'m'|'x', 0x01|0x00,size
this header contains the XNB identifier (3 bytes), the target platform ('w'->Windows, 'x'->XBox and 'm'->Windows Phone 7), the profile (01->HiDef, 00->Reach) and the number of bytes stored in the XNB.

Type readers
This part is hardcoded because for videos it is everytime the same.

Video
Now every datatype has it's own prefix.
string->02
int32->03
single->04

Filename
The filename to the reference file, stored as binary string
Duration
The duration of the video in ms, stored as int32
Width, Height
The width, height of the video in pixels stored as int32
framerate
fps of the video stored as single
mediatype
The type of the audio. 0->Music, 1->Diaolg, 2->both; stored as Int32

Last edited Jul 1, 2012 at 6:14 PM by VisibleBasix, version 2

Comments

No comments yet.