Lossless Capture with FFmpeg I’ve been attempting to do lossless game capture as I’ve been working on a program to do frame rate analysis. I haven’t had much luck finding a program that does lossless capture as AmaRecTV, Dxtory, and Virtualdub all seem to be abandoned.  I’m trying to use FFmpeg and have come up with the following command:

ffmpeg -y -f dshow -rtbufsize 500M -i video="Game Capture 4K60 Pro Video 01" -framerate 60 -vsync 0 -c:v libx264 -preset ultrafast -crf 0 -pix_fmt yuv420p "e:\Captures\out.mkv"

Unfortunately, the file size doesn’t seem large enough to be lossless.  For example, according to MediaInfo, I got an overall bit rate of 132 Mb/s (16.5 MB/s) for a 720p 60 fps capture.  However, I’m pretty sure that a lossless 720p, 60 fps, 4:2:0 file should be closer to 640 Mb/s (80MB/s).

I’m using Windows 10 1809 x64, a nightly build of FFmpeg x64 that is newer than 4.0.2, Nvidia 399.24, and an Elgato 4K60 Pro.

Does this command produce lossless capture?  And how can I improve it?
libx264 is a very efficient encoder, so that bitrate isn't unusual. In fact, it's on the higher side, but since you're capturing a game, I expect there is constant motion involved, and your preset is ultrafast which disables some of the aggressive compression.

When you say 80MB/s, I believe you're thinking of uncompressed full raster i.e. 1280 x 720 x 12 bits/pixel x 60 fps. Lossless does not mean uncompressed, just like there can be a compressed ZIP of a binary program.



BTW, the -framerate 60 goes before -i video="Game Capture 4K60 Pro Video 01" as it's an input option.