100fps: How to deinterlace Video the right way. Examples, Tricks, Comparisons

When is it harmful to deinterlace? When is it better to leave a picture interlaced?

There are a few (but important) cases when deinterlacing can give you unsatisfactory results.

 

When is deinterlacing bad?
1) Maybe it sounds stupid, but if you deinterlace a video which is not interlaced, then the result is worse than the source of course.

This sounds trivial, but consider the following:

  • Some TV channels can air movies in a non-interlaced (=progressive) state while airing the commercial breaks interlaced.
  • TV channels can air a music video clip interlaced and the next one non-interlaced. The same applies to commercials: One commercial is 25fps, the next one is 50fps.
  • TV channels can air the news interlaced, but the intro to the news (spinning globes etc) is not interlaced.
  • The professional coverage of the 11th September attacks by the Saudi Arabian terrorists on the World Trade Center is aired progressively but the amateur footage of the events is aired 50fps.
  • Vice versa a coverage may be 50fps, but changes to 25fps when old footage (e.g. World War 2 films with Hitler) is shown.
  • A program may be 25fps, but the ending credits are 50fps.
  • A program may be 25fps, but a change from one scene to another may be interlaced (see below).
  • A single frame can even consist of progressive parts and interlaced parts (see below).
  • Some channels air 352x288 which is always non-interlaced (because heights below 300 pixels cannot be interlaced as defined by international committees).

There are some TV channels that air (nearly) always interlaced (like MTV) and some that switch between progressive mode/interlaced mode from one program to the other or within one program without any rule (Futurama is aired progressive, the following Simpsons is aired interlaced).

Thus this can give you some problems if you deinterlace everything automatically or leave everything progressive.


Jamiroquai "Little L"

This is a typical capture from the European Channel MTV Central via digital satellite. As you can see it's interlaced and has to be deinterlaced.


