Log in

View Full Version : Expert IVTC HALP!


[MA]Debito
24th September 2008, 09:57
I have a source I'm working with for a friend. It is relatively new and of high video quality.

The only problem it has is some extremely bad telecine'd frames. At first I thought it was a simple 3:2 pulldown and TFM or Telecide would tackle it. Well, it did it most parts just fine but the first scene of this clip is just invincible against modern IVTC methods.

It just seems like the first scene has varying fields and the scenes to follow look like they obey the TFF/BFF strategy.

Deinterlacing is a bad option at the moment since it ruins the good IVTC parts of the clip.

I've cycled through pretty much every viable option in TFM, AnimeIVTC, and a few random others with the same or similar results.

If you really want to flex your IVTC muscles or just give some advice on getting this first scene (and scenes like it) to look good.

Here's the clip (speaking of requesting clips, Hi neuron2!): E7 Clip (http://www.mediafire.com/download.php?yjzyc0wfojd)

Thanks for the helpssssssss!

-Debito

Comatose
24th September 2008, 11:03
DGIndex says it's 99% Film, but Forced Film doesn't do any good :P

This seems to work... I'm guessing it's because the second TFM doesn't process the already progressive frames, so you don't end up with death and destruction :P
TFM(order=0,PP=0)
TFM(order=1,PP=0)

There might be (there probably is, I always come up with retarded stuff) a better way to do it, but TFM doesn't mess up on this, so...
It might break later in the movie, so no guarantees :p

Mystery Keeper
24th September 2008, 12:22
DGIndex says it's 99% Film, but Forced Film doesn't do any good :P

This seems to work... I'm guessing it's because the second TFM doesn't process the already progressive frames, so you don't end up with death and destruction :P
TFM(order=0,PP=0)
TFM(order=1,PP=0)

There might be (there probably is, I always come up with retarded stuff) a better way to do it, but TFM doesn't mess up on this, so...
It might break later in the movie, so no guarantees :p

o_0 As far as I know, TFM doesn't do reverse IVTC. TDecimate does it, and TFM does the fields matching for it.

Comatose
24th September 2008, 12:49
I'm pretty sure that field matching (TFM) and decimation (TDecimate) together = IVTC d;

