Fraps: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
m (Update samples link (try 2))
(Info about Fraps v2)
Line 5: Line 5:
The Fraps video codec is used to store in real-time data that is captured from high frame-rate computer games played on Windows PCs.
The Fraps video codec is used to store in real-time data that is captured from high frame-rate computer games played on Windows PCs.


There are at least 3 versions of the codec that are all used with the same FOURCC. v0 is a reordered YUV420, v1 is an upside-down BGR24 encoding. v2 - the most commonly found variant - is presumably a lossless encoding format. v0 and v1 can be decoded by [[FFmpeg]] while v2 is still undiscovered.
There are at least 3 versions of the codec that are all used with the same FOURCC. v0 is a reordered YUV420, v1 is an upside-down BGR24 encoding. v2 - the most commonly found variant - is Huffman-coded YUV420 planes.
 
== Version 2 format and encoding ==
All data is stored in 32-bit little-endian words.
If frame size is 8 bytes long then repeat previous frame otherwise proceed to frame decoding.
 
=== Frame header ===
 
  bytes  0- 7 - should be ignored
  bytes  8-11 - 'FPSx'
  bytes 12-15 - offset to the Y plane (minus 8), should be always 16
  bytes 16-19 - offset to the U plane (minus 8)
  bytes 20-23 - offset to the V plane (minus 8)
 
=== Plane format ===
First 256 words (1 kB) of plane data are symbol frequencies used to construct Huffman tree. The rest of data represents bitstream packed into 32-bit words (but actually the lowest bit is ignored in decoding).
 
Lines are coded as difference to the previous lines. For Y plane the line with index -1 should contain all zeroes, for chroma planes - all 128.


[[Category:Incomplete Video Codecs]]
[[Category:Video Codecs]]
[[Category:Video Codecs]]

Revision as of 22:41, 2 November 2006

The Fraps video codec is used to store in real-time data that is captured from high frame-rate computer games played on Windows PCs.

There are at least 3 versions of the codec that are all used with the same FOURCC. v0 is a reordered YUV420, v1 is an upside-down BGR24 encoding. v2 - the most commonly found variant - is Huffman-coded YUV420 planes.

Version 2 format and encoding

All data is stored in 32-bit little-endian words. If frame size is 8 bytes long then repeat previous frame otherwise proceed to frame decoding.

Frame header

 bytes  0- 7 - should be ignored
 bytes  8-11 - 'FPSx'
 bytes 12-15 - offset to the Y plane (minus 8), should be always 16
 bytes 16-19 - offset to the U plane (minus 8)
 bytes 20-23 - offset to the V plane (minus 8)

Plane format

First 256 words (1 kB) of plane data are symbol frequencies used to construct Huffman tree. The rest of data represents bitstream packed into 32-bit words (but actually the lowest bit is ignored in decoding).

Lines are coded as difference to the previous lines. For Y plane the line with index -1 should contain all zeroes, for chroma planes - all 128.