Deinterlace video with FFmpeg: yadif, bwdif, nnedi, and the right choice
Convert interlaced video (1080i broadcast, legacy DV/HDV) to progressive for modern delivery. Three real deinterlacers with different speed/quality trade-offs.
When to use this
You deinterlace video when the source was captured for interlaced broadcast (1080i, 480i NTSC, 576i PAL) but the delivery target is progressive (modern web, OTT, mobile). Most broadcast camera output is still interlaced; legacy DV/HDV archives are universally interlaced. Modern streaming requires progressive scan — deinterlacing is the conversion step. Three real deinterlacers in FFmpeg: yadif (fast, default), bwdif (better quality, slightly slower), nnedi (best quality, much slower). The choice depends on quality bar and scale.
Command variants
ffmpeg -i input.mxf \
-vf yadif=1 \
-c:v libx264 -preset medium -crf 21 \
-c:a aac -b:a 192k \
output.mp4yadif=1 doubles the framerate (60i → 60p, preserves motion). yadif=0 keeps original framerate (60i → 30p, drops half the temporal samples).
ffmpeg -i input.mxf \
-vf bwdif=1 \
-c:v libx264 -preset medium -crf 21 \
-c:a aac -b:a 192k \
output.mp4bwdif (BobWeaver Deinterlacing Filter) handles complex motion better than yadif. ~30% slower; visible quality improvement on panning shots.
ffmpeg -i input.mxf \
-vf nnedi=weights=nnedi3_weights.bin:field=t \
-c:v libx264 -preset medium -crf 21 \
-c:a aac -b:a 192k \
output.mp4Neural-network deinterlacer. ~5-10× slower than yadif. Worth it for archive masters where quality matters most.
What each parameter does
yadif=modemode=0 outputs one progressive frame per pair of input fields (drops half temporal samples). mode=1 outputs one progressive frame per input field (doubles framerate, preserves motion).
bwdif=modeBWDIF deinterlacer. Same mode semantics as yadif. Better quality, slower.
nnediNeural-network deinterlacer. Requires weights file (nnedi3_weights.bin). Best quality on hard motion, ~5-10× slower than yadif.
field=tTop-field-first vs bottom-field-first. Most modern interlaced content is top-field-first; legacy NTSC tape is often bottom-field-first.
What this outputs
A progressive-scan video file. Quality varies dramatically by deinterlacer: yadif produces good results for most content; bwdif produces visibly better results on motion-heavy content; nnedi produces near-original quality at the cost of compute.
Pitfalls
- Field order matters: top-field-first vs bottom-field-first. Wrong choice produces double-image artifacts. ffprobe shows field order; or test with a 1-second clip first.
- Telecined content (24p film converted to 60i) needs inverse-telecine, not deinterlacing. Use pullup or fieldmatch filters instead.
- Already-progressive content with film grain triggers false-positive deinterlacing in some pipelines. Verify source is actually interlaced before applying.
- Halving framerate (yadif=0) loses motion information — visible on sports, news, anything with fast camera movement. Default to mode=1 unless the target requires the original framerate.
- NNEDI requires the weights file (nnedi3_weights.bin). Ship it alongside the FFmpeg binary or document the path explicitly in the pipeline.
At production scale
Deinterlacing dominates encode time on interlaced sources. yadif is roughly equivalent to scaling cost; bwdif adds 20-40%; nnedi multiplies encode time by 5-10×. For petabyte-scale archive migration of interlaced sources, yadif is typically the right default. For premium-quality master encoding (broadcast archive that must look as good as possible after migration), nnedi is justified despite the cost.
MpegFlow detects interlaced sources automatically and routes them to a deinterlacing stage in the DAG before main encoding. The deinterlacer choice is per-customer configurable — fast (yadif) for high-throughput archive migration, premium (nnedi) for master encodes.
- FFmpeg
- deinterlace
- Broadcast
- Archive migration
- video-operations