Deinterlace Video with FFmpeg w3fdif Filter

This guide explains how to deinterlace interlaced video using the Weston 3 Field Deinterlacing Filter (w3fdif) in FFmpeg. You will learn the command-line syntax for configuring this filter, how to select its mathematical weight parameters, and how to utilize the neural-network-backed nnedi3 filter if your workflow requires true deep-learning-based deinterlacing.

Deinterlacing with the w3fdif Filter

The w3fdif (Weston 3 Field Deinterlacing Filter) is an advanced deinterlacing filter designed by the BBC. It works by using temporal and spatial processing to interpolate missing lines in interlaced footage.

To use w3fdif with custom weight coefficients, you configure the filter parameter in your FFmpeg command.

FFmpeg w3fdif Command Example

ffmpeg -i input.mp4 -vf "w3fdif=filter=complex:deint=all" -c:v libx264 -crf 18 -c:a copy output.mp4

Parameter Breakdown


Alternative: Neural-Network-Based Deinterlacing (nnedi3)

While w3fdif uses advanced mathematical matrix weights, it is not a neural network. If you require a true neural-network-based deinterlacer in FFmpeg, you should use the nnedi3 filter. nnedi3 uses a third-generation intra-field deinterlacer based on a neural network structure and requires a custom weights file (nnedi3_weights.bin).

FFmpeg nnedi3 Command Example

ffmpeg -i input.mp4 -vf "nnedi3=weights='nnedi3_weights.bin':deint=all:qual=2" -c:v libx264 -crf 18 -c:a copy output.mp4

Parameter Breakdown