Deinterlace an interlaced video
Interlaced video splits each frame into two fields captured 16ms apart. Modern displays are progressive, so interlaced content shows combing artifacts on motion. The yadif filter deinterlaces by interpolating one field from the other, removing the artifact without re-encoding the static parts of the image.
The command
ffmpeg -i in.ts -vf yadif -c:v libx264 -crf 18 out.mp4What it does
`yadif` reads each field pair from the interlaced source, decides which field to drop, and reconstructs a full progressive frame at the original frame rate. `yadif=1` runs in send-frame mode (default), which is faster; `yadif=0` runs in send-field mode, which is more accurate on bad sources. The output plays as a normal progressive video on any modern player.
Requirements
A video encoded with interlaced fields. Some cameras flag their output as interlaced even when the content is progressive — yadif is harmless on those, just unnecessary. No hardware, no special build flag, yadif is in the standard libavfilter set.
Things to avoid
- Forgetting `-c:v` and letting FFmpeg pick a default encoder. The default on most builds is `mpeg4`, which will produce a much larger file than `libx264` at the same quality.
- Running yadif twice, once on the input and once on the filter chain. The second pass has nothing to deinterlace and just costs time.
- Expecting the output frame rate to double. yadif deinterlaces without changing the frame rate, so a 30i source becomes a 30p output, not 60p.
- Confusing yadif with bwdif (bob weaver deinterlace). bwdif is the right choice for telecined content, not plain interlaced.