What is it
OggRGB is an uncompressed RGB (Red-Green-Blue) video codec for Ogg. It's a simple way to transfer raw, uncompressed RGB video within an Ogg container.
Why is it
The purpose of OggRGB is as a raw video interchange format within OggStream and other media frameworks. The format design is to be simple, complete, and efficient enough to be reasonably used to export decoded video to a media player for display.
Due to the size of uncompressed video, a compressed lossless video codec should be used for storage, such as would be prefered for video recording, editing, or archiving.
Packets are processed as per the value of their first byte. Packets of unknown ID should be silently ignored, providing a convient way to add future expandability which does not break the data format. Additional data in packet 0 (the header packet) must also be silently ignored.
Packet 0, BOS, 24 bytes 8 0x00 Header Packet ID 24 "RGB" Codec identifier 8 0x01 Version Major (breaks backwards compatability to increment) 8 0x00 Version Minor (backwards compatable, ie, via extended header) 8 [variable] Alpha channel bpp, typically 0 or 8 8 [variable] Red channel bpp, typically 5 or 8 8 [variable] Green channel bpp, typically 5, 6, or 8 8 [variable] Blue channel bpp, typically 5 or 8 16 [variable] Gamma Correction (ie, 1/2.2) * 4096 16 [variable] Frame Width 16 [variable] Frame Height 32 [variable] Framerate Numerator 32 [variable] Framerate Denominator
Data Packet 8 0xFF Data Packet ID 24 "RGB" Codec identifier, pads data to 32-bits .. [data] variable length packed [a]rgb frame