Guest
24th September 2008, 13:06
Open it in DGIndex. Step in one GOP and hit [. Save your project with Force Film. This removes the field order transition at the start.

Everything looks fine to me that way.

EDIT: Never mind, I see the issues now.

Comatose
24th September 2008, 13:14
One GOP is one click of >, right?

No idea what I'm doing wrong but it doesn't help. Not even after two clicks, and I don't get the field order transition alert.
How many frames do you get without the first GOP?

edit: Merged posts

Guest
24th September 2008, 13:24
Scratch what I said. I see the problems now. They're a little subtle for my eyes. :)

Still investigating...

[MA]Debito
24th September 2008, 19:01
Yeah, it's fun huh? I've spent a few days trying different stuffs. I wish you all luck!

Zwitterion
24th September 2008, 20:28
The problem is that in every five fields there are two frames encoded, the first needs four of the five fields, but the second has only one, so you'd have to interpolate the missing field.
Try the following for this particular scene:

AssumeTFF()
SeparateFields()

a=SelectEvery(10,0).NNEDI(field=1, dh=true).AssumeFrameBased()
b=SelectEvery(10,2,3).Weave().AssumeFrameBased()
c=SelectEvery(10,5).NNEDI(field=0, dh=true).AssumeFrameBased()
d=SelectEvery(10,8,7).Weave().AssumeFrameBased()

Interleave(a,b,c,d)

I guess this only works when you open the sample exactly as neuron2 suggested (except for the force film of course):
Open it in DGIndex. Step in one GOP and hit [. Save your project with Force Film. This removes the field order transition at the start.

[MA]Debito
25th September 2008, 04:41
Thanks for the helps guys. I didn't even think to use TFM twice to call 2 different fields! It's so obvious now!

Here's what ended up working the best for me (slight modifcation of Comatose's suggestion):

TFM(mode=5,order=0,PP=0)

TFM(mode=5,order=1,PP=0)

Again, thanks for the help! My friend will be ecstatic!

-Debito

EDIT: Looked good in VDUB but playback is really choppy. So I'm still open for suggestions :P

Adub
25th September 2008, 07:35
Where is thetoof at? He would love something like this.

Comatose
25th September 2008, 12:17
Debito;1187959']EDIT: Looked good in VDUB but playback is really choppy. So I'm still open for suggestions :P
Are you playing the encoded video or the script?

[MA]Debito
25th September 2008, 17:43
Are you playing the encoded video or the script?

Encoded Video Playback. Also MPC playback is the same jerkiness in the first scene. When I scrub through in Vdub, it looks like there are some frames that appear to be duplicating the frame before hand where their should be motion. This is causing the jerkiness.

Zwitterion
25th September 2008, 18:18
umm... Have you tried my method?

Here is the result:
edit: --> post #17

Comatose
25th September 2008, 19:00
You're right, Debito. I didn't notice it as I thought it was just not playing in realtime, but I guess I should have paid attention to the frame #s... lol :P

Zwitterion, your solution is pretty smooth, but it seems to bob... anyway, it doesn't seem right for such a high quality looking DVD source to be like this... there's gotta be some other way to fix it :/

MOmonster
25th September 2008, 19:26
The solution was allready posted, but this works for me:
tfm(order=0,pp=0)
tfm(order=1,pp=0)
tdecimate(mode=1)
Only problem left is the fade at the beginning. It was done after telecine, so you have to deinterlace this small part.

Edit: I used the unfixed d2v without forced film.

Zwitterion
25th September 2008, 19:51
OK, I've got it now:
http://rapidshare.com/files/148360187/e7test.demuxed.mkv.html

I've updated my first post for the script. The result should now be stutter-free.
You'll notice some flickering at the top of the big metal structure. Sadly this can not be avoided, as every other frame had to be reconstructed using NNEDI.
The approach using field matching plugins is suboptimal, because it destroys half of the temporal resolution.

This is the pattern:
a,a,a,b,a,c,c,c,d,c
t,b,t,b,t,b,t,b,t,b

[MA]Debito
25th September 2008, 22:30
AssumeTFF()
SeparateFields()

a=SelectEvery(10,0).NNEDI(field=1, dh=true).AssumeFrameBased()
b=SelectEvery(10,2,3).Weave().AssumeFrameBased()
c=SelectEvery(10,5).NNEDI(field=0, dh=true).AssumeFrameBased()
d=SelectEvery(10,8,7).Weave().AssumeFrameBased()

Interleave(a,b,c,d)

First scene looks good, but everything else after that suffers from multiple combed frames, jagged deinterlacing artifacts, and inconsistent frame matches. I do appreciate the effort you guys are putting into this and It will help out so many other people with this type of source.

45tripp
26th September 2008, 04:11
it's only meant as a solution for the first scene.
use tfm().tdecimate() for the rest.
the rest is mostly plain 3:2, except for ~ 1200-1650,
but tfm works well enough, only a couple combed frames coming through.

mpeg2Source("e7test.d2v")
a=trim(0,353)
b=trim(354,0)

a=a.trim(2,0).AssumeTFF().SeparateFields()

x=a.SelectEvery(10,0).NNEDI(field=1, dh=true).AssumeFrameBased()
y=a.SelectEvery(10,2,3).Weave().AssumeFrameBased()
z=a.SelectEvery(10,5).NNEDI(field=0, dh=true).AssumeFrameBased()
w=a.SelectEvery(10,8,7).Weave().AssumeFrameBased()

a=Interleave(x,y,z,w)
b=b.tfm().tdecimate()

c=a+b
return(c)

MOmonster
26th September 2008, 09:16
Ok now I see the problem in the script.
This seems to work for the whole sample:
tfm(cthresh=6,MI=32,pp=0,mmsco=false,micmatching=3)
tdecimate(mode=1)

Blue_MiSfit
26th September 2008, 09:59
Toss in a little Vinverse for combed frames that slip through ;)

lansing
27th September 2008, 04:53
Didn't know the result being encoded, but looks good to me in VDub preview

animeivtc (2,aa=2,oregion="ntsc")

thetoof
27th September 2008, 15:30
Tried it, but it screwed up the monitor in the second half of the clip... and didn't have the time to test anything else.
I'll look into the double tfm call when I get back home.

[MA]Debito
30th September 2008, 00:38
Any progress, thetoof or neuron2?

B3-bomber
12th October 2008, 02:30
I'm the one [MA]Debito posted this for. Any progress? The 5 day to post thing made replying to this slower than I hoped.

thetoof
12th October 2008, 10:07
Well, what was suggested by MOmonster works perfectly fine for me... Though I'd suggest something else than vinverse to fix the fade in (it blurs it & the monitor around 00:42)

#field matching
tfm(cthresh=6,MI=32,pp=0,mmsco=false,micmatching=3)
#average two spatial interpolation with contra-sharpening to remove remaining combing (retains more detail than a simple vinverse())
c=last
dbl = mt_average(c.nnedi(1),c.nnedi(0),U=3,V=3)
dblD = mt_makediff(c,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11),U=3,V=3)
DD = shrpD.repair(dblD,13)
a=dbl.mt_adddiff(DD,U=3,V=3)

#apply only to the areas that really need it (the fade in), so you'll have to tweak
a.trim(0,32)+c.trim(33,0)

#decimate to 23.976fps
tdecimate(mode=1)

B3-bomber
13th October 2008, 01:19
Great... complex scripts:\ Well, thanks. I'll see what i can manage.

thetoof
13th October 2008, 06:01
well, if you have animeivtc.avsi in your plugins folder, you can call the "average of two interpolations" as
daa()