Interlaced video sends each picture as two half-pictures called fields. One field carries the odd-numbered lines and the next carries the even-numbered lines, and in PAL countries such as Australia a new field arrives every fiftieth of a second. Deinterlacing is the job of turning those fields back into whole pictures for a screen that draws every line at once. Done badly, or not at all, it leaves comb teeth on everything that moves.
The problem interlacing solved
Television was designed around the cathode ray tube. A beam of electrons sweeps across the screen one line at a time, top to bottom, and the phosphor it hits glows for a moment and then fades. Draw the whole picture 25 times a second and motion looks fine, but the screen flickers badly, because each patch of phosphor is dark for most of the time between visits. The flicker becomes hard to see at around 50 refreshes a second.
Sending 50 complete pictures a second would have fixed it, at twice the bandwidth, and radio spectrum was the one thing broadcasters couldn’t make more of. So the engineers of the early 1930s split the difference. On one pass the beam draws only every second line. On the next pass it draws the lines in between. The screen is refreshed 50 times a second from top to bottom, and the signal carries no more than 25 full pictures’ worth of lines.
Fritz Schröter of Telefunken patented the idea in Germany in 1930, and Randall Ballard of RCA patented it in the United States in 1932. Every analogue television system that followed used it, and so did everything built to feed a television: VHS, camcorders, DVD. The rate was matched to the mains, 50 fields a second where the electricity supply is 50 Hz and 60 where it is 60 Hz, so that interference from the power supply stood still on the screen instead of rolling through the picture.
Cinema met the same problem and solved it mechanically. Film runs at 24 frames a second, and the projector’s shutter flashes each frame onto the screen two or three times.
Fields and frames
Each pass down the screen is a field, and two fields make a frame. The field that holds the very top line of the picture is the top field: lines 1, 3, 5 and so on. The other is the bottom field.
| PAL (Australia, Europe) | NTSC (North America, Japan) | |
|---|---|---|
| Lines in the signal | 625 | 525 |
| Lines of picture | 576 | 480 |
| Frames a second | 25 | 29.97 |
| Fields a second | 50 | 59.94 |
| Picture lines in each field | 288 | 240 |
| Written as | 576i | 480i |
The “i” stands for interlaced. A “p”, as in 720p or 1080p, stands for progressive: every line of every frame, sent in order, which is how computers, phones and streaming video work.
Two moments in every frame
Here is the detail that causes all the trouble later. A video camera doesn’t take one snapshot and split it in two. It exposes each field separately. The second field is half of a new snapshot, taken a fiftieth of a second after the first.
So interlaced video is really 50 pictures a second, each with half the lines. That is why home video and live sport have a fluid, immediate look that film doesn’t: they sample motion twice as often.
On a tube television none of this shows. Only one field is on the screen at a time, each fading as the next is drawn, and the eye joins them up.
Film shown on television is the exception. Each film frame is scanned once and shared between two fields, so both halves come from the same moment. For PAL the film is simply run at 25 frames a second, four per cent fast.
What the trick cost, even on a tube
Fine horizontal detail that falls on a single line exists in only one of the two fields, so it is drawn 25 times a second and flickers. Engineers call this interline twitter. It is why television graphics avoided hairline horizontal rules, and why cameras soften the picture slightly in the vertical direction. Interlacing delivers the full line count on a still picture and rather less than that on a moving one.
What goes wrong on a modern screen
An LCD or OLED panel, and every video file on a computer, is progressive: a frame is shown all at once, every line together. Store the two fields in one frame and show it that way, and anything that moved between the fields appears in two places at once, on alternate lines. Edges break into comb teeth. Parts of the picture that didn’t move look perfect.
One thing makes it permanent. Resizing an interlaced frame as though it were a single picture blends the fields into each other, and after that the comb is part of the picture: no deinterlacer can cleanly take it out. The rule is to deinterlace first and resize afterwards.
Deinterlacing: the ways to do it
At any one moment, half the lines of an interlaced picture were never recorded. A deinterlacer has to supply them, and every method is a different guess.
| Method | What it does | What you get |
|---|---|---|
| Weave | Meshes the two fields together as they were stored | Full detail on anything still, and a perfect result on film. Combs on anything that moves |
| Discard | Keeps one field, throws the other away and stretches what is left | No combing. Half the vertical detail and half the motion are gone |
| Blend | Averages the two fields | No combing. Moving things leave a ghost and the whole picture softens |
| Bob | Builds a full frame from each field, filling the missing lines from the lines above and below | Every moment kept, so motion stays fluid at 50 frames a second. Still detail is softer, and fine horizontal edges can shimmer |
| Motion-adaptive Yadif, bwdif |
Compares neighbouring fields. Where nothing changed it weaves; where something moved it fills in from nearby lines | Sharp where the picture is still and clean where it moves. The sensible default, and fast enough to run live |
| Motion-compensated QTGMC |
Tracks how things moved between fields and rebuilds each missing line from where the detail went | The best results available, and the favourite of people restoring tapes. Slow, so it is run afterwards on a saved capture |
Yadif stands for “yet another deinterlacing filter”, which undersells it. It is built into FFmpeg, OBS Studio and VLC, and it is what most people are using when they deinterlace without thinking about it. bwdif, the “Bob Weaver” filter, is a newer relative in FFmpeg that usually handles fine detail a little better.
25 or 50: what happens to the motion
Whatever the method, there are two ways to hand the result over.
- Single rate makes one frame from each pair of fields: 25 frames a second for PAL. It plays on anything, and it drops every second moment, so motion is a little less fluid than the tape looked on a television.
- Double rate makes a frame from every field: 50 frames a second, with all the motion kept. The files are bigger, though nowhere near twice the size.
In FFmpeg, for a capture that still has its fields, the choice comes down to one word:
ffmpeg -i capture.mkv -vf yadif -c:v libx264 -crf 18 -c:a copy out-25p.mkv
ffmpeg -i capture.mkv -vf bwdif -c:v libx264 -crf 18 -c:a copy out-50p.mkv
yadif on its own gives one frame per frame (yadif=1 gives one per field), and bwdif on its own gives one per field.
Field order
A deinterlacer has to know which field came first. Both filters assume the top field unless the file says otherwise, which is usually right for analogue PAL captures. DV camcorder footage is bottom field first. Get it wrong and motion judders, two steps forward and one back, and the fix is to say so: yadif=parity=bff.
Where this meets a VHS transfer
A VHS tape is interlaced through and through. Each diagonal stripe a video head lays down on the tape is one field. A PAL head drum turns 25 times a second and carries two heads, so 50 stripes go past every second: 50 fields. Our lesson on which way the head drum spins has the drawing.
When a tape is captured, the capture device digitises both fields of each frame into one 720 × 576 picture. From there, there are two ways to go.
- Deinterlace while capturing. This is what our DIY VHS guide does, with the Yadif filter built into OBS Studio. The file that comes out is progressive and plays correctly on anything. The cost is that the choice is baked in: at 25 frames a second every second moment is gone, and a better deinterlacer can’t be tried later.
- Keep the fields and deinterlace afterwards. The careful route captures the interlaced frames untouched, with software built for the job, and deinterlaces a copy later with the best tool available. It keeps every moment and it can be redone as the tools improve. It needs more disk space, more steps and more patience.
For getting family tapes onto a screen, the first way is a fair trade and the result looks good. For a tape that matters, the second way is part of what the higher levels of transfer are for.
In OBS the setting lives on the source: right-click it and choose Deinterlacing. Discard, Blend and Yadif are the methods in the table above, and Linear is a bob. The versions marked 2x make a frame from every field, which only pays off if OBS itself is set to 50 frames a second. The same menu sets the field order.
Why interlacing outlived the tube
Interlacing was built for a display that is no longer made, and it is still everywhere. DVD video is 576i or 480i. When high-definition broadcasting arrived it took the same bargain again: 1080i sends 1,080 lines as two fields, and it remains the most common HD broadcast format. Every flat-panel television therefore has a deinterlacer inside it, quietly working on anything interlaced that arrives.
Newer formats have dropped it. 4K television standards and streaming video are progressive from camera to screen. Interlacing is now mostly something you meet when you go back for old recordings, which is exactly when it helps to know what the two half-pictures are.
The short version
- Interlaced video stores every frame as two fields, taken a fiftieth of a second apart in PAL.
- It was invented to stop tube televisions flickering without doubling the bandwidth.
- A modern screen shows both fields at once, so anything that moved grows comb teeth.
- Deinterlacing guesses the missing lines. A motion-adaptive filter such as Yadif or bwdif is the sensible default.
- 50 frames a second keeps all the motion. 25 keeps half of it.
- Deinterlacing can’t be undone, so keep an interlaced original of anything that matters.
Got tapes to get through?
Our DIY guide walks through capturing VHS with an ordinary VCR and a USB capture stick, deinterlacing included. If you would rather hand the box over, we do the same job as a service in Sydney.