Log in

View Full Version : IVTC Vandread Second Stage


lubczyk
16th September 2005, 22:22
I know this thread has been done before many times but once in a while it's good to start a new one just to keep up with the most current events. I'm trying to IVTC Vandread 2nd Stage. I've tried to IVTC it using YATTA but that just takes ages and tires my eyes out really fast. I've scoured the forum and I really lilke the techniques described in this thread: http://forum.doom9.org/showthread.php?t=97355 by Isochroma. Is there an automated way to do what he describes? An automated freezeframe perhaps? The thing is that neither decomb, smartdecimate, TIVTC, or IT give me satisfactory results. To reiterate is there a way to automatically IVTC perfectly by removing all duplicate frames while keeping the smallest duplicate even on hybrid sources. I would also really like it if the techniques involved were not image destructive like deinterlacing. I know I'm asking for alot but I really seem to have a bunch of problematic frames like the ones attached below that I just can't IVTC outside of manual freezeframe. Also I don't know how I would go about determining the smallest duplicate. Any and all help would be appreciated.

Myrsloik
16th September 2005, 22:54
When I looked at it long ago (around decomb 4.0) there were two things that helped. First crop away the huge black bars BEFORE you do ivtc and then using IT (haven't tried decomb5 but 4 failed ridiculously often).

You could also try to do something like collecting the metrics in ymc for tfm,sclavc,tdecimate and then just apply the pattern guidance and hope for the best in yatta (might look better or mess up everything completely).

movax
17th September 2005, 03:08
So far it's taken me about 14 hours/ep to get it comb-free and upto quality standards, with plenty of NoDec zones, so don't expect to get it perfect without investing a lot of time.

MOmonster
17th September 2005, 10:04
@lubczyk
Could you please upload just a small sample (3-5mb). This one picture isnīt enough to help you. Also the separatefields picture for me looks similar to a blend :confused: . A good way to get clear with different IVTC scenes is to ust tdeint(mode=1, tryweave=true) with Tdecimate, mode 2 or 1 with a large cycle.

lubczyk
17th September 2005, 17:10
@movax
I admire your dedication but investing so much time in the manual method would make me not want to watch the series ever again.

@Myrsloik
I tried using IT yet it didn't work but thanks for your suggestion.


Anyone know where I could upload the problem clip? It's 2.62MB which is above Doom9's 2MB limit.

MOmonster
17th September 2005, 20:12
You can upload it here (http://www.putfile.com/) , here (http://www.uploadhut.com/) or here (http://www.megaupload.com/) ;) .

lubczyk
17th September 2005, 22:34
Thank you MOmonster

Putfile:
http://media.putfile.com/problem78

UploadHut:
http://uploadhut.com/view.php/325424.mpg

MEGAUPLOAD:
http://www.megaupload.com/?d=26RUD7E6

Guest
18th September 2005, 05:10
It's field-blended video. You can't IVTC that directly. You can try Restore24, or better yet, ask scharfis_brain to tell you the right script to use. He'll want a bigger clip, though.

MOmonster
18th September 2005, 10:10
Yes, itīs fieldblended. It shows this pattern: c d b c b c d c b c b c d... (d-double, c-clear, b-blend).
That mean there are 23.976 fps. You can use restore24 (2:5) with tdeint(mode=1,tryweave=true) as input. Better is of course an automated patternfinder. If restore24 donīt work for you, just ask me ;) .

lubczyk
18th September 2005, 23:03
@MOmonster

I'm having trouble finding the right restore24 script. There seems to be a couple versions of them floating around. It gives me an "invalid arguments to function: restore24". My scripts are attached below.

Also if it wouldn't be too much trouble could you please explain the automated patternfinder method you mentioned?

MOmonster
19th September 2005, 09:28
First itīs the right version, but you should have a look at the restore24 sample, 2:5 stands just for the decimation percentage.
b2=TDeint(mode=1,tryweave=true)
a2=r24kernelbob(0)

restore24(a2,b2,2,5) That way, your script should look like. I donīt know if smartdecimate work with these values, but theoretical it should. Use the newest leakkerneldeint.dll (not the version in this package).
With the automated patternfinder, this is not that easy, because your pattern change a lot. :sly:

lubczyk
19th September 2005, 20:32
I get an error:

Syntax errror: there is no function named "YV12layer" (restore24.avs, line 45)
(test.avs, line 24)

Below are my attached scripts again.

PS: I updated all my plugins so those don't seem to be the problem.

MOmonster
19th September 2005, 21:48
Donīt update the masktools, only leakkerneldeint and tdeint. The newer masktools donīt have yv12layer anymore. The one tdeint is too much.

Ok here is something like an automated patternfinder that seems to work for your source.
a = tdeint(mode=1)

unblendmatcher(bob=a, MI=64)

Function unblendmatcher(clip clp, clip "bob", int "MI")
{
###### PREPARATION ######
global out = bob
global testclip = clp
global val = default(MI,85)

###### VAR.. ######
global par = true

###### Conditional Function Chain, evaluated from bottom to top (!) ######
c99=scriptclip(clp, "test1 == false ? testclip : (test2 == false ? testclip.doubleweave().selectodd() : (par == false ? out.selectodd() : out.selecteven()))")

c2=FrameEvaluate(c99, "global par = test2 == false ? true : (test1 == false ? false : par)")
c1=FrameEvaluate(c2, "global test1 = testclip.IsCombedTIVTC(cthresh=9,chroma=false,MI=val)
global test2 = testclip.doubleweave().selectodd().IsCombedTIVTC(cthresh=9,chroma=false,MI=val)")
return(c1)
}

tdecimate(mode=2,rate=23.976,maxndl=6)
Maybe another MI value can tweak the process. Also a lower bitrate for tdecimate (23.xxx) can be useful. You need tivtc and tdeint (best would be newest version) to run this function. ;)
You can also use leakkernelbob instead of tdeint (would be faster, but not give the same quality).

lubczyk
21st September 2005, 19:41
I get this error when using the scripts attached below:

The same match was checked more than once for being combed!
([ScriptClip], line 1).

tritical
21st September 2005, 23:36
If you grab TIVTC v0.9.10.4 (http://forum.doom9.org/showthread.php?p=544121#post544121) (bottom of first post has a link) it should work... that error was caused by a problem with IsCombedTIVTC that was introduced in TIVTC v0.9.10.0.

lubczyk
23rd September 2005, 00:18
Here's a sample of the clip using MOmonster's function. It's vary good but not perfect. Is there a way of removing the remaining interlacing or tweak the function to make it run a few more cycles? I know I'm picky and a perfectionist but I do appreciate what you guys have told and given me.

http://www.megaupload.com/?d=SQYGR1IB

MOmonster
23rd September 2005, 07:52
Ok, interlacing isnīt the big problem left. I canīt see any interlacing, only less blending. If restore24 also donīt work for you (I think for this special case it will also fail a lot), till now, there seems to be no functional way to do it better (maybe wait for the next version of restore24 coming soon). All my other unblend Functions fails alot on this sample. Maybe you should set the rate of tdecimate a bit less to avoid more doubles. The big problem I see in your short clip was the jump (frame 100 or so). I think itīs because a wrong parity or maybe a bug in x264, I donīt know, your first sample didnīt go that far. Maybe another member here has a better idea for you. Have you allready tested restore24 or a rate around 22fps?

Edit you should crop the clip before using restore24 or my function (not that important).

lubczyk
23rd September 2005, 16:50
@MOmonster

Sorry I misspoke I was referring to aliasing that cropped out in the sample. If you watch the vid just before the first girl's hair shows up there is some aliasing I can't seem to get rid of.

MOmonster
23rd September 2005, 20:21
Still the bigger problem is the blending and the doubles and the cruel jump. You shall tweak the decimating (smaller rate, different mode). Against the aliasing use another type for tdeint (tdeint(mode=1,type=1) or tdeint(mode=1,type=3)) and maybe, but only maybe a smaller MI value (not recommed, but you can test it).

lubczyk
1st October 2005, 02:24
I've found a function called CheckforBlends and it's really helped get rid most of the blends in my source. In the sample there is some remaining blends around frame 132. Any additional functions or tweaks that could help me get rid of the remaining blends. I'm also intereseted in how to get rid of the aliasing in the source or what's left of it. Evey post gets me closer and closer to a clean source.

Video Clip (X264):
http://www.megaupload.com/?d=9SD4FVVZ

Sample of leftover blending:
http://img245.imageshack.us/img245/8846/leftoverblending3ew.th.jpg (http://img245.imageshack.us/my.php?image=leftoverblending3ew.jpg)

MOmonster
3rd October 2005, 14:43
This function is a early stage of the blenddetection core used in Crestore and Cdeblend. Search for these function and test them or use this function on the bobbed input. It donīt may detect clears as blends, other way (blends as clear) is not so important. You can change the 0.75 value inside of the function to tweak them, higher (max 1) means stronger blenddetection. If it seems work for you, just tell me, I will make it useable. The next two weeks I have no internet. You can also try the new mode (7) of tfm that should work like the unblendmatcher. Nice tryout. :)

lubczyk
14th October 2005, 20:59
Tried using the C_package but none of those functions worked well in any combination. My latest scripts in this thread involving ChechForBlends() and the Automated Pattern Finder script still give me the best results. Could maybe someone give me a good scripts using TFM because I can't seem to find a good one and I'm not that familiar with TFM mode 7 or otherwise. In the meantime I'll go look into MVBob.

MOmonster
14th October 2005, 22:44
@lubczyk

Sorry, but you didnīt just call the function check for blends, so you also donīt use it. You would see a suptitle if you call the function. So theoretical it should make no difference to the plain unblendmatcher script.
Tfm mode=7 works the same way as my script. Play with the MI parameter or use just the value of my function. You can also optimize the thresholds and of course you have to activate the postprocessing (pp >= 2). PP=7 seems to be good for Anime. In the good readme there are all options of tfm explained. ;)