- Extensions: roq
- Company: Id Software
- Technical Description: http://multimedia.cx/mirror/idroq.txt
- Official Encoder (win32): ftp://ftp.idsoftware.com/idstuff/quake3/tools/roq.zip
- Official Decoder, from Quake III GPL source: https://github.com/id-Software/Quake-III-Arena/blob/master/code/client/cl_cin.c
- Samples: http://samples.mplayerhq.hu/game-formats/idroq/
According to excerpts of Devine's 11th Hour development journal published in Wired at http://www.wired.com/wired/archive/3.08/shipping.html, the RoQ format was named after Devine's newborn daughter, Roqee.
FFmpeg encoder is based on the Switchblade roq encoder which was originally at http://icculus.org/homepages/riot/ . Its author continue the development of the original code.
The RoQ files used in The 11th Hour and Clandestiny are a superset of the format used in Q3-Engine based games. They include chunk types not used in Q3 and supported in the current implementations of the format. These two games, among other differences, also include support for JPEG encoded keyframes.
A RoQ format is comprised of a series of chunks. These chunks may indicate the format signature or playback parameters, or may contain encoded pieces of video frames or audio wave forms.
Each chunk has the following format (all multi-byte numbers are little-endian):
bytes 0-1 chunk ID bytes 2-5 length of chunk payload bytes 6-7 chunk arguments bytes 8.. chunk payload
Note that bytes 2-5 only contain the length of the chunk payload, not the entire chunk including the 8-byte header. Also, the RoQ_SIGNATURE chunk contains 0xFFFFFFFF for this field and should only be used for format validation purposes.
0x1084 - RoQ_SIGNATURE
A signature chunk has a length of 0xFFFFFFFF and no payload. The chunk argument represents the movie playback framerate.
0x1000 - RoQ_QUAD
0x1001 - RoQ_INFO
0x1002 - RoQ_QUAD_CODEBOOK
0x1011 - RoQ_QUAD_VQ
0x1012 - RoQ_JPEG
A JPEG chunk contains a plain JFIF file that can be decoded with a standard JPEG image decoder.
0x1013 - RoQ_HANG
The purpose of this chunk type is unclear.
0x1020 - RoQ_SOUND_MONO
0x1021 - RoQ_SOUND_STEREO
0x1030 - RoQ_PACKET
This chunk is known to occur in RoQ files from The 11th Hour. It's use appears to be related to audio processing.
Games Using RoQ
These games are known to use the RoQ format, often because they are based on the Quake III engine.