

The -probesize is there to give the encoder enough initial data to allow it to analyse the input streams. It is the -crf 0 option that makes the capture lossless. Using MP4 as the container seems to be faster, so for high-res screen-only demos, this is the best choice. c:v libx264rgb -crf 0 -preset ultrafast \ Lossless H.264 video: ffmpeg -hide_banner \ The capture file will be largish (around 20MB per minute), and will require some further encoding once the capture/editing is completed to reduce the file sizes. It is also one of the best supported codecs for compatibility.

Of the lossless codecs tested it had the best combination of file size (way smaller than HuffYUV) and speed (can mostly keep up with the capture even on my old laptop).

Some quick testing suggests H.264 in lossless mode seems to be the the best option. The aim here is to capture at the highest quality possible with minimal CPU usage (so that the capture can keep up without dropping frames, and to leave some head room for other processes).

Using FFplay to display the difference between two videos.Hardware accelerated capture via VAAPI (Linux).
