> Guide Index

Analysing Your DVD Footage

In this section of the guide, we will examine our footage to see if its interlaced, and discuss some specific types of interlacing and other problems that you might encounter.

Just like the end of the last page, you should have an avisynth script loaded into either AvsP or VirtualDub and you should be able to see your dvd footage. Let's have a closer look at it...

Is it Interlaced?

You probably know this already because DGIndex generally tells you if it is or not (Frame Type: Interlaced or Progressive). It is very important to look closely at the frame type when DGIndex previews and when it creates your project file as this will tell you a great deal about the way the footage is encoded. You will need this information to understand a lot of the things below as we will be comparing this information to what you can see in VirtualDubMod.

If you have completely progressive footage (as seen in DGIndex) that after using Force FILM shows no interlacing at all (see the picture below for an example of interlacing) then you can be happy. If you have interlacing of any kind you will need to read through this page carefully so you can work out what to do with it.

Also, be aware that some openings and closings can have different results, so try using F6 from a point in the middle of an episode to find out the frame type in the middle of an episode.

When it comes to mpeg2 footage the Frame Type in DGIndex tells you whether the frame has been stored one frame at a time (Progressive encoding) or one field at a time (Interlaced encoding). However, that's just how the frame is being stored - when you look at it what you see may differ from the Frame Type.

You always need to check the Frame Type(s) reported by DGIndex when you did your F5 preview against what you can see by looking at the footage and seeing if it is actually interlaced or not. To check for interlacing, look through a part of the footage with movement and if you see any frames that look like two different frames weaved together with lots of horizontal lines then you have interlacing. It will probably look something like this:

SuperGALS Interlacing
This is interlacing. Note that only the moving parts appear interlaced.

Of course this sometimes confirms what the frame type was in DGIndex but some times does not, so let's compare the frame type and what you can see. There are 5 possible situations:

1) Definitely Progressive FILM. It says it's FILM (or at least about 95% FILM) and when decoded with Force FILM you can't see any interlacing. Great, you have progressive 23.976fps footage. (It's possible with some movies that the main feature is progressive but studio bumpers are not - provided you don't need the studio bumpers this shouldn't be a problem).

2) Definitely interlaced. DGIndex tells you it has entirely interlace-encoded frames and sure enough they do contain interlacing and contain those tell-tale 'horizontal lines' in motion areas (see image above). You should use interlaced=true when doing colorspace conversions such as ConvertToRGB32(interlaced=true) [but don't actually do this right now].

Now most anime will either be situation #1 or #2. You will occasionally see some of these other cases though:

3) Progressive footage encoded as 'interlaced'. This is where you have footage which doesn't look like it has any interlacing at all but DGIndex has told you that every frame was encoded using Interlaced encoding. This means that the footage was encoded one field at a time even though both fields are part of the same frame. This isn't a problem, really - you can still encode and edit it progressively. This often happens with PAL encodes of movies, and its also common on OVAs (anime that was released straight to video rather than airing on tv). The only thing you need to be careful about is whether the chroma channel is sampled correctly when doing any colorspace conversions. This isn't much of a problem but if you change the colorspace such as ConvertToRGB32() you might get something called bad chroma upsampling, which looks like this: (look closely at the edges)

SuperGALS Chroma Upsampling
The bad chroma (blockiness) has occurred because the frame was thought to be progressive when it was actually encoded as interlaced frames (or vice versa) and so the color samples are decoded incorrectly. Some DVD players suffer from this problem too. If you do see this problem it is most common when you do a colorspace change you will want to put "interlaced=true" inside the parenthesis such as:
Again, don't actually put this in your script right now, just remember it for later. It probably wont happen (it's a rare case) but it's good to know about it just in case as it can make things look much uglier than they should be. You can also try and fix this problem with the avisynth command FixBrokenChromaUpsampling()

[Note that SuperGals does not have this, I purposefully upsampled the chroma incorrectly to demonstrate - SuperGALS is an example of situation 4]

4) Switching between interlaced and progressive! If in DGIndex a source is switching between interlaced and progressive but is also being reported as completely FILM then don't worry - it's progressively encoded and Force FILM will restore the original frames. However, if it is switching and it's being reported as mostly NTSC then you have a hybrid dvd (just like the SuperGALS disc I'm using below) and this will need to be handled in a different way, as I will describe later. Hybrid sources have two forms, one is where you have mostly FILM and only some parts interlaced and the other where only some parts will be FILM. These will be discussed in more detail later. I have yet to see a hybrid PAL dvd but I suppose it could happen.