The same music clip, the same scene, but different TV channel (Belgium channel 'Zik). Not interlaced, thus doesn't need to be deinterlaced. You'd lose quality if you deinterlaced it, though the quality loss wouldn't be high (see below), because the deinterlacing methods described on this site are quite good. Please also note, that after you deinterlaced MTV's footage (even with the method 4b) = Hybrid Method), the result is worse than this progressive footage from 'Zik.

Side note: The next video music clip after this one, was interlaced again.

Quality loss after unnecessarily deinterlacing of progressive frames:


Capture from a commercial for the new Volkswagen Phaeton.


Magnified original (non-interlaced)


The unnecessarily deinterlaced version. As you can see only the moving part (the high diver) shows greater quality loss. Other details are nearly the same.

Another example from TV:


The progressive (=non-interlaced) original (Astor commercial for "Exclamation Mascara" with the 3D volume formula)


Unnecessarily deinterlaced with the "Deinterlace - Smooth" filter. Compare the eyelash. Some of the fine lines have stairs in them. Compare the letters "ASTOR", they look the same.


Virtualdub's Deinterlacing method "Duplicate". Compare the fine hairs (top and bottom) and the letters.


Virtualdub's Deinterlacing method "Discard" followed by "Bicubic Resize". Compare the hairs and letters.

Deinterlacing by blending:

This is Deinterlacing by blending. Not only that a progressive frame can be motion blurred (look at Jamiroquai's left hand in the top picture), now you also blend the next field into this one. So you really get a blurry result.

However, the final result sometimes is not as bad as you might think. Take this example of a music clip: It was resized down to 384x284 and thus hasn't got any interlacing artefacts (mice teeth). It looks quite good because the original was filmed with 24fps (35mm), thus had a lot of motion blur in it anyway.

"Rewind" by Cylob (1998). The lady you see here is the English 15-year-old Chloe Bruce (that's her real name). She has won countless (world) championships.

Go Chloe, kick away bad artifacts (15 sec, 1.2 MB)

Here is an example of non-interlaced footage. It was shot non-interlaced (=progressive)  and it was aired non-interlaced, thus doesn't need deinterlacing or other filtering.
It's pretty hires (720x576, thus bigger than NTSC) so maybe in NTSC countries you haven't something like that.

This is a commercial for the product "Veet", a leg hair removal spray (they call it "mousse"), that needs only 8 minutes after application to remove your leg hair (so they say in this commercial). To make it even more polishing, here's the Polish non-interlaced version (9.0 MB). No interlacing artefacts, no deinterlacing artefacts. Pure Polish Progressive Pleasure. Pretty neat. From the Polish channel Viva Polska.

  

2)  Example 1: Changing from Interlace Mode to Progressive Mode from scene to scene


Look at the above commercial for "Garnier Fructis, Color Resist" (click the pictures to zoom).
 The first scene is progressive. You won't see any interlacing mice teeth of the movement of the water drops.
 The second scene is interlaced. You see mice teeth of the movement of the girl.
 The third scene is progressive again. You won't see any interlacing lines of the wringing movement.

 

 Example 2: Interlacing on top of a progressive frame

Strange but true: A frame can consist of non-interlaced parts and interlaced parts:


Stefan Raab "Wir kiffen"

Look at the logo in the upper right corner. This is a capture where the logo (of the German channel Pro7) just slides in from the right. The movie itself is not interlaced. You won't find any mice teeth anywhere.

 

 Example 3: Interlacing within a progressive frame


Look at the above commercial for the product "Ariel". This is a scene, where the camera zooms in to the TV set, while there's a movie playing on the TV set's screen. The commercial is non-interlaced, but the movie within the movie is.

 

 Example 4: The scene change is interlaced, while the scene is progressive


This is a footage from a comedy show featuring a black&white comedy sketch. The comedy scenes were aired progressively all of the time. At the end of the sketch (new comedians slide in from right to left) the sliding itself was aired interlaced.

  

3) Deinterlacing a movie which has been artificially interlaced can give worse results than specific methods.

What do I mean by that? As you may know, cinema movies (and all films filmed with professional cinema equipment or special camcorders, e.g. most music videos) are filmed with 24 progressive frames per second. "Progressive" means "Not interlaced". It means a "A frame is a field". It means "One snapshot of a time is taken 24 times per second in a minute, not 50 times" (like with DV camcorders). As you may also know, TV channels have to air with 25 frames per second (or ca. 30 frames per second in America and other countries).

That means, that 24fps (progressive) have to be converted to 25fps (interlaced) or to 30fps (interlaced).

To covert to 25fps you simply play that movie faster by 4% and as another step you have to convert the progressive frames to interlaced frames by artificially doubling the frame (repeating) and combining one field with another field of the next frame to interlace them.


24fps

25fps

As a side effect DivX (or any other codec) has to encode effectively only 25fps (after deinterlacing), though the resulting video is 50fps. When you scrutinize the frames you will notice that 2 consecutive frames are almost the same:

This is the crash from Cardigans "My favourite game". Here you can see the lead singer coming from the left and crashing into the other band members coming from the right (and being catapulted over the car). As you see frame1=frame2, frame3=frame4, frame5=frame 6. They are not totally equal but nearly. (Side note: There are 4 versions of the music clip with different endings). 

On the other hand to convert 24fps to 30fps you have to make 5 video frames out of every 4 film frames. Really crazy stuff. As side effect the movie stutters all the time. When you see a long slow camera movement they go sloooow-fast-sloooow-fast.


24fps

30fps

Unbelievable that this quality destroying mess is the standard of TV and DVD.

This conversion by the way is called "Telecine". The most understandable examples would be animated cartoons. Or did you think they are painted interlaced?


Frame1 (TV capture)


Frame2


Frame3

As you see the interlacing in frame 2 is totally artificial. Frame1 and Frame3 are the real painted frames. Frame2 is a mix of frame1 and frame2.

Because this is an artificial step you can undo it without really deinterlacing it but simply by undoing it, which is called "Inverse Telecine" (=IVTC) or "Reverse Telecine" (30fps->24fps). So inversed telecine would consist of merging fields back to frames and deleting artificially inserted frames if there are any. In my example with Crusty the Clown from the series "The Simpsons" you can simply delete Frame2 as it wasn't meant to be by the cartoonists anyway.

There are filters for Virtualdub with which you can achieve that. The problem is whether it's worth the trouble. Of course you may get slightly better results with real inversed telecine 24fps than with deinterlaced 50fps. But before that you would have to inspect whether it's a telecined clip or a real interlaced one. And just look at the choices: The following are the options for the Inverse Telecine filter (for Avisynth) by Donald Graft. Well, go ahead. Even if you can use all of them you are still left with a big chance of not getting anywhere because of bad movie sources, so to deinterlace the filter would just blend or interpolate, which are bad deinterlacing methods. But nonetheless, Donald Graft has made a few of the finest filters for Virtualdub in the net (including this complicated one): 

 

Oh my god!

There's no GUI (Graphical User Interface) by the way, so you have to edit all the options in an text editor.

Telecide accepts the following parameters:
Telecide(Reverse Field Matching, Swap Fields, Blend First/Last Frames, DeInterlace Non-Matching Frames, Field Detection Threshold, Field DeInterlace Threshold, Blend instead of Interpolate, Use Chroma Search, Exclude Line Start, Exclude Line End)

Recommended Setting (these are also the defaults if no value is set):
Telecide(reverse=false,swap=false,firstlast=false,post=true,threshold=15,dthreshold=9,blend=true,chroma=false,y0=0,y1=0)

Some of these parameters may not be clear so I will explain them in detail:
  • Reverse: Reverse Field Matching (true/false, Default "False").
    Some badly authored DVD content or sources captured using a Capture card may have the prominent field reversed which may cause interlaced output even though the video was originally progressive. This setting reverses the matching order and may resolve these issues.
  • Swap: Swap Fields (true/false, Default "False").
    Swapping Fields is the process where every second line is swapped with the line above it. Some capture cards capture the fields in the wrong order and using this setting you can fix the issue.
  • FirstLast: Blend First/Last Frames (true/false, Default "False").
    In a lot of cases, the first and last frames of a video will have a missing field, which would prevent field matching. If you want to ensure that these frames are blended, enable this parameter. However, in most cases due to editing the first/last frames of a video is usually black and won't require this setting.
  • Post: DeInterlace Non-Matching Frames (true/false, Default "True").
    In certain conditions it may be impossible to reconstruct a progressive frame (scene changes, bad editing on the original source material). When this setting is enabled, it will compensate for this by either Blending the fields to smooth the artifacts or by Interpolating the fields to estimate motion (according to the "blend instead of interpolate" setting). Before enabling this setting, it's usually wise to load the clip with it disabled so you can see if your field order is correct. Otherwise, you would get a blurry video. Once you inspected that most of the frames match properly, re-enable this setting to make sure no interlaced frames sneak in.
  • Threshold: Field Detection Threshold (0-255, default "15").
    This is the value that determines which area is considered interlaced and which is considered progressive. The lower the value, the more the image is considered interlaced.
  • dThreshold: Field DeInterlace Threshold (0-255, default "9").
    When combing is detected after the field matching process, this setting determines the detection sensitivity of the remaining interlacing that will later be blended or interpolated.
  • Blend: Blend instead of Interpolate (true/false, default "True").
    Blending gives a smoother image with better motion but with slight ghosting, an interpolated image may have a sharper image but motion may be jumpy and the image may be have additional noise. On a whole, Blending provides a better image quality but is slightly slower (only when non-progressive frames are found).
  • Chroma: Use Chroma Search (true/false, Default "false").
    By default only the Luma (brightness) of an image is used to check for interlaced data. However, certain types of content (Animation mostly) it may also be wise to look at the Chroma (Color). Unless you're using Animated content, I recommend leaving this disabled.
  • Y0: Exclude Line Start (0-4095, Default "0").
    In some cases where you may have an on-screen logo, or perhaps subtitles, this overlayed data (that isn't part of the original show) may confuse the field matching code. In order to exclude this area of the screen from being checked for matching fields, you use the Y0 and Y1 parameters. The Y0 parameter defines which starting line should be excluded.
  • Y1: Exclude Line End (0-4095, Default "0").
    The Y1 Parameter defines which ending line should be excluded. Any lines in between Y0 and Y1 are ignored. If Y0 and Y1 have the same value, the excluding setting is disabled. Since by default their values are both "0", the entire image is checked for field matches.
Note that the field matching Aspect and adaptive deinterlace function makes Telecide perfect for Phase Shifted or Field Blended PAL sources as well.

Decimate accepts the following parameters:
Decimate(Cycle in [n] Frames, Decimate Mode, Hybrid Threshold)

Recommended Setting (these are also the defaults if no value is set):
Decimate(cycle=5,mode=0,threshold=0)
  • Cycle: Cycle 1 in [n] Frames (2-25).
    Basically you tell Decimate to remove one frame every [n] number of frames. For use with IVTC you would like to remove 1 duplicate frame from every 5 frame sequence, so the value would be "5".
  • Mode: Decimate Mode (0-1).
    In mode "0", 1 every [n] frames will be removed from the video. In mode "1", instead of removing the frame, the duplicate frame is blended with the previous frame and thus motion becomes smoother while remaining at the same frame rate. This is useful if your source video is a hybrid of 24fps and 30fps content and you don't want to make the 30fps content jerky by discarding one of it's frames. This is the case in quite a few series that incorporate live-action with computer generated images (such as Andromeda and Babylon 5).
  • Threshold: Hybrid Threshold (0-99).
    When using mode "1" to blend duplicate frames on hybrid 24fps/30fps content, you don't want blended frames on the 30fps content. To prevent that from happening, you define a threshold which determines the difference between frames for decomb to deduct which frames should be blended. A value of 25-50 should be ok for DVD content. You may want to experiment to see what works best for you.
 

 

4) If you have interlaced material (like DV from your camcorder) and want to display it on TV sets (with a SVCD for example) instead of computer screens, then you don't need to deinterlace. If you wanted to play deinterlaced material, your TV screen would not be able to display it OR it would have to interlace it and you will lose quality.

However, there might be cases where you want to deinterlace anyway:

a) If you have to resize the height then you have to deinterlace. If you have a PAL DV which is x576 and you want to save the movie onto a PAL SVCD, which is also x576, you don't need to deinterlace. But as soon as you resize the height (for an NTSC SVCD for example) you have to deinterlace. (However you can save yourself the resizing/deinterlacing by cropping= cutting off lines.)

