FFmpeg Yadif Deinterlace Double Frame Rate
This article provides a quick guide on how to use FFmpeg’s
yadif (Yet Another Deinterlacing Filter) to deinterlace
video files while doubling the frame rate. You will learn the specific
command-line parameters required to convert interlaced fields into
individual progressive frames, preserving the original motion smoothness
of your footage.
Interlaced video contains two fields captured at different points in time within a single frame. To convert this to progressive video without losing temporal resolution, you must perform “bob deinterlacing.” This process turns each field into a full frame, resulting in a video with double the original frame rate (for example, converting 29.97i to 59.94p).
To achieve this in FFmpeg, use the yadif filter with the
mode parameter set to 1 (or
send_field).
The FFmpeg Command
Use the following command structure to double the frame rate during deinterlacing:
ffmpeg -i input_interlaced.mp4 -vf "yadif=mode=1" output_progressive.mp4Parameter Breakdown
The yadif filter accepts several options, formatted as
yadif=mode:parity:deint. To customize the behavior,
understand these key settings:
mode: Controls how frames are output.0(orsend_frame): Outputs one frame for each frame. This merges fields and maintains the original frame rate (e.g., 30i to 30p).1(orsend_field): Outputs one frame for each field. This doubles the frame rate (e.g., 30i to 60p) and preserves smooth motion. This is the setting required for doubling the frame rate.
parity: Specifies the field dominance of the input video.0(ortff): Top field first.1(orbff): Bottom field first.-1(orauto): Automatically detects parity (default and recommended).
deint: Determines which frames to deinterlace.0(orall): Deinterlaces all frames (default).1(orinterlaced): Only deinterlaces frames marked as interlaced.
Example with Detailed Parameters
For the most reliable results, you can explicitly define the parameters. This command automatically detects field parity and deinterlaces all frames while doubling the frame rate, using the H.264 video codec for the output:
ffmpeg -i input_interlaced.mp4 -vf "yadif=mode=send_field:parity=auto:deint=all" -c:v libx264 -crf 20 -c:a copy output_progressive.mp4In this command, -c:v libx264 encodes the output video
using the H.264 codec, -crf 20 maintains high visual
quality, and -c:a copy copies the audio stream directly
without re-encoding to save processing time.