Interlacing Methods: Telecine, Pure, Hybrid, Blended and Half-Blended

OK, so you now know if you have interlacing footage or not. The next thing you need to know is how this source has been interlaced so you can decide how to remove it.

We aren't going to talk about how to remove the interlacing yet - this is just a description of the different types so you can know what kind of deinterlacing to do later. Read through them all and see which description best fits the interlacing in the source you have.

Pure Interlacing

Pure interlacing can occur in both PAL and NTSC sources. This process involves taking full advantage of the 50 or 60 individual fields a second that are used in PAL and NTSC video to get the smoothest looking video possible when shown on a TV. If an anime is produced in pure NTSC then it is likely to be really difficult to cleanly remove the interlacing as there are fewer full frames to restore as there are lots of fields which have a unique image.

Many modern shows are completely digitally animated and so they sometimes take advantage of this feature. PAL also uses this feature a lot as the NTSC fields are sometimes decimated to PAL numbers and reweaved into a pure interlaced PAL stream. This makes original frames much harder to find. When faced with a pure interlaced source it is sometimes not worth looking for the original frames (which is what you do with Inverse Telecine filters) sometimes it's better to just completely deinterlace them.

Telecine and Pulldown Material

If you have footage that was cell animated (the old fashioned way, not computer aided) or you have a source that was made for the cinema then there's a good chance that the footage was produced at 24fps and has gone through a simple Telecine (3:2 Pulldown) process like the one described earlier in the theory guides. If you are really lucky, this process was clean and has no pure interlaced footage at all. This is a common process used to convert FILM to 29.97fps NTSC.

PAL footage can also use pulldown (2:2 pulldown) where either both fields will be from the same image to make one regular frame or there will be an offset so that the fields go ab bc cd de where a b c and d are different images, but frankly this method is pretty rare on PAL anime dvds (unfortunately)

Removing Telecine interlacing is called Inverse Telecine (IVTC) and is pretty easy to do in AviSynth. This will be explained in detail later.

Remember, this process will only work perfectly if you have a neat Telecined source. This is actually pretty rare these days as most sources are Hybrids.

Hybrid Sources

These are sources that have a mixture of interlacing patterns. Some anime have a digitally edited opening sequence which is pure interlaced and then use a regular Telecine pattern during the episode itself. X TV and Azumanga Daioh both use this particular method. Some shows just use pure interlacing on scenes where they have added something digitally, like some CG or a title etc.. These are Hybrid sources and are the most common type for anime TV shows these days. You see, although they could make completely fluid animation at 60 fields per second it's a lot of effort. Even with computer animation the animators are too lazy to go into that much effort. Pans and other parts of animation that can be automatically created with computers are more likely to use all the fields for ultimate smoothness but there are many sections that will still be only 24, 12 or even 8 frames a second. Those parts can generally have their original frames restored.

Success in cleanly removing the interlacing in hybrid shows will depend largely on the amount of pure interlacing you have. If you don't have much, and most of the footage is a regular old-fashioned telecine then you can IVTC and your footage will be mostly pretty smooth. If you have mostly pure interlaced material you can either try full deinterlacing (smoother motion, not always as good picture quality) or you can try using IVTC in avisynth but smoothness of motion may be a problem in parts where pure interlacing has been used to make the motion smooth (digital pans etc.).

Full Field Blended Sources

These are the scourge of PAL anime DVDs. Admittedly it is difficult, in many cases, to return to the original progressive FILM source of a show to produce a PAL version like they do with regular movies. With movies, the original 24fps FILM is found, sped up, the audio processed to match and a progressive 25fps source produced. However, many anime shows were never designed for FILM (see Hybrid and Pure Interlaced) and others just don't have FILM prints around anymore. Unfortunately when converting to PAL they have to make a 25fps output and they have to do this without making the footage all jerky.

