Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > (Auto) Gordian Knot

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th March 2006, 22:05   #1  |  Link
Staz
Registered User
 
Staz's Avatar
 
Join Date: May 2004
Posts: 128
New Avisynth Telecide Procedures To Determine Shifted Fields or Interlacing

Hi there.

Manano had a brilliant method to determine whether your video source has the shifted field problem or if it is indeed truly interlaced.

Quote:
If it appears to be interlaced, then Load the Decomb Plugin and add Telecide(Post=false) to your .avs. Open it in VDub, find a place where there's movement, and start advancing frame by frame. If you no longer see interlacing, then it just had the common "shifted fields" problem, but if you still see lots of interlacing, then you have an interlaced DVD, and you will have to deinterlace.

If you had the shifted fields that were fixed by adding Telecide(Post=False) to the script, change it for the encoding to Telecide(). This adds the deinterlacer back into it to fix any few interlaced frames that might sneak through.
This method worked great until I upgraded Avisynth. Now when I
try using Telecide(Post=false) and opening in Virtualdub I get:

Script error: the named argument "Post" to Telecide had the wrong type.

When I try using Telecide() and opening in virtualdub :

Telecide : you must specify the order parameter (0=bff, 1=tff).
An incorrect setting will result in incorrect decombing.


Basically what I am asking, is what is the New Avisynth procedure to determine whether your video source has the shifted fields problem or it is interlaced.

