Why is my export different (lagging video) from what I see in preview?

100% means lossless. There is no compression and quite a few video players will probably have difficulties playing the resulting file properly. If you want “Visually Lossless” (i.e. the human eye can’t see the difference) don’t go above 67%. From the ffmpeg website:

Lossless H.264

You can use -crf 0 to create a lossless video. Two useful presets for this are ultrafast or veryslow since either a fast encoding speed or best compression are usually the most important factors.

Fast encoding example:

ffmpeg -i input -c:v libx264 -preset ultrafast -crf 0 output.mkv

Best compression example:

ffmpeg -i input -c:v libx264 -preset veryslow -crf 0 output.mkv

Note that lossless output files will likely be huge, and most non-FFmpeg based players will not be able to decode lossless. Therefore, if compatibility or file size are an issue, you should not use lossless.

Tip: If you’re looking for an output that is roughly “visually lossless” but not technically lossless, use a -crf value of around 17 or 18 (you’ll have to experiment to see which value is acceptable for you). It will likely be indistinguishable from the source and not result in a huge, possibly incompatible file like true lossless mode.

2 Likes