What You’ll Learn

  • How to deinterlace video with the yadif filter
  • Differences between mode values (0–3)
  • How to set field order with the parity option
  • How to tell whether a video is interlaced
  • How deinterlacing affects frame rate and what to do about it

Tested with: FFmpeg 6.1 (verified against real FFmpeg)
Platform: Windows / macOS / Linux


What is Interlacing?

Interlaced video splits each frame into odd lines (field 1) and even lines (field 2) and displays them alternately. The format is common in TV broadcasts (NTSC, PAL) and DV camera recordings.

Modern PC and smartphone displays are progressive, so playing interlaced video directly produces combing (interlace artifacts).


Basic Command

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

yadif defaults to mode=0 (one output frame per input frame).


The mode Option

ffmpeg -i input.mp4 -vf "yadif=mode=0" output.mp4
modeBehaviorFrame rate
0Output one frame per input frameUnchanged
1Output one frame per fieldDoubled
2Like mode=0, but checks frame type and only processes interlaced framesUnchanged
3Like mode=1, but checks frame typeUp to doubled

mode=0 is usually fine. Use mode=1 when you need 60i → 60p conversion.


60i → 30p (Halve the Frame Rate)

When converting Japanese TV broadcasts (1080i at 60Hz) to 30p:

ffmpeg -i input.mp4 -vf "yadif=mode=0" -r 30 output.mp4

60i → 60p (Preserve the Frame Rate)

ffmpeg -i input.mp4 -vf "yadif=mode=1" output.mp4

mode=1 emits one frame per field, producing 60fps progressive output.


The parity Option (Field Order)

ffmpeg -i input.mp4 -vf "yadif=mode=0:parity=0" output.mp4
parityDescription
-1Auto-detect (default, recommended)
0BFF (Bottom Field First) — common in NTSC broadcasts
1TFF (Top Field First) — common in PAL broadcasts and DV

-1 (auto) is usually the right choice.


How to Tell if Video is Interlaced

Use ffprobe to inspect the field order.

ffprobe -v quiet -show_streams -select_streams v:0 input.mp4 | grep field_order

If the output is tt (TFF), bb (BFF), tb, or bt, the video is interlaced. A progressive result means no deinterlacing is needed.


Higher-Quality Alternative to yadif

bwdif (Bob Weaver Deinterlacing Filter) produces better quality than yadif at the cost of more CPU:

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

Measured Example

This example converts a 1080i/29.97fps, 2-minute H.264 source to 30p-like progressive output with yadif=mode=0:

ffmpeg -i input.mp4 \
  -vf "yadif=mode=0:parity=-1" \
  -c:v libx264 -crf 23 -preset medium -c:a copy \
  output_30p.mp4

mode=0 does not increase the output frame count, so it is usually only a little heavier than a normal re-encode. On a typical 8-core desktop, processing may land around 1.2–2x real time.

With mode=1, the output frame count is roughly doubled, so encode time and file size tend to increase. Motion is smoother, but for 30p web delivery mode=0 is often easier to handle. Results vary by environment.

Check fast-moving edges such as scrolling titles, arms, balls in sports footage, or horizontal camera movement. If field order is wrong, motion can appear to wobble back and forth; compare a short segment with parity=0 and parity=1.


Frequently Asked Questions

yadif vs bwdif vs nnedi — which deinterlacer is best?

bwdif is yadif’s improved successor and the modern default. nnedi (neural-net) produces the cleanest result but is much slower. yadif is fine for quick batch jobs.

Should I deinterlace 60i to 30p or 60p?

60p (one progressive frame per field, mode=1) preserves motion fluidity. 30p (mode=0) is half the framerate and looks choppier but matches typical web targets.

Can I detect whether a video is interlaced first?

Yes — ffmpeg -i in.mp4 -filter:v idet -f null - analyses 200 frames and reports BFF/TFF/progressive counts. Run only when interlaced flags exceed progressive.

Will deinterlacing harm progressive footage?

Slightly — deinterlacers blur or duplicate fields they cannot find. Use idet to gate the filter and apply only to confirmed-interlaced streams.

Does deinterlacing change the resolution?

No — output dimensions match the input. Only the field combination changes. If the source is 1080i (1920×1080 interlaced), the output is 1920×1080 progressive.



Tested with ffmpeg 6.1 / Ubuntu 24.04 (検証スクリプトで実行確認) Primary sources: ffmpeg.org/ffmpeg-filters.html#yadif / trac.ffmpeg.org/wiki/Deinterlacing