This generaly means they don't go around removing frames to make it 25fps. Instead, many production companies take the NTSC source and blend fields together in a pattern so that the effective fps is reduced from 29.97 to 25. This is very quick and convenient for the production studios but intensely irritating for an amv creator wanting a nice clean source to deal with. This is especially annoying when there is a perfectly good progressive master around and they have just not used it. You can look at the individual fields of your source in Avisynth by using the command SeparateFields() - if you have a full field blended source it will look something like this field from the Dutch rental version of Spirited Away, which is a blended field decimation of the Japanese release:

Spirited Away PAL blend

This is just one of the fields, not the whole frame. The whole frame together looks even worse, especially when you have two fields that are blended in succession from three or four different source fields.

This blending decimation causes many problems for interlace removal. If you deinterlace this footage, you will end up with blended frames which both look ugly and are hard to compress--but thats probably the best option you have. This can be very annoying for an editor using PAL sources as the majority of them use this technique.

Restoring the original frames when you have a blended source is very difficult and although attempts have been made to try and correct this kind of source, nobody has yet come up with a completely successful way of doing so. There are a couple of functions you might want to try, but don't expect fantastic results from them. These will be discussed later.

It is sometimes possible for NTSC footage to have full-field blended footage too, Sometimes this is produced when making a Telecine - being used as padding between regular frames. Luckily IVTC is pretty good at eliminating these provided all the original frames are there and the blends are just duplicates of frames that are also shown unblended. However, if there is an image which only exists as part of a blended frame then, like the PAL source, a deblending method would need to be used to try and restore the footage. You can try IVTC on this sort of footage but you may either have blended frames or jerky motion depending on the Decimation process you choose.

Partial Field Blended Source

Just when you thought that full field blended sources were the worst you could get, along comes something that takes it to the extreme. You see, when converting FILM sources to NTSC a studio would have to use a Telecine process and some Telecine processes are good and some are bad. The good ones are clean, tidy and can be IVTCed - the original frames can be constructed by sticking fields back together and everyone is happy. However, there are nasty ways of doing Telecine. One is the full field blending technique described at the end of the last section, which is bad enough but then there are two which are even worse than full field blending:

One Field, Two Halves of Two Images: The FILM footage is projected onto a screen and then sampled (a process which captures the scanlines in order) by another camera at 59.94 fields per second. This Telecines the material to the full 29.97 frames per second. This is ok except that sometimes when a field is being sampled the original projected frame changs from one image to the next halfway through sampling the field! The camera sampling this then ends up with a field where the top half is from one image and the bottom half is from the next! The Avisynth filter PeculiarBlend() was written to remove this but it doesn't normally work very well, but to be honest this is not very common in anime sources... a more prevalent method is this...

Temporal Scanline Blending: The FILM is converted to NTSC using a telecine device that samples each new field by scanning down the image (if you imagine the light of a photocopier moving across a piece of paper you get an approximate idea of what happens even though I am simplifying). However, as the image being sampled changes, this causes the field being sampled to blend into the next image - this grows more and more as the sampling continues until finally the image has completely changed to the next one. This is the nastiest of the nasty Telecine methods and can be seen in every Gainax production from Otaku no Video to Kare Kano and in many more late 80s to late 90s anime. It's the reason Eva Renewal had to be made. What you get is fields that looks like this:

Field 1:
Ranma Blending 1

Field 2:
Ranma Blending 2

U-G-L-Y. If you look at field 1 you will notice that the blending of the two images only begins in the bottom half of the field and by the time you get to the bottom you are more in the second image than the first (see the guys foot on the right). This is the telecine device blending the scanlines more and more with time until they are in the next image and through to the next image then the next as the image is scanned.

This stuff is nigh impossible to recover at the moment. There are no tools available at our level which can deal with field blending like this, the best you can do is try IVTC and hope to god you don't get too many blends and that the motion smoothness isn't totally ruined. It's nasty stuff - especially in pans where you can end up with an IVTC process giving you a scene with horizontal motion with the top half moving in one frame and the bottom half catching it up in the next frame. Evil.

There's only one thing worse than this kind of blended field Telecine - PAL anime which has converted this blended field Telecine to PAL by blending the fields even more! I haven't seen the PAL Evangelion print but from what I've heard it sounds like a mess.

OK, hopefully from these descriptions you will have a decent idea of the different interlacing methods and which is more likely to be used on your source. When we describe the different settings for interlacing removal you should keep these types in mind.