Alex May's Wiki : FreeFrameVideoStreamingSpecification

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Oldest known version of this page was edited on 2007-11-02 11:21:34 by AlexMay []
Page view:

FreeFrame Video Streaming Packet Format v1.5 (c)2006-2007 Alex May


The bigfug streaming plugins use TCP or UDP to transmit each video frame. Each packet can contains several lines of video.

Packet Format


Frame Number (1 byte)

This is a counter that is incremented for every frame sent (not every packet). When it gets to 0xff it wraps around to 0x00

Bit Depth (1 byte)

One of the following codes:

16 bit (2 bytes per pixel) = 0

24 bit (3 bytes per pixel) = 1

32 bit (4 bytes per pixel) = 2

Vertical Line Number (2 bytes)

The vertical position of the first enclosed line of image data ranging from 0 to ( Frame Height - 1 )

Frame Width (2 bytes)

The width (in pixels) of the frame

Frame Height (2 bytes)

The height (in pixels) of the frame

Image Data

(2, 3, or 4 bytes per pixel (depending on bit depth) * Frame Width * LinesInPacket. With no padding between pixels or lines)

To find how many lines are in the packet, use the following:

LinesInPacket = ( ReceivedPacketSize - HeaderSize (8 bytes) ) / ( FrameWidth * BytesPerPixel )

Example packet header showing byte order:

12 01 02 00
60 01 20 01


Frame Number = 0x12 = 18

Bit Depth = 0x01 = 1 = 24 bit data

Line Number = 0x0002 = 2

Frame Width = 0x0160 = 352

Frame Height = 0x0120 = 288

CategoryFreeFrame - FreeFrameVideoStreaming
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3