b) If you rotate the frame (for effects).

In these cases you have to deinterlace (and probably interlace again later), otherwise you will get strange effects like these:


Resizing height without deinterlacing first


Resizing height + rotating without deinterlacing first

 

5) You may not want to deinterlace specific frames, where nothing moves. If nothing moves there aren't any mice teeth, thus no deinterlacing is needed. Please see the examples of walls in the table below.

 

Nobody move!
It is nearly impossible to film something with NOTHING in that scene changing so that nothing gives you mice teeth (=interlace artefacts).

What scene would that be?

1) Nothing moves actively. No car, no person. Neither in the foreground, nor the background.
2) Nothing moves passively. No shadows, no grass, no leaves, no curtain.
3) Nothing moves the camera. Neither the camera man, nor the wind.

As you see this is impossible, otherwise I have to ask you: What you are filming? A wall?

[It is indeed possible if an object moves BACK in Field2 to where it was when Field1 was taken, but this is rather seldom]

 

See this picture below. It was taken with a normal DV Camcorder. It is NOT deinterlaced and looks as if it didn't need to be. You don't see any mice teeth:

 

Below is a magnified view. As you can see the right eye HAS mice teeth, while the left eye is OK. That means that even PARTS of the frame can look interlaced, which makes it even harder to get a shot, that has absolutely no mice teeth. The mice teeth below aren't too many, but you'd notice it during play.

 

If you really had a perfect picture without mice teeth THEN deinterlacing would be unnecessary. It would be even harmful, because you lose half of your resolution.

I have filmed a wall, indeed, to show you the difference between deinterlaced und unnecessary deinterlaced frames:

Wall 1a (full resolution):

 

Wall 1b (unnecessarily deinterlaced by "Bob" and then resized up):

 

Where is the difference? Just compare the stairs in the diagonal lines in Wall 1b. Here a magnified view:

Wall 1a:

 

Wall 1b:

 

 

Here another wall:

Wall 2a (full resolution):

 

Wall 2b (unnecessarily deinterlaced by "Bob" and then resized up):

 

Here a magnified view (compare the edges, diagonal lines and cactus leaves):

Wall 2a:

 

Wall 2b:

Also if you compare the door you see that it is somehow more coarse and has more snow. But I bet, that you didn't see all the differences immediately if you haven't had any experience before.

So you see, it's a big loss of quality.

  

 

100fps: How to deinterlace Video the right way. Examples, Tricks, Comparisons