Thanks Heaps
Staz is offline   Reply With Quote
Old 12th March 2006, 01:00   #2  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
The post option is no longer true or false, it's a numerical value. So the equivalent to post=false would be post=0.
Additionally telecide has a new paramter: order. This parameter MUST always be given. Order=0 means the material is bottom field first, while order=1 means top field first. For determining which is correct for your clip, try this (taken from telecide's tutorial):
Quote:
To determine the field order, make an Avisynth script that serves the raw clip without any processing. If it were an AVI, then just AviSource() would be used. For our examples, we'll use AviSource(). Add a script line to separate the fields using top field first, as follows:

AviSource("your_clip.avi")
AssumeTFF().SeparateFields()
Now serve the script into VirtualDub and find an area with motion. Single step forward through the motion. Note whether the motion progresses always forward as it should, or whether it jumps back and forth as it proceeds. For example, if the field order is wrong, an object moving steadily from left to right would move right, then jump back left a little, then move right again, etc. If the field order is correct, it moves steadily to the right.

If the motion is correct with AssumeTFF().SeparateFields(), then your field order is top field first and you must set order=1. If the motion is incorrect, then your field order is bottom field first and you must set order=0. If you are want to double check things, you can use AssumeBFF.SeparateFields() to check correct operation for bottom field first.
squid_80 is offline   Reply With Quote
Old 12th March 2006, 01:48   #3  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
The latest version of Telecide() does not have the order option. It takes the order from Avisynth, so use AssumeTFF() or AssumeBFF() before Telecide(), as appropriate.
Guest is offline   Reply With Quote
Old 12th March 2006, 12:16   #4  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Fair enough, I'm out of date
squid_80 is offline   Reply With Quote
Old 15th March 2006, 11:26   #5  |  Link
Staz
Registered User
 
Staz's Avatar
 
Join Date: May 2004
Posts: 128
Thanks for your reply guys!
When viewing a PAL possibly Field Shifted DVD Frame by frame, what does it look like? I have no idea if I am seeing Interlacing or otherwise

Is this right? (I write two separate scripts)

If I write AssumeTFF()
Telecide()

on one script and

AssumeBFF()
Telecide()

on the other. If in both cases I still see interlacing when I preview in virtualdub, does that mean I have a pure interlaced source? And if one of those scripts does appear to remove interlacing, then it is a case of shifted fields?

Thanks Again!

Last edited by Staz; 15th March 2006 at 11:31.
Staz is offline   Reply With Quote
Old 23rd March 2006, 11:08   #6  |  Link
Staz
Registered User
 
Staz's Avatar
 
Join Date: May 2004
Posts: 128
On my quest to finally get my head around all of this I found this from manono:

Quote:
1. Make the .d2v with No Field Operation. Look at it in different places and if everything looks OK (the most common occurance), then go to 4. If everything does not look OK, then go to 2.

2. Make a .d2v with Field Operation-Swap Field Order. Look at it in different places and if everything looks OK, then go to 4. If everything does not look OK, then go to 3.

3. It may be progressive, but the fields may switch back and forth, either very often, or (in some cases) very rarely. Now you need Decomb. So Load the Decomb Plugin and add Telecide(Post=False) to your .avs script (before the crop line is the easiest way to do it, and it doesn't matter which .d2v you use-maybe use the first one to be safe). Open that .avs in VDub and look around. With luck, now everything is fixed, and you can go to 4. But before you do, change Telecide(Post=False) to Telecide() which is the same as Telecide(Post=True). This adds back the deinterlacer to fix any interlaced frames that might slip through. If it is still not fixed, then go to 5.

4. Most films at 24fps are converted to PAL 25fps by just speeding them up. But in some cases they will add an extra frame (actually 2 fields in different places every second) in every 24 to make it 25fps. If you don't feel like looking, then you might skip this step, but don't be surprised if you get a slight pause or jerk every second in the completed .avi. We here at Doom9 like to do things right, so it should be worth your time to do some further investigation. Open the .avs in VDub and find a place with motion and start counting. If you come across a doubled or duplicate frame, then start counting again, and you should see the duplicate frames every 25th frame. Then you want to remove those extra frames, so you add Decimate(25) to the script. If you came here from 1 or 2, then you don't need to add Telecide(). You can just load the Decomb Plugin and add Decimate(25). If you came here from 3, then add Decimate(25) after Telecide().

5. If you have the bad luck to need to read this section, then all the work you did above didn't fix it. Either you have a truly interlaced DVD (common for TV series DVDs, but uncommon for movies), and you must deinterlace, or perhaps you have noticed a lot of ghosting or doubled images. In that case, go back to the tutorial and check out hakko504's recommendations. But nothing can really completely fix the doubled images.

Now do you see N_F why I didn't mention Swap Field Order the first time? It can actually save you time in the long run (if it works), but it may be more trouble than it's worth. That's up to you to decide. But you can actually skip steps 2 and 3 by adding Telecide() to the script if it doesn't look good after step 1.
I have a few questions though:

In this bit:
"2. Make a .d2v with Field Operation-Swap Field Order."

In DGIndex I don't see "Swap field order" as one of the field operation options. (just honor, ignore and force film). Where can I swap field order in DGIndex?

I like this method:

"But you can actually skip steps 2 and 3 by adding Telecide() to the script if it doesn't look good after step 1."

If it looks ok after adding Telecide() to my script then does it mean I had a case of shifted fields and there is no need to deinterlace?? Also do I have to add AssumeTTF() or AssumeBBF() first? I have no idea how these work, can anybody explain?

It would be great if I could get my head around this once and for all. Thanks heaps! Would be great to hear from you Manono as you seem to have an amazing knowledge in this area
Staz is offline   Reply With Quote
Old 24th March 2006, 02:34   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Quote:
Originally Posted by Staz
In DGIndex I don't see "Swap field order" as one of the field operation options. (just honor, ignore and force film). Where can I swap field order in DGIndex?
That option isn't necessary and doesn't exist anymore. Just ignore that part of the guide. Pretend you don't need to swap fields. That material is outdated and so shouldn't be used. But I agree about your high opinion of manono. He's a good buddy of mine.

Here's how to tell if you have field shifting or real interlacing:

Make your project as "Honor pulldown flags". Then make an AVS to step through the fields.

mpeg2source("file.d2v")
assumeTFF() # or assumeBFF(). Get the field order from DGIndex's Tools/Parse D2V.
separatefields()

Serve this into VirtualDub and step through the fields in a high motion section. Denote a new picture with a new letter. If you see a repeating field sequence like this:

... a a b b c c ...

then it is progressive video. If you see this:

... a b c d e f ...

then it is pure interlaced video. If you see this:

... a a a b b c c c d d ...

Then it is hard 3:2 pulled-down progressive video.

Make sure that you always apply this test in a scene with continuous movement, e.g., an object moving steadily across the screen. There is no more reliable way. It also allows you to spot field blending very easily. If you see any blended pictures, then you have field blending.

I don't like the idea of resizing to full height for this process, because we can forget that we are looking at fields, and any extra processing is superfluous in any case. OK, the fields jump up and down but so what? It lets us directly know the field polarity.

Last edited by Guest; 24th March 2006 at 02:56.
Guest is offline   Reply With Quote
Old 30th March 2006, 02:04   #8  |  Link
Staz
Registered User
 
Staz's Avatar
 
Join Date: May 2004
Posts: 128
Wow Neuron2!
That guide is brilliant thanks.

When following your method of SeparateFields each frame of my test video contained a new picture (eg: a car progressively moving further left across the video), implying that it was interlaced. The method you wrote works fine for PAL sources right? NTSC too?

Does anybody have any examples as to what field blending looks like?

Thanks heaps!

Last edited by Staz; 30th March 2006 at 02:15.
Staz is offline   Reply With Quote
Old 25th March 2009, 18:03   #9  |  Link
naughty21
Naughty boy
 
Join Date: Feb 2009
Posts: 12
thanks for info neuron2
naughty21 is offline   Reply With Quote
Old 25th March 2009, 20:10   #10  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,876
@Staz:

Field Blending will be quite obvious if you do SeparateFields() and step through the video. Some (or all) pictures/fields will have blended motion in them. It will look like two images blended together no simpler way to explain it!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 25th March 2009, 20:55   #11  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
MiSfit: It was 3 years ago, he's probably not interested in examples any more
squid_80 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.