How to Use the FFmpeg kerndeint Filter

This guide explains how to use the kerndeint (Kernel Deinterlacer) filter in FFmpeg to deinterlace video footage. You will learn the basic syntax of the filter, understand its key parameters such as threshold and field order, and see practical command-line examples to help you achieve clean, progressive video output.

What is the kerndeint Filter?

The kerndeint filter is a motion-adaptive deinterlacer. Instead of deinterlacing the entire frame, it analyzes the video and only applies deinterlacing to areas where motion is detected, preserving the maximum amount of detail in static areas of the video.

Basic Syntax

The basic syntax for applying the kerndeint filter in an FFmpeg command is as follows:

ffmpeg -i input.mp4 -vf "kerndeint=parameter1=value1:parameter2=value2" output.mp4

If you want to use the default settings, you can simply call the filter by name:

ffmpeg -i input.mp4 -vf kerndeint output.mp4

Filter Parameters

You can customize the deinterlacing behavior using the following parameters:

Practical Examples

Example 1: Standard Deinterlacing with Default Settings

To deinterlace a video using the default parameters (threshold of 10, bottom field first, no sharpening):

ffmpeg -i input.ts -vf kerndeint output.mp4

Example 2: Deinterlacing Top Field First (TFF) Video with Custom Threshold

If your source video is Top Field First (common for 1080i HD video) and you want a more sensitive motion threshold of 8 to capture subtle movement:

ffmpeg -i input.mts -vf "kerndeint=threshold=8:order=1" output.mp4

Example 3: Enabling Sharpening

To deinterlace a video while applying the built-in sharpening tool to keep the moving edges crisp:

ffmpeg -i input.ts -vf "kerndeint=sharp=1" output.mp4

Example 4: Visualizing the Deinterlaced Areas (Map Mode)

To check which parts of your video frame are being affected by the filter, run the command with the map parameter enabled:

ffmpeg -i input.ts -vf "kerndeint=map=1" output_map.mp4

In the output video, all deinterlaced pixels will appear bright white, helping you adjust the threshold value to your liking.