FFmpeg Yadif Mode Parameter Explained

This article explains the function of the mode parameter within FFmpeg’s yadif (Yet Another Deinterlacing Filter) filter. You will learn how this parameter controls the frame rate and processing behavior of the deinterlacing process, helping you choose the right setting for your video conversion needs.

The yadif filter is one of the most popular tools in FFmpeg for converting interlaced video (where images consist of alternating odd and even lines) into progressive video (where every frame is a complete image). The mode parameter is crucial because it dictates how the filter splits or combines these interlaced fields into progressive frames.

The mode parameter accepts four integer values (0, 1, 2, and 3), each representing a different deinterlacing strategy:

When choosing a mode, use mode=1 if you want the smoothest motion and do not mind a larger output file size due to the doubled frame rate. Use mode=0 if you need to keep the original frame rate and minimize file size while maintaining good overall image quality.