Fraps: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(")
(v3 was found and fixed , update)
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
* FourCC: FPS1
* FourCC: FPS1
* Company: [[Fraps (Company)|Fraps]]
* Company: [[Fraps (Company)|Fraps]]
* Samples: [http://www.mplayerhq.hu/MPlayer/samples/V-codecs/FPS1/ http://www.mplayerhq.hu/MPlayer/samples/V-codecs/FPS1/]
* Samples: [http://samples.mplayerhq.hu/V-codecs/FPS1/ http://samples.mplayerhq.hu/V-codecs/FPS1/]


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 6 known versions of the codec: 0, 1, 2, 3, 4, and 5. All versions occur with the same FourCC.  


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.
== Header ==
A Fraps video frame begins with a header that is either 4 or 8 bytes in length:


[[Category:Incomplete Video Codecs]]
byte 0    version
[[Category:Video Codecs]]
bytes 1-2  unknown
byte 3    flags
 
If bit 6 of byte 3 is set (byte & 0x40) then there are an additional 4 header bytes before the video data. The meaning of these 4 bytes is unclear.
 
Bit 7 of the flags byte indicates when set that the current frame is unchanged from the previous frame.
 
== Version 0 ==
Version 0 Fraps data is planar [[YUV 4:2:0]] video data stored in an interleaved manner. The payload bytestream is formatted at:
 
  y0 y1 y2 y3 cb0 cr0 y4 y5 y6 y7 cb1 cr1
 
Which will map to:
 
Y plane:
  y0 y1  y4 y5
  y2 y3  y6 y7
 
C<sub>b</sub> plane:
  cb0    cb1
 
C<sub>r</sub> plane:
  cr0    cr1
 
== Version 1 ==
Version 1 Fraps data is 24-bit BGR data stored in an upside-down order, similar to the way that Microsoft [[BMP]] files store their data.
 
== Version 2 ==
Version 2 Fraps data stores YUV data with a [[Huffman]] scheme.
 
All data is stored in 32-bit little-endian words.
If the total frame size is 8 bytes long then repeat the 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 always be 16
  bytes 16-19  offset to the U plane (minus 8)
  bytes 20-23  offset to the V plane (minus 8)
 
=== Huffman tree construction ===
The Huffman tree is built by the canonical algorithm:
* sort symbols by their counts in ascending order
* create node by joining two first nodes (or leaves)
* place the node just before the node with a count greater than this new node.
 
'''WARNING''' If symbols have a zero count they should also be included in the tree. The Huffman tree for this codec always has 256 leaves.
 
=== Plane format ===
First 256 words (4 byte each, 1 kB total) of plane data are symbol frequencies used to construct the Huffman tree. The rest of the data represents the bitstream packed into 32-bit words, MSB first.
 
Lines are coded as the difference from the previous lines. For Y plane the line with index - 1 should contain all zeroes; for chroma planes - all 128.
 
== Version 3 ==
Version 3 Fraps data, according to investigations, appears to be identical to v5 and can be decoded by the same algorithm.
 
== Version 4 ==
Version 4 Fraps data, according to investigations, appears to be identical to v2 and can be decoded by the same algorithm.


== Version 5 ==
Version 5 Fraps data is the same as version 4, but encodes planar RGB24 upside-down.
For better compression ratio red and blue components are stored as a differences to the green component.


<div id="nolabel" style="overflow:auto;height:1px;">
[[Category:Video Codecs]]
Pharmacy themes
[[Category:Screen Capture Video Codecs]]
This very nice Pharmacy:
Order tramadol, Search over 500,000 pharmacy Archive [http://www.zorpia.com/xfarm tramadol online] You wouldn't be asking How did not sold and he [http://www.geocities.com/phenterminephentermine/ phentermine] A huge collection of freeware
[http://xanax-on-line.umaxnet.com/ xanax on line]  
[http://2mg-xanax.umaxnet.com/ 2mg xanax] mean the events in this-wait [http://generic-xanax.umaxnet.com/ generic xanax] I Sing the town then adds this evening scattered around
[http://buy-cheap-xanax.umaxnet.com/ buy cheap xanax]
[http://buy-xanax-online.umaxnet.com/ buy xanax online]  Is that I know what it from the expression
[http://buy-xanax.umaxnet.com/ buy xanax]  
</div>

Latest revision as of 12:46, 13 December 2008

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 6 known versions of the codec: 0, 1, 2, 3, 4, and 5. All versions occur with the same FourCC.

Header

A Fraps video frame begins with a header that is either 4 or 8 bytes in length:

byte 0     version
bytes 1-2  unknown 
byte 3     flags

If bit 6 of byte 3 is set (byte & 0x40) then there are an additional 4 header bytes before the video data. The meaning of these 4 bytes is unclear.

Bit 7 of the flags byte indicates when set that the current frame is unchanged from the previous frame.

Version 0

Version 0 Fraps data is planar YUV 4:2:0 video data stored in an interleaved manner. The payload bytestream is formatted at:

 y0 y1 y2 y3 cb0 cr0 y4 y5 y6 y7 cb1 cr1

Which will map to:

Y plane:

 y0 y1  y4 y5
 y2 y3  y6 y7

Cb plane:

 cb0    cb1

Cr plane:

 cr0    cr1

Version 1

Version 1 Fraps data is 24-bit BGR data stored in an upside-down order, similar to the way that Microsoft BMP files store their data.

Version 2

Version 2 Fraps data stores YUV data with a Huffman scheme.

All data is stored in 32-bit little-endian words. If the total frame size is 8 bytes long then repeat the 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 always be 16
 bytes 16-19   offset to the U plane (minus 8)
 bytes 20-23   offset to the V plane (minus 8)

Huffman tree construction

The Huffman tree is built by the canonical algorithm:

  • sort symbols by their counts in ascending order
  • create node by joining two first nodes (or leaves)
  • place the node just before the node with a count greater than this new node.

WARNING If symbols have a zero count they should also be included in the tree. The Huffman tree for this codec always has 256 leaves.

Plane format

First 256 words (4 byte each, 1 kB total) of plane data are symbol frequencies used to construct the Huffman tree. The rest of the data represents the bitstream packed into 32-bit words, MSB first.

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

Version 3

Version 3 Fraps data, according to investigations, appears to be identical to v5 and can be decoded by the same algorithm.

Version 4

Version 4 Fraps data, according to investigations, appears to be identical to v2 and can be decoded by the same algorithm.

Version 5

Version 5 Fraps data is the same as version 4, but encodes planar RGB24 upside-down. For better compression ratio red and blue components are stored as a differences to the green component.