View Full Version : AnimeIVTC() - All-in-one solution for interlacing and blending - v2.00 [2010-01-07]
roozhou
17th June 2008, 16:47
@thetoof
nnedi+merge gives a little blurred credits.
Is there a way to keep the 3 progressive frames and deinterlace(blend or bob) the 2 combed frames? IMO this should give the best result.
thetoof
17th June 2008, 16:57
Yeah, I know they are blurred... that's why I said "minimal" damage (i.e. there is some)
- Deinterlace only the 2 combed frames = 3 good, 2 blurred... temporal instability
- Use the masktools to take the original edges = bring backs the combing
- merge = stable and no combing... you could try adding toon(x) after to resharpen the edges (I was thinking of adding it as an option in the function)
Edit: How silly of me! I just realized daa() does what I need :p (average the 2 nnedi + contra-sharpening)
egrimisu
18th June 2008, 07:52
Hi, i have a R2J anime dvd and the OP and ED is interlanced with 2 interlanced frame and 3 nor interlanced and the rest of the movie look's like progresive. What setting of animeivtc shall i use to have the best posibble quality? It is recomended to use antialliasing on new animes? The end of the clip seems like Interlaced on top of telecined hard telecined like in the example you showed us here http://img520.imageshack.us/img520/6759/24t30ilqrw3.jpg.
Thanks in advance
thetoof
18th June 2008, 08:09
Can you post a sample of that progressive anime you're talking about? Look at high motion scenes to see if you have combing and, if you do (you most likely will), check if it's hard telecined or double hard telecined.
The settings to use will be mode=3 for HT and mode=4 for DHT
Anti-aliasing is recommended on any source that needs it... doesn't matter if it's new or not. You'll know by comparing the aa methods (automatic when you don't specify aa=x)
Vesi
18th June 2008, 12:50
@ thetoof one thing I want to make sure is the sample which I put here (http://forum.doom9.org/showpost.php?p=1149085&postcount=205)
is this hard telecine? and what you mean by this (http://forum.doom9.org/showpost.php?p=1149144&postcount=207) when i show the script you said that the line is correct, and when i asked you, is it possible to use the same line for the hard telecine, you said animeIVTC(mode=1) will do the job for me, I am bit :confused: on how to make the script
thetoof
18th June 2008, 14:29
-Yes, it is hard telecine
-the default of animeivtc(1) for the field matching is the line in post#11, so the line is correct and animeivtc(1) has the same.
-The advantage of animeivtc is that you can use additionnal combing removal and anti-aliasing in the same function call. Also, since hard telecine is prone to aliasing when ivtced, you most likely need aa (more noticeable in high motion scenes). It can, of course, all be done externally.
Guest
18th June 2008, 14:31
hard telecine is prone to aliasing when ivtced Please explain and justify this claim theoretically.
Vesi
18th June 2008, 14:42
Thanks thetoof, after trying alot and understan what some parmeters means a bit, I am bit confuse with estart1=x,eend1=x,istart1=x,iend1=xon how to use these?
thetoof
18th June 2008, 14:59
Please explain and justify this claim theoretically.
I don't know the "theory" behind it, but that's what I've seen in practice. For some reason it seems that the fields are not always perfectly matched, which results in residual combing near the edges or stair-stepping (solved by aa). I can't post any screenshots atm, but almost every hard telecined source I had to deal with needed aa after ivtc. Maybe I simply have bad luck :)
@ Vesi
Let's say you have a part of the episode that is telecined, some interlaced credits on top of telecined background and the rest of the episode (could be a preview... doesn't matter, as long as it's telecined).
This is : e1 + i1 + e2 (pureint=4)
So, you'll need to tell when each section of the clip starts and ends.
For e1, you use estart1/eend1, for i1, you use istart1/iend1, for e2, you use estart2/eend2, etc etc etc
You must get the frame numbers with check=x Read the "Truly interlaced (mode=3, 4 or 6)" section of the guide to know which one to use, or follow the error messages in the function :p
thetoof
19th June 2008, 01:56
New version is up, but I didn't have the time to update the doc, so you'll have to copy-paste it from post#2 and read the following to know the mods
- No more "HD" setting (done automatically)
- Speed improvement (killcomb can't be disabled... it slowed things down anyways and it has minimal impact on the details)
- decimate=0 can be used with any mode as a preparation to mode=7 (run a lossless rendering pass of decimate=0 and then load the resulting file with mode=7) for compressibility improvement through VFR
I didn't have the time to add support for 30p on top of 24t, so you'll have to use daa().trim() for now.
I'll be out of town and won't have access to a computer for a few weeks starting June 20th, so if you need support, post in the thread and hope someone can help you.
I'll read all the posts when I come back, so no need to send me any PMs.
elguaxo
19th June 2008, 02:08
thanks thetoof!
Guest
19th June 2008, 03:30
I don't know the "theory" behind it, but that's what I've seen in practice. For some reason it seems that the fields are not always perfectly matched, which results in residual combing near the edges or stair-stepping (solved by aa). I can't post any screenshots atm, but almost every hard telecined source I had to deal with needed aa after ivtc. That's what I thought you meant. OK, so now the question is are you applying the aa to only the badly matched frames or to all of them? They should be rare, so if you apply it unconditionally, you may be doing more damage than good.
egrimisu
19th June 2008, 18:10
Ok guys this is my source http://w17.easy-share.com/1700682720.html what setting shall i use to gain the best possible quality. Please feel free to write the code ;)
Please write me what kind of source i have. I think that the op and end are duble hard telecine and the middle is progressive since i don't see any kind of iterlancing or blending.
What means E and I form Eestart1=x,Eend1=x,Istart1=x,Iend1=x.
thetoof
20th June 2008, 16:17
@neuron2
From what I've seen, encoding progressive as interlaced can mess up the fields (they'll be shifted by 1 or 2 pixels), so in this case all the frames need aa . Also (again, from what I've seen), sources on which there's no mess up will have their fields matched correctly, so the matched frames and the progressive ones will need the same type of aa.
Also, to IVTC DHT, animeivtc bobs every frame, so when progressive frames are bobbed, they most likely need aa afterwards.
For all that, the same aa method is applied on all the frames.
@ egrimisu
Woah, that's intense! I have created a mode for this, but I never thought someone would ever need to use it :p
Telecined (op) + 30p (middle) = hybrid
hybrid + 30i on top of it (credits) = mode=6
animeivtc(6,pureint=?,omode=2, istartx/iendx/estartx/eendx=?)
For the pureint and istart settings, there are a few posts in this thread where I explained how to know what to use, so read those and the guide.
This is a 2 pass VFR mode
I didn't include the option of making it 23,976fps because you'd have apply blend decimation on your episode + do a mocomped framerate conversion for the credits, which is freaking slow and would not look very good imo. I you need it, I can implement it when I come back.
Guest
20th June 2008, 17:19
From what I've seen, encoding progressive as interlaced can mess up the fields (they'll be shifted by 1 or 2 pixels That makes no sense to me. Since you say you've seen it, can you please link a sample stream, or explain better what effect you are talking about. I don't see how encoding progressive content as interlaced can "mess up the fields" in the way that you claim.
thetoof
20th June 2008, 18:12
I don't know either how it can lead to that, but when I saw this, that's what I concluded... (Yeah, it's not anime, but it's the most obvious I could find atm)
Original (http://img258.imageshack.us/img258/3383/originalkn8.jpg) // AA (http://img157.imageshack.us/img157/1923/aawc6.jpg)
A tiny bit of detail was lost, but imo it's a small price to pay for the improvement that was done on the source.
Maybe I wasn't clear because of the terms I used, but this is what I mean by "field mess-up that can be corrected by aa".
Didée
20th June 2008, 18:24
It could easily be shown that a frame that has been matched from different fields of a lossy-compressed interlaced source will be of lower quality, compared to the same frame that has been progressively compressed in its progressive state.
This also means that after applying IVTC to a hard-telecined source, the result is worse than with the progressive counterpart. The loss happened during compression of the pulldown'ed source.
thetoof
20th June 2008, 18:32
Sure, but that doesn't explain why the progressive frame appears as it does (looks combed, but not on every field... that's why I said that some fields looked "shifted").
Guest
20th June 2008, 18:50
You haven't provided a stream as I requested. Who knows how you got that "original" and if it is a correctly matched frame. We were talking about what happens with correctly matched frames. Your claim was that interlaced encoding of progressive content "messes up the fields". Your pictures don't demonstrate that.
Anyway, you seem more interested in making unsupported dubious claims than in understanding things, so I will disappear.
thetoof
20th June 2008, 19:03
The screenshot is frame #52 of this (http://www.mediafire.com/?jtu9ztbzobx) source. Is is one of the progressive frames in the 3:2 pattern of the clip (seems to be a mix of soft and hard telecine, correct me if I'm wrong). I showed this image to demonstrate that this can even appear in the frames that are not matched, but simply copied from the original stream because you said I don't see how encoding progressive content as interlaced can "mess up the fields" in the way that you claim.
This'll be my last post for a while since I have to go in a few minutes, so I'll solve this issue when I come back. (no, I'm not more interested in making unsupported dubious claims than understanding things... I simply tried to answer too fast in the time that I had to explain what I saw and thought you were asking for progressive frames instead of correctly matched frames)
Guest
20th June 2008, 21:01
seems to be a mix of soft and hard telecine, correct me if I'm wrong How can I do that if you don't give me the stream, which I asked for twice?
jeffy
20th June 2008, 21:43
The screenshot is frame #52 of http://www.mediafire.com/?jtu9ztbzobx this source.
(url expanded)
How can I do that if you don't give me the stream, which I asked for twice?
He did.
Guest
20th June 2008, 22:03
Ah, thanks, I didn't notice the link on the word "this" due to my crappy laptop display. Can't look at it until this evening as my company blocks storage sites.
Guest
20th June 2008, 23:16
Original (http://img258.imageshack.us/img258/3383/originalkn8.jpg) // AA (http://img157.imageshack.us/img157/1923/aawc6.jpg)
A tiny bit of detail was lost, but imo it's a small price to pay for the improvement that was done on the source. I don't see any improvement. What are you talking about, specifically? Where is this "field mess-up" you are talking about?
In any case, that frame is progressively encoded, so it's not an example of encoding progressive content as interlaced "messing up the fields".
lexor
21st June 2008, 01:18
I don't see any improvement. What are you talking about, specifically? Where is this "field mess-up" you are talking about?
The artifacts are quite visible in the first image. Look at the green area, you'll see the horizontal lines (alt-tab between pics, it'll become quite apparent).
As for the rest of your argument you should probably hold off on that for a few weeks for thetoof to get back.
Guest
21st June 2008, 01:37
OK, it shows even more of that on the pole. The frames on either side of 52 look clean, so maybe this originated from poorly deinterlaced video or some other pathology. So we have a crappy source. But it was cited as an example of how (it was claimed) that encoding interlaced with progressive content messes up the fields. First, the fields are not "messed up", and second it is not encoded interlaced. So this example fails to support the claim we were discussing.
My guess is that we're just seeing the blurring effect of aa removing some residual deinterlacing artifacts.
egrimisu
24th June 2008, 07:58
How can i find out at what frame it end the op witch is interlanced and when start the progresive part and where stops and start the ed witch is interlanced again? Is there something for this? If the anime is hard interlanced (mode=1) my CPU run's it in real time :D, it would be nice if other settings were that fast.
mahsah
26th June 2008, 20:17
I've gotten good results with a hard telecined source using the guide, but I want to use the VFR option (mode=7). You say I should use it after everything else; do you mean I should IVTC normally, run filters, run a lossless pass, and then do the mode=7 after that?
EDIT:
Also, is AA really neccessary for a hard telecined source (IE mode=1)? I don't really see any jaggies...
egrimisu
27th June 2008, 09:41
AA is necesary only when needed.
About VFR encoding i'm curious to, what would be the settings for VFR encode. meGUI encodes VFR if the avs script outputs VFR? What pureint is and what is the dirence between 1-7?
egrimisu
27th June 2008, 17:52
Whit the version aded in the second post no avs calling animeivtc won't start. Of i copy back the avs from the 7z archive everything works fine. Am i doing something wrong?
anonova
28th June 2008, 04:20
In mode=5, aa=1, pass=2, the tfm.txt keeps being overwritten. So I don't think mode 5 is working at all.
darktyron
29th June 2008, 19:33
Hi there. I'm ripping an anime DVD and I want to rip something like that:
Opening (IVTC 23.976 CFR) + Middle (Hybrid 24+30fps) + Ending (Bobbed at 60 fps) + IVTC (23.976fps CFR)
What mode should I use? mode = 6?
And what pureint? pureint=7? Or isn't there a pureint for I want?
Thanks in advance and sorry for my english.
egrimisu
29th June 2008, 21:00
How do i find out where the interlancing or progrssive or othe type of frames begin or end? i have dvd's exaclty like you but in some i have a few scenes where i have pure interlancing.
Hi there. I'm ripping an anime DVD and I want to rip something like that:
Opening (IVTC 23.976 CFR) + Middle (Hybrid 24+30fps) + Ending (Bobbed at 60 fps) + IVTC (23.976fps CFR)
What mode should I use? mode = 6?
And what pureint? pureint=7? Or isn't there a pureint for I want?
Thanks in advance and sorry for my english.
anonova
29th June 2008, 23:43
mode=7 seems to be also flawed. mode=7, pass=1 does not make a tfm file, and that file is needed for pass=2 (tdecimate(mode=5)).
The only case where a tfmIn file is absolutely required is in mode 5!
egrimisu
11th July 2008, 07:05
I tried to intc heidi dvd witch dgindex recognized it as 77% video that makes it mode 7 that is soft telecined and hard telecined. I used this setting but i got interlancing at peoples mouth and some times all the frame is interlanced..,and i think some blends. What am i doing wrong ?
code :
DGDecode_mpeg2source("D:\Work Heidi\VTS_01_1.d2v")
setmtmode(2)
trim(0,44300)
animeivtc(mode=1,aa=3,precision=3)
source = last
backward_vec1 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec2 = source.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = source.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = source.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
source.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
fft3dfilter(sigma=0.7, bt=1, bw=32, bh=32, ow=16, oh=16, plane=4, dehalo=0, ncpu=2)
ttempsmooth()
gradfun2db(thr=1.2)
crop (8,0,-16,0)
spline36resize(720,480)
And some screens:
http://img55.imageshack.us/img55/5161/snapshot20080711003612pz6.png
http://img91.imageshack.us/img91/7165/snapshot20080711003706uj0.png
http://img91.imageshack.us/img91/5493/snapshot20080711003926fz6.png
http://img55.imageshack.us/img55/5112/snapshot20080711003948bi7.png
http://img530.imageshack.us/img530/4474/snapshot20080711004108hy8.png
http://img91.imageshack.us/img91/6043/snapshot20080711004116iv7.png
PRoblem NR 2
I have this another anime that has progresive frames till the end and the ending theme is fully interlanced that must be bobbed to 59fps to play well.
This is the code:
animeivtc(mode=3,omode=1,pureint=1,estart1=0,eend1=44000,istart1=44001,iend1=50006,aa=0,pass=1)
And i get this error :Video framerate does not match.
Nightshiver
13th July 2008, 00:44
I had the same problem you did. You have to use the check= functions to find out the real frame numbers. The ones you are using are incorrect.
DarkT
13th July 2008, 16:02
wanted to try out animeIVTC, got a problem, here's my line:
AnimeIVTC(mode=3,search=3,overlap=6,pel=4,omode=2,pureint=4,estart1=0,eend1=38678,istart1=38679,iend1=40759,estart2=40760,eend2=41090)
Got this error:
Script error: there is no function named "isodd"
Suggestions?
egrimisu
15th July 2008, 13:13
I had the same problem you did. You have to use the check= functions to find out the real frame numbers. The ones you are using are incorrect.
An how shall i use check?
Nightshiver
26th July 2008, 04:10
Man, we need thetoof to get back. I'm getting errors with the script now.
egrimisu
28th July 2008, 15:43
When is he coming back? i got a lot of stuck to deinterlance :d
martino
28th July 2008, 23:22
You can always do it manually... as long as you know what you need to do there shouldn't be much of a problem.
Nightshiver
29th July 2008, 02:52
True. But animeIVTC does a few things much easier than normal ways.
HymnToLife
6th August 2008, 22:23
Script error: there is no function named "isodd"
Suggestions?
Put this at the beginning of your script :
function isodd(n) {
return (n % 2 == 1)
}
function iseven(n) {
return (n % 2 == 0)
}
But now, using
AnimeIVTC(mode=3, omode=2, pureint=4, \
estart1=0, eend1=6011, \
istart1=15032, iend1=15609, \
estart2=6244, eend2=6359, \
aa=2)
I'm getting a "video framerate doesn't match" when AnimeIVTC tries to splice the IVTC'd and bobbed parts together. Did I miss something about how encoding VFR works?
snyft
7th August 2008, 19:48
"Script error: There is no function called repair"
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\SimpleResize.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\limitedsupport.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\RemoveGrainS.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Undot.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Convolution3DYV12.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\fft3dfilter211\fft3dfilter.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TDeint.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TIVTC.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\vinverse.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\nnedi.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TMM.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Dup.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\SangNom.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\mvtools.dll")
Import("C:\Program Files\GordianKnot\AviSynthPlugins\limitedsharpenfaster.avs")
import("C:\Program Files\GordianKnot\AviSynthPlugins\mrestore.avs")
import("C:\Program Files\GordianKnot\AviSynthPlugins\AnimeIVTC.avsi")
import("C:\Program Files\GordianKnot\AviSynthPlugins\TempGaussMC_alpha3.avsi")
import("C:\Program Files\GordianKnot\AviSynthPlugins\MCBob.avsi")
what more should i load/import?
martino
7th August 2008, 19:56
Repair? -- Repair.dll (from the RemoveGrain package).
egrimisu
7th August 2008, 20:25
just copy all the dll and avsi from the requirmensts.7z to c:\program files\avisynth 2.57\plugins\ and everything should work fine.
"Script error: There is no function called repair"
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\decomb.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\dgbob.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\SimpleResize.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\limitedsupport.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\RemoveGrainS.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Undot.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Convolution3DYV12.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\fft3dfilter211\fft3dfilter.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TDeint.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TIVTC.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\vinverse.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\nnedi.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\TMM.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\Dup.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\SangNom.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\mvtools.dll")
Import("C:\Program Files\GordianKnot\AviSynthPlugins\limitedsharpenfaster.avs")
import("C:\Program Files\GordianKnot\AviSynthPlugins\mrestore.avs")
import("C:\Program Files\GordianKnot\AviSynthPlugins\AnimeIVTC.avsi")
import("C:\Program Files\GordianKnot\AviSynthPlugins\TempGaussMC_alpha3.avsi")
import("C:\Program Files\GordianKnot\AviSynthPlugins\MCBob.avsi")
what more should i load/import?
Nightshiver
7th August 2008, 21:24
Well I keep getting the error
"Invalid arguments to function "RequestLinear" "
Mrestore.avsi line 200
animeivtc.avsi line 97
Adub
7th August 2008, 21:46
Make sure you have the latest versions of TIVTC.
Nightshiver
8th August 2008, 03:51
Nvm, I found the answer. The problem was that I was using Avisynth 2.5.8, and when I went back to 2.5.7, it worked.
egrimisu
8th August 2008, 09:35
When is the toof coming back, does anyone know?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.