GoToMeeting Codec

From MultimediaWiki
Revision as of 06:29, 4 November 2012 by Alex (talk | contribs)
Jump to navigation Jump to search

This is a codec used to save recordings in GoToMeeting. The codec also calls itself GoToWebinar (see

Win32 binary decoder available here:

According to samples, all G2M2 video frames begin with the characters 'G2M2', followed by a series of chunks. Each chunk has the following layout:

bytes 0-3    length of chunk payload, not including this length field
byte 4       type of chunk
bytes 5..    remainder of payload, format unknown

Supported chunk types are 0xC8-0xCD.

It appears that the minimum size for a G2M2 frame (possibly a no-change frame) is 14 bytes. This includes the 4 signature bytes, a 4-byte length indicating a chunk length of 6, and a 6-byte payload of type 0xCA followed by 5 more bytes.

G2M3 bears much similarity to G2M2 at the surface level. Naturally, each frame has a signature of 'G2M3'.

Chunk C8

This seems to contain display information.

Chunk contents (all values are big-endian):

  4 bytes  image width
  4 bytes  image height
  4 bytes  compression mode (should be 2 or 3)
  4 bytes  tile width
  4 bytes  tile height
  1 byte   colour depth (4, 8, 16, 24 or 32)
  for 4/8bpp there is a palette in standard RGBTUPLE format
  for 16-32bpp there are four bitmasks for each field

Chunk C9

Should be image update.

 1 byte tile position in row?
 1 byte tile position in column?
 ... compressed data

REing compressed data format is left as an exercise to the reader, an example is provided below

Compression 2

 ELS-coded data size
 ELS-coded data for transparency pixel
 ELS-coded data for whole image
 JPEG data

ELS-coded data size:

 10xxxxxx xxxxxxxx
 110xxxxx xxxxxxxx xxxxxxxx
 111xxxxx xxxxxxxx xxxxxxxx xxxxxxxx
ELS data

ELS-coded data seems to consist of coded flags and differences for RGB triplets.

Vanilla augmented ELS coder is used (The ELS-coder: a rapid entropy coder). .

Unsigned values are coded as a number with all bits set to one and an addition to it:

 mask = 1;
 val  = 0;
 while (decode_bit()) {
   val   += mask;
   mask <<= 1;
 while (mask > 1) {
   mask >>= 1;
   if (decode_bit())
       val += mask;

E.g. number 5 will be coded as 11 0 10 (i.e. 3 + stop bit + 2).

Signed values use last bit for sign:

 if (val & 1)
   val = - ((val + 1) >> 1);
   val = val >> 1;

Image data is composed this way:

 single pixel value that is used for transparency colour
 full tile image

Pixels in image can be coded as the one of 10 already decoded neighbours depending on which of them equal to which (a bit like JBIG compression), as some cached value or as the difference to the predicted one from left+top+topleft neighbours.

JPEG data

JPEG data seems to be scan data with escapes but no headers (default Huffman tables and quantisation matrices are used).

Chunk CA

Probably mouse cursor position.

 2 bytes cursor position X
 2 bytes cursor position Y
 1 byte  seems to be always 1

Chunk CB

This one seems to define mouse cursor shape:

 4 bytes data size
 1 byte  width
 1 byte  height
 1 byte  hotspot x
 1 byte  hotspot y
 ...     cursor bitmask and its inverse (in M$ format 98% sure)

Chunk CC

Maybe some resync chunk, it's supposed to contain only 4-byte value equal to 2000.

Chunk CD

One dword, something to do with time.