Introduction
RoQ is id Software's video format for games, with picture and sound in one file. Quake III, Jedi Knight 2 and other computer games use it.
Structure
This follows FFmpeg's reader. A file begins with the 16-bit value 0x1084 followed by 0xFFFFFFFF, little-endian. These start an 8-byte chunk preamble whose last two bytes give the frame rate.
The file is a run of chunks. Each preamble holds a 16-bit type, a 32-bit size and two more bytes:
0x1001– information, including width and height0x1002– codebook0x1011– vector-quantised video frame0x1020– mono sound0x1021– stereo sound
Sound is sampled at 22050 Hz.
Not described
This page is a short summary. The full layout is not yet described here, and there is no viewer for RoQ files.
Known, not yet covered
- Reference: the contents of the codebook, video and sound chunks and how they are decoded.
- Viewer: decoding and playing the video.
Links
Software
- FFmpeg – media toolkit that reads and writes RoQ
- Quake III – game that uses RoQ video
- Jedi Knight 2 – game that uses RoQ video
Reference
- idroqdec.c – FFmpeg's RoQ reader
- FFmpeg general documentation – table of supported file formats