What is some good lossless video codec for recording gameplay?

15,695

There's the open-source Huffyuv codec, which is specifically intended as a video capture format. It is available as a Video for Windows codec as well as from ffmpeg (whence VLC's support). Despite the name, it supports RGB. It is very fast (in terms of CPU time), but in my experience, it doesn't compress much. If you think disk speed and not CPU speed is the bottleneck, try a different codec.

Alternatively, try Lagarith (more info, home page), also open-source. Lagarith is a bit more CPU-intensive than Huffyuv, but gives better compression. It also supports multithreaded encoding:

Lagarith settings

Which is optimal depends on the relative speed of your CPU and hard drive; try both and see which is faster. If your CPU is especially fast, also try FFV1.

Share:
15,695

Related videos on Youtube

Grumpy ol' Bear
Author by

Grumpy ol' Bear

A meta-level binary dude embedded to a multimedia proxy world! Now we are all sons of bitches. - Kenneth Tompkins Bainbridge Patria O Muerte! - Ernesto 'Che' Guevara One useless man is a shame, two is a law firm, three or more is a congress. - John Quincy Adams Information is the currency of democracy. - Thomas Jefferson Now git of me goddamned lawn!

Updated on September 18, 2022

Comments

  • Grumpy ol' Bear
    Grumpy ol' Bear almost 2 years

    I'm an avid gamer and I like to record my gameplay. Usually I've been using Fraps to do it, however I'm thinking of switching to Dxtory as it allows to write on multiple HDDs at once.

    Say I have 3 HDDs with the following write speeds: HDD1 with 50 mb/s, HDD2 with 22 mb/s and HDD3 with 45 mb/s. Combined write speed would be: 117 mb/s.

    Dxtory allows you to utilize all 3 HDD's at once while recording your gameplay.

    Using this formula:

    RGB24 YUV24: Width x Height x 3 x fps = bitrate (byte/sec)

    YUV420: Width x Height x 3 / 2 x fps = bitrate (byte/sec)

    YUV410: Width x Height x 9 / 8 x fps = bitrate (byte/sec)

    And recording in YUV420 colorspace at 1920x1080 with 30 fps I'd need about 95 mb/s write speed. Dxtory is good because it allows me to play with constant 60 fps while recording in 30 fps. Fraps does not (even though they say it does), once you start recording with Fraps, the game's fps drops.

    So I'm looking for a codec that doesn't need a very high write speed (bitrate) yet records in good (lossless) quality.

    Dxtory comes with its own codec, the Dxtory codec. Which allows me some experimentation. Fraps has it's own codec which I can use in Dxtory to expirement around.

    I also came across http://lags.leetcode.net/codec.html .

    Are there more lossless codecs out there (besides Fraps' and Dxtory's) which are good for what I want to do?

    Edit:

    To clarify, yes, I'm aware a lossless codec always has "good" quality. But that's not what I'm looking for.

    Let me take the Fraps codec and Dxtory codec to clarify what I'm looking for.

    • When I record with the Dxtory codec in RGB colorspace at 1920x1080 with targeted 30 fps, I can play the game at 60 fps, BUT I'm recording with 10-15 fps, that's because RGB with Dxtory needs much, much more write speed than my hdd can handle.

    • When recording with Dxtory codec in YUV410 colorspace at 1920x1080 with targeted 30 fps, I can play at 60 fps and record at 30 fps, again, that's because YUV410 in Dxtory's codec takes much, much less write speed than RGB

    • When recording with Fraps codec in ??? (I dunno the color space Fraps records in, I guess YUV420), I can play with 60 fps and record with 30 fps.

    What I'm looking for is a lossless codec that can record in YUV420 (or even RGB??) which does not exceed a write speed (or bitrate if you will) of 100 mb/s in 1920x1080 or in other words, which will allow me to record in constant 30fps.

    Obviously the best solution would be to buy an SDD, but that's not what I'm after.

    • slhck
      slhck about 12 years
      For those voting to close as "not constructive". The inclusion of the word good doesn't automatically make a question subjective. @Don Salva, a lossless codec always has good quality, because it's a visually equivalent copy of the original bitstream – so is your emphasis rather on performance?
    • Grumpy ol' Bear
      Grumpy ol' Bear about 12 years
      Yes, but that's not what I'm looking for in a different lossless codec. I'll explain in an /edit.
    • slhck
      slhck about 12 years
      Well there's a difference between mathematically lossless and visibly lossless, that's all. For the latter class, there are many codecs from the broadcasting industry.
  • Saif Bechan
    Saif Bechan over 11 years
    Hi, I am just starting out with gameplay recording, maybe you can set me on the right track. WHat software should I use to record in FFV1 format, do you know of a tutorial on setting this up. I have a high quality PC, so that is no problem.
  • Mechanical snail
    Mechanical snail over 11 years
    @SaifBechan: It's available as part of ffmpeg/libav. What operating system are you using?