With the right field order, field-rate deinterlacing gave 50 frames per second with an even 8 px step every frame. With the field order reversed, there was no visible combing, but the marker moved back 8 px then forward 24 px on every pair of frames and PSNR fell by about 10.6 dB.
Why interlaced footage still turns up
Interlaced video stores each frame as two fields: the even lines and the odd lines, captured at different moments. In 25i, the fields are 1/50 of a second apart. On a CRT that looked like smooth 50-per-second motion. On a computer screen, if the two fields are shown together, any movement produces comb-shaped edges.
You still meet this in tape captures, older camcorder files, some broadcast recordings and capture-card output labelled 1080i or 576i. Deinterlacing turns that into progressive frames. Two decisions matter: whether you output one frame per frame (25p) or one per field (50p), and whether the software knows which field came first. This guide measures both with FFmpeg's yadif and bwdif filters on a test clip where the right answer is known.
For what happens to motion when you change frame rates after deinterlacing, see the frame-rate conversion judder test.
A test clip with known motion
Real footage cannot tell you exactly where an object should be in each field. So I generated a 50p ground-truth clip: FFmpeg's testsrc2 pattern at 640x360 with a black band holding a 12 px wide white marker that moves exactly 8 px every 1/50 s.
ffmpeg -threads 4 -f lavfi -i testsrc2=s=640x360:r=50:d=6 -f lavfi -i color=c=white:s=12x40:r=50:d=6 -filter_complex "[0]drawbox=x=0:y=304:w=640:h=56:color=black:t=fill[bg];[bg][1]overlay=x='mod(8*n,620)':y=312:eval=frame,format=yuv420p" -c:v ffv1 src50p.mkvThen I wove each pair of 50p frames into one interlaced 25i frame, top field first, and stored it losslessly with x264 in interlaced mode:
ffmpeg -threads 4 -i src50p.mkv -vf "tinterlace=mode=interleave_top,setfield=tff" -c:v libx264 -qp 0 -preset medium -flags +ildct+ilme -x264-params tff=1 -r 25 tff25i.mkvA bottom-field-first copy and a progressive 25p copy (every second source frame) were made the same way. Every deinterlaced output was written to lossless FFV1 and measured in numpy against the matching 50p source frames:
ffmpeg -threads 4 -i tff25i.mkv -vf yadif=mode=1 -c:v ffv1 out/tff_yadif_mode1.mkvThe marker position is its brightness-weighted centre in the band. A step is the change between consecutive output frames. Comb is the mean difference between each line and the average of its neighbours, in 8-bit levels; a progressive frame still scores above zero because of real vertical detail. PSNR is luma only.
What idet reported, and where it failed
FFmpeg's idet filter guesses whether frames are interlaced and which field comes first by comparing lines.
ffmpeg -i tff25i.mkv -vf idet -an -f null -| Input | TFF | BFF | Progressive |
|---|---|---|---|
| 25i top field first | 150 | 0 | 0 |
| 25i bottom field first | 0 | 150 | 0 |
| 25p progressive, full frame | 82 | 48 | 20 |
| 25p progressive, marker band only | 0 | 0 | 150 |
The counts are single-frame detection; multi-frame detection was close (85, 45 and 20 for the full progressive frame). Both interlaced files were identified correctly on every frame. The progressive file was not: on the full frame, idet called most frames interlaced. When I cropped to the black band with the moving marker, it called all 150 frames progressive. The original 50p source was misread as well (169 TFF, 104 BFF, 25 progressive, 2 undetermined).
Something in the busy testsrc2 pattern fooled the detector, and I did not isolate what. The safe conclusion is narrow: idet is a heuristic. It is useful evidence when it agrees with the file's metadata and with what you see, not proof on its own. Run it on a section with real motion, and look at a paused frame before deinterlacing anything.
yadif and bwdif, frame rate and field rate
| Output | Frames, rate | Marker step | Comb, full frame | Comb, marker band | PSNR |
|---|---|---|---|---|---|
| Source frames (reference) | - | 8 px per 1/50 s | 1.566 | 0.177 | - |
| Interlaced, no filter | 150, 25 | fields 8 px apart | 3.162 | 4.797 | 26.09 dB |
| yadif mode=0 | 150, 25 | 16 px every frame | 1.240 | 0.118 | 33.82 dB |
| yadif mode=1 | 300, 50 | 8 px every frame | 1.241 | 0.138 | 33.85 dB |
| bwdif mode=0 | 150, 25 | 16 px every frame | 1.124 | 0.094 | 34.53 dB |
| bwdif mode=1 | 300, 50 | 8 px every frame | 1.125 | 0.113 | 34.52 dB |
Without a filter, the marker band's comb score was 4.797 against 0.177 in the source, which is the combing you see. Both filters removed it. Their comb scores came out below the source's own value because the lines each filter rebuilds are interpolated, which softens vertical detail. A lower comb number here does not mean a sharper picture.
Mode 0 (send_frame) keeps the 25 frame rate and moves the marker 16 px per frame. Mode 1 (send_field) outputs 50 frames per second and recovers the even 8 px step of the original capture. If the footage has fast motion and the delivery can be 50p (or 59.94p for 60i material), field rate keeps the motion the camera actually recorded. Mode 0 throws half of it away.
On this clip, bwdif scored about 0.7 dB higher PSNR than yadif in both modes. That is a single synthetic test. It does not prove bwdif is better on real footage, though it agrees with the filter's design, which uses more neighbouring lines.

Wrong field order: clean frames, broken motion
To test a wrong setting, I forced the field order to bottom first on the top-first file:
ffmpeg -threads 4 -i tff25i.mkv -vf yadif=mode=1:parity=bff -c:v ffv1 out/tff_yadif_mode1_wrong_parity_bff.mkvThe result was not what most people look for. There was no combing: the band comb score was 0.138, identical to the correct yadif output, and the still frame above looks fine. The damage was in time. The marker positions ran 21.5, 13.5, 37.5, 29.5, 53.5, 45.5 px instead of 13.5, 21.5, 29.5, 37.5. Each pair of frames moved back 8 px and then forward 24 px; 150 of the 299 steps went backwards. PSNR against the true frames fell from 33.85 dB to 23.23 dB. bwdif with the wrong order produced the same step pattern and 23.20 dB.

So a wrong field order shows up on playback as jitter or a shimmering, back-and-forth look on moving edges, not as combs. The check is to step through a pan or a moving object one frame at a time after deinterlacing to 50p. If an object moves back every other frame, flip the parity.
With the order left on auto, the filter read the flags in the file. A bottom-first copy processed with plain yadif=mode=1 moved exactly 8 px per frame, with 33.87 dB PSNR. Auto works when the flags are right. It cannot fix flags that were wrong at capture or lost during an earlier conversion.
Deinterlacing progressive footage by mistake
Deinterlacing a file that was never interlaced is not harmless. With the default deint=all, yadif mode 0 changed every frame of the progressive copy and dropped it from an exact match to 34.58 dB PSNR; bwdif gave 35.34 dB. yadif in mode 1 doubled the frame count to 50 but added no motion: the marker steps alternated between 0 and 16 px, so every frame was shown twice with a slight vertical softening.
Setting yadif=mode=0:deint=interlaced made the filter pass the progressive frames through untouched, because they were not flagged as interlaced. That option only helps if the flags are right, which is the same caveat as above.
Practical checklist and downloads
- Check before filtering. Read the field order with
ffprobe -show_entries stream=field_order, run idet on a moving section, and pause on motion. Treat disagreement as a warning. - Use field rate when the motion matters:
bwdif=mode=1oryadif=mode=1for 25i to 50p. - Verify the field order by stepping through motion, not by looking for combs. Wrong order is clean in a still frame.
- Do not deinterlace progressive material, or use
deint=interlacedwhen the flags can be trusted. - Deinterlace once, before scaling, cropping or frame-rate changes, so the filter sees the original field lines.
Samples to inspect yourself:
- The 25i top-field-first input (lossless, the exact measured file in MP4)
- bwdif mode=1 output, 50p
- yadif mode=1 with the wrong field order, 50p
- All commands, measurements and SHA-256 hashes (JSON)
The two 50p downloads were re-encoded with x264 at CRF 20 to keep them small. All measurements were made on the lossless FFV1 outputs, not on these MP4s.
What this test does not show
The source is a synthetic 640x360 pattern with one marker moving at constant speed. Real interlaced footage brings noise, tape dropouts, mixed cadences and telecined film, which none of this covers. Field-matching filters for telecined material, QTGMC, hardware deinterlacers and editing applications were not tested, and neither was how any player or TV handles the output. The idet misdetection on the progressive pattern is reported as observed; I did not determine its cause. One more note: ffprobe reported the MKV masters' field order as tb and bt while the decoded frames carried the expected top-first and bottom-first flags, and the MP4 copy reports tt. I have not investigated that tag difference.
Common questions
Should I use yadif or bwdif?
On this synthetic test both removed combing, and bwdif scored about 0.7 dB higher PSNR in both frame and field mode. The test used one source, so try both on your own footage and look at moving edges.
What is the difference between yadif mode 0 and mode 1?
Mode 0 outputs one frame per interlaced frame, so 25i becomes 25p and half the motion samples are lost. Mode 1 outputs one frame per field, so 25i becomes 50p. In this test, mode 1 restored the even 8 px step of the original motion.
How do I know if the field order is wrong?
Step through motion frame by frame after deinterlacing to field rate. With the wrong order in this test, objects moved back 8 px and then forward 24 px on every pair of frames. Still frames looked clean, with no combing.
Can I trust FFmpeg idet to detect interlacing?
Not on its own. It identified both interlaced test files correctly but called most frames of a progressive test pattern interlaced. Cropped to the moving area, it called them progressive. Combine it with the file flags and a visual check.
Does deinterlacing hurt progressive video?
Yes, in this test. Deinterlacing a progressive file with the default settings lowered it from an exact match to about 34.6 dB PSNR with yadif and 35.3 dB with bwdif. yadif with deint=interlaced left the unflagged frames untouched.
Sources & further reading
Written for ToolWillow with original explanations and examples. Consult current product documentation for controls that vary by version.



