View Full Version : CTools
real.finder
22nd February 2022, 23:46
I don't have your bob filter to check. Try without using CPostProcessingMask as edeint clip. It might be it failing.
About vinverse, ok. There is a problem, I can't load the page anymore.
I already don't use CPostProcessingMask now :confused:
any bob can be a problem, you can use just
bob=qtgmc
and what page? this (https://github.com/Dogway/Avisynth-Scripts/blob/eb27d2e9bba62faed1fc0a7b1058d4c115f9b0a4/MIX%20mods/QTGMC.avsi#L1273) ?
Ceppo
22nd February 2022, 23:50
With
bob = QTGMC()
CTelecineNew(nt=2,bob=true,thr60i=0.2,inputTxt=true)
CPostProcessing(0.1,0.9,isbob=true,edeint2=bob)
I don't see any problem aside QTGMC ghosting.
I already don't use CPostProcessingMask now
If you don't specify an edeint clip, is default.
real.finder
22nd February 2022, 23:57
With
bob = QTGMC()
CTelecineNew(nt=2,bob=true,thr60i=0.2,inputTxt=true)
CPostProcessing(0.1,0.9,isbob=true,edeint2=bob)
I don't see any problem aside QTGMC ghosting.
If you don't specify an edeint clip, is default.
ok, so QTGMC was not a good replacment, bob=TDeint(1) should do it
Ceppo
22nd February 2022, 23:59
About CTelecineNew getting the wrong frame, can you point a frame number from that clip?
EDIT:
I don't have TDeint :(
EDIT2:
I think there is a misunderstanding here.
If you asked me to use TDeint, then what you should do is to check:
bob=stgmc(tr0=-2,useEdiExt=1,EdiExt=sanimebob(useBWDIF=true, FastNnediHBD=true),Sharpness=0,tr2=5, Refinemotion=true, fastma=true)
#~ CTelecineNew(bob=true,write=true,thr60i=0.2)
CTelecineNew(bob=true,thr60i=0.2,inputTxt=true)
CPostProcessing(0.1,0.9,isbob=true,edeint=bob,edeint2=bob)
CDecimateNew(isBob=true,error=false)
and see if it still does it.
real.finder
23rd February 2022, 00:17
About CTelecineNew getting the wrong frame, can you point a frame number from that clip?
you mean the image above? 1444
if you mean CTelecineNew(bob=true) vs bob then it's seems fine with any bob now! maybe I did something wrong in the first time
Ceppo
23rd February 2022, 00:20
I'm glad it works now. Tomorrow I will add ex_vinverse() as a mode.
EDIT:
I also need to rewrite the old modes and make a single CTelecine function and CDecimate function. For now, I will wait some days for bugs reports. Then I will get to it. I will also add old comb detection methods to CPostProcessing for everyone's tastes. And I will add yet another field matching mode.
real.finder
23rd February 2022, 00:27
About CTelecineNew getting the wrong frame, can you point a frame number from that clip?
EDIT:
I don't have TDeint :(
EDIT2:
I think there is a misunderstanding here.
If you asked me to use TDeint, then what you should do is to check:
bob=stgmc(tr0=-2,useEdiExt=1,EdiExt=sanimebob(useBWDIF=true, FastNnediHBD=true),Sharpness=0,tr2=5, Refinemotion=true, fastma=true)
#~ CTelecineNew(bob=true,write=true,thr60i=0.2)
CTelecineNew(bob=true,thr60i=0.2,inputTxt=true)
CPostProcessing(0.1,0.9,isbob=true,edeint=bob,edeint2=bob)
CDecimateNew(isBob=true,error=false)
and see if it still does it.
yes that what was missing, thanks
bob1=CTelecineNew(bob=true)
bob2=stgmc(useEdiExt=2,EdiExt=sanimebob(useBWDIF=true, FastNnediHBD=true),Sharpness=0,tr2=2,ESearchP=true, Refinemotion=true, fastma=true)
#~ CTelecineNew(bob=true,write=true,thr60i=0.2)
CTelecineNew(bob=true,thr60i=0.2,inputTxt=true)
CPostProcessing(0.1,0.9,isbob=true,edeint=bob1,edeint2=bob2)
CDecimateNew(isBob=true,error=false)
Ceppo
23rd February 2022, 00:38
Just wondering, you guys prefer 2 dlls, one with IVTC stuff and one with CDuplicate stuff or is fine a single one?
kedautinh12
23rd February 2022, 01:21
Tdeint here:
https://github.com/pinterf/TIVTC/releases
real.finder
23rd February 2022, 01:58
Just wondering, you guys prefer 2 dlls, one with IVTC stuff and one with CDuplicate stuff or is fine a single one?
I don't mind either case
I did vfr test with dvd, seems ok in everything for now but I note that the 60i detected not work good with some sources even with thr60i=0.1 here small sample https://www.sendspace.com/file/96xnbn
Ceppo
23rd February 2022, 03:17
You are not getting it because you are getting false n matches. With:
CTelecineNew(bob=true,nt=0,write=true)
I get all 2s with default thr60i.
Also, thanks for TDeint :)
real.finder
23rd February 2022, 04:45
You are not getting it because you are getting false n matches. With:
CTelecineNew(bob=true,nt=0,write=true)
I get all 2s with default thr60i.
perfect, :thanks:
Ceppo
23rd February 2022, 19:22
real.finder:
I want to add ex_vinverse but I don't have the "ex_" functions. They are not in the link you provided. Can you give me a link to those functions?
real.finder
23rd February 2022, 19:50
real.finder:
I want to add ex_vinverse but I don't have the "ex_" functions. They are not in the link you provided. Can you give me a link to those functions?
sure https://github.com/Dogway/Avisynth-Scripts/blob/master/ExTools.avsi
Ceppo
23rd February 2022, 20:35
v1.0.7
- Added VFR to CFR support to CDecimateNew.
- Fixed VFR file grammar.
- Added mode parameter to CTelecineNew. (mode=1 is ex_vinverse).
For the CFR clip:
https://www.mediafire.com/file/glpcaw80hmapdf9/VFRtoCFR.mkv/file
CDecimateNew(error=false,iClip=iClip3(0))
iClip3 will interpolate 30/60fps to 24fps.
real.finder
23rd February 2022, 21:34
thanks for the new update, this is a good idea for peoples who don't want vfr
I can't do HBD, I need a sample plugin like invertneg that handles HBD, otherwise, I need to look at the API to understand, and is kind a lot of work since I need to learn a lot of new things :(
what about https://github.com/pinterf/Average/commit/d2efdeea4d04a3eed52b46931bd4816cda1296df since it https://forum.doom9.org/showthread.php?p=1864943#post1864943
and as update for this case https://forum.doom9.org/showthread.php?p=1964470#post1964470 nt=0 make some frames with only move mouth have interlaced combs
Ceppo
23rd February 2022, 22:19
what about https://github.com/pinterf/Average/c...d4816cda1296df since it https://forum.doom9.org/showthread.p...43#post1864943
That's a good filter to study. Thanks a lot!
and as update for this case https://forum.doom9.org/showthread.p...70#post1964470 nt=0 make some frames with only move mouth have interlaced combs
The ancient "mouth problem". I have an idea to fix that, but I'm not going to add that before adding the other 3 matching modes. So before I try this new method some time will pass. ATM you can use a nt parameter to fix the mouth. Then give a quick look at the txt file and fix the sections which don't have all consecutive 2s due to false n matches.
EDIT:
I get a 100fps drop using mode=1, shouldn't it be faster? How is going for you?
real.finder
23rd February 2022, 23:20
EDIT:
I get a 100fps drop using mode=1, shouldn't it be faster? How is going for you?
not always since the dll may has asm code, anyway the point of ex_vinverse is the HBD and quality in general
Ceppo
24th February 2022, 07:57
v1.0.8
- Added mode=2 and mode2thr paramater in CTelecineNew.
- Fixed CTelecineNew(bob=true,inputTxt=true) bug.
- Minor speed up for mode=0/1. From 250 fps to 280fps.
Example of mode=2 for moire effect.
https://www.mediafire.com/file/vc6gkachguotlcp/mode2.mkv/file
#CFieldSofter()
#CTelecineNew(mode=2,write=true)
CTelecineNew(inputTxt=true)
CDecimateNew()
kedautinh12
24th February 2022, 09:31
With github account, you can update your script to this sever :D
Ceppo
24th February 2022, 10:23
I will do that in the future. I want to remove all the junk code first.
Ceppo
26th February 2022, 21:27
v1.0.9
- Added mode=3 and mode=4 to CTelecineNew.
- Added CDegrain.
- Added CSharpen.
Now I'm on the mouth problem.
Milardo
26th February 2022, 22:08
All filters are for YV12 8bit videos!
The plugins in CTools.avsi are not necessary. They are short and self explanatory.
You can mod/delete them if you want unless is stated so in the file.
Syntax=>
CSharpen(clip "blur", int "nt", bool "Sqrt")
CDegrain(int "radius", int "nt", int "thr", clip "dClip")
CTelecineNew(float "sstr", int "nt", bool "bob", bool "write", bool "inputTxt", float "thr60i", int "nt60i", float "mode2thr")
CDecimateNew(bool "isBob", bool "error", bool "heuristic", clip "iClip")
CPostProcessing(float "thr", float "thr2", float "sstr", int "ntC", int "ntM", bool "isBob", clip "edeint", clip "edeint2")
CDuplicate(float "thr", int "nt", clip "dClip", bool "write")
CFieldDuplicate(float "thr", float "thr2", int "nt", clip "dClip", bool "write", bool "inputTxt")
CDropFrame()
CReplaceFrame()
CInterpolate(float "thr", int "nt", clip "dClip", clip "iClip", bool "write", bool "inputTxt")
CTelecine(int "thr", int "thr2", int "blkthr", int "blksize", int "mode", int "metric", int "nt", bool "sse", clip "edeint", clip "edeint2", bool "write", bool "inputTxt", bool "match")
CTelecine2(int "thr", int "thr2", int "blkthr", int "blksize", int "mode", int "metric", int "nt", bool "sse", clip "edeint", clip "edeint2", bool "write", bool "inputTxt")
CFieldDeBlend(float "thr", int "nt", clip "dClip", bool "prev", bool "bob")
CDecimate(bool "CTelecine", bool "CDuplicate")
CDecimate2()
CSceneChange(bool "write")
CSetPattern(int "start", int "end", bool "CCCCC", bool "NNCCC", bool "CNNCC", bool "CCNNC", bool "CCCNN", bool "NCCCN")
CGuessPattern()
CFieldDifference(int "mode", int "nt", bool "sse", bool "write", clip "dClip")
v1.0.9 (https://www.mediafire.com/file/5l6jdc3ok0fhpa5/CTools_v1.0.9.zip/file)
Hi, I read the readme.txt file, but
what does "CInterpolate" actually do?
Is this some sort of something like SVP? If so, can you provide a sample avs file how to use it exactly?
Ceppo
26th February 2022, 22:14
Hi, I read the readme.txt file, but
what does "CInterpolate" actually do?
Is this some sort of something like SVP? If so, can you provide a sample avs file how to use it exactly?
Sorry, the name is misleading. It takes a MFlowInter clip (iClip parameter) from mvtools2 and replace frames that are duplicate with respect to the previous frame but are not duplicate with respect to the following frame. This is meant to smooth the motion of bobbed clip or 24fps anime while preserving the original animations (true 24/60fps).
Milardo
26th February 2022, 22:19
Sorry, the name is misleading. It takes a MFlowInter clip (iClip parameter) from mvtools2 and replace frames that are duplicate with respect to the previous frame but are not duplicate with respect to the following frame. This is meant to smooth the motion of bobbed clip or 24fps anime while preserving the original animations (true 24/60fps).
Ok. When you say smooth, it has nothing to do with motion interpolation though right? Even if one has 24 fps video source?
Ceppo
26th February 2022, 22:32
Ok. When you say smooth, it has nothing to do with motion interpolation though right? Even if one has 24 fps video source?
It takes the interpolated frame from MFlowInter, so a duplicate in the way a said above will be replaced with the interpolated frame, so the motion will be smoother (as long interpolation artifacts allow that).
Try:
src = last
super = MSuper()
backvec = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
iClip = MCompensate(super,backvec,time=50)
CInterpolate(iClip=iClip)
last
On an anime clip @ 24fps. To see what I mean.
Ceppo
26th February 2022, 23:57
real.finder:
I was thinking maybe CDegrain can be used to replace TemporalSoften in QTGMC, something like :CDegrain(3,10,240,dClip=ex_reduceFlicker(3,true))
The QTGMC_KeepOnlyBobShimmerFixes function should work better on that.
real.finder
27th February 2022, 00:18
real.finder:
I was thinking maybe CDegrain can be used to replace TemporalSoften in QTGMC, something like :CDegrain(3,10,240,dClip=ex_reduceFlicker(3,true))
The QTGMC_KeepOnlyBobShimmerFixes function should work better on that.
the one who updating QTGMC now is Dogway not me :) https://forum.doom9.org/showthread.php?t=182881 so I think it's better to post there so Dogway will note it
edit: anyway after I see https://forum.doom9.org/showthread.php?t=183874 I am thinking about make sanimebob2 using your code and some others, so maybe I will add this to stgmc as an option to be used in sanimebob2
Ceppo
27th February 2022, 01:05
the one who updating QTGMC now is Dogway not me https://forum.doom9.org/showthread.php?t=182881 so I think it's better to post there so Dogway will note it
Will do. But what do you think about it?
edit: anyway after I see https://forum.doom9.org/showthread.php?t=183874 I am thinking about make sanimebob2 using your code and some others, so maybe I will add this to stgmc as an option to be used in sanimebob2
Glad to be of use.
EDIT:
Also can you link me the post with your filters? I can't find them.
Milardo
27th February 2022, 01:34
It takes the interpolated frame from MFlowInter, so a duplicate in the way a said above will be replaced with the interpolated frame, so the motion will be smoother (as long interpolation artifacts allow that).
Try:
src = last
super = MSuper()
backvec = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
iClip = MCompensate(super,backvec,time=50)
CInterpolate(iClip=iClip)
last
On an anime clip @ 24fps. To see what I mean.
OK. Did you mention that this also works on 60 fps video source too?
I tried it on a live 60 fps video source and it made the video smoother in my opinion (motion interpolation).
Is that the point of the filter?
Can you show me an example with the other parameters to adjust for more interpolation/smoothness?
Ceppo
27th February 2022, 01:45
OK. Did you mention that this also works on 60 fps video source too?
I tried it on a live 60 fps video source and it made the video smoother in my opinion (motion interpolation).
Is that the point of the filter?
Can you show me an example with the other parameters to adjust for more interpolation/smoothness?
I'm currently encoding a source, so I can't encode, so, if you could wait, I will. Also if you upload a sample, I will tweak it for that sample so that I can better show you.
EDIT:
EXAMPLES (https://www.mediafire.com/file/zhja4ik2nizosvx/example.zip/file)
Messed a bit with mvtools. Came up with that to reduce artefacts.
MCompensate clip:
AddBorders(0,0,1280%64,720%64)
src = last
super = MSuper()
backvec1 = MAnalyse(super,blksize=4,overlap=2,isb=true,delta=1)
backvec2 = MAnalyse(super,blksize=8,overlap=4,isb=true,delta=1)
backvec3 = MAnalyse(super,blksize=16,overlap=8,isb=true,delta=1)
backvec4 = MAnalyse(super,blksize=32,overlap=16,isb=true,delta=1)
backvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
iClip1 = MCompensate(super,backvec1,time=50)
iClip2 = MCompensate(super,backvec2,time=50)
iClip3 = MCompensate(super,backvec3,time=50)
iClip4 = MCompensate(super,backvec4,time=50)
iClip5 = MCompensate(super,backvec5,time=50)
ScriptClip("""
AverageLuma(MMask(backvec1,kind=1,ml=255)) < 1 ? iClip1 : \
AverageLuma(MMask(backvec2,kind=1,ml=255)) < 1 ? iClip2 : \
AverageLuma(MMask(backvec3,kind=1,ml=255)) < 1 ? iClip3 : \
AverageLuma(MMask(backvec4,kind=1,ml=255)) < 1 ? iClip4 : iClip5
""")
CInterpolate(src,iClip=last)
Crop(0,0,-(1280%64),-(720%64))
MFlowInter clip (slow)
AddBorders(0,0,1280%64,720%64)
src = last
super = MSuper()
backvec1 = MAnalyse(super,blksize=4,overlap=2,isb=true,delta=1)
forwvec1 = MAnalyse(super,blksize=4,overlap=2,isb=false,delta=1)
backvec2 = MAnalyse(super,blksize=8,overlap=4,isb=true,delta=1)
forwvec2 = MAnalyse(super,blksize=8,overlap=4,isb=false,delta=1)
backvec3 = MAnalyse(super,blksize=16,overlap=8,isb=true,delta=1)
forwvec3 = MAnalyse(super,blksize=16,overlap=8,isb=false,delta=1)
backvec4 = MAnalyse(super,blksize=32,overlap=16,isb=true,delta=1)
forwvec4 = MAnalyse(super,blksize=32,overlap=16,isb=false,delta=1)
backvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
forwvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=false,delta=1)
iClip1 = MFlowInter(super,backvec1,forwvec1,time=50,blend=false)
iClip2 = MFlowInter(super,backvec2,forwvec2,time=50,blend=false)
iClip3 = MFlowInter(super,backvec3,forwvec3,time=50,blend=false)
iClip4 = MFlowInter(super,backvec4,forwvec4,time=50,blend=false)
iClip5 = MFlowInter(super,backvec5,forwvec5,time=50,blend=false)
ScriptClip("""
AverageLuma(MMask(backvec1,kind=1,ml=255)) < 1 ? iClip1 : \
AverageLuma(MMask(backvec2,kind=1,ml=255)) < 1 ? iClip2 : \
AverageLuma(MMask(backvec3,kind=1,ml=255)) < 1 ? iClip3 : \
AverageLuma(MMask(backvec4,kind=1,ml=255)) < 1 ? iClip4 : iClip5
""")
CInterpolate(src,iClip=last)
Crop(0,0,-(1280%64),-(720%64))
@ 24fps the artefacts are easy to spot, but it should not be so if you use it on a bobbed clip @60fps.
real.finder
27th February 2022, 18:15
Will do. But what do you think about it?
I can't say unless I test
Also can you link me the post with your filters? I can't find them.
in my forum signature blow
gispos
27th February 2022, 18:54
Will do. But what do you think about it?
For me it's 3 FPS (16%) slower on full HD. It should also be renamed, ex_QTGMC or similar.
@real.finder please do not completely abandon support for the 'original' QTGMC!
Ceppo
27th February 2022, 23:18
For me it's 3 FPS (16%) slower on full HD. It should also be renamed, ex_QTGMC or similar.
Did you see some improvement like less ghosting or something? Once I have done with the plugin I might look into it.
in my forum signature blow
I checked there, but I can't find the 2 filters. I'm missing something... :)
real.finder
27th February 2022, 23:59
sanimebob is part of my animeivtc mod, stgmc and any new things https://github.com/realfinder/AVS-Stuff as the big note said there :)
Ceppo
28th February 2022, 01:26
Mystery solved! :)
real.finder
28th February 2022, 16:47
v1.0.9
- Added mode=3 and mode=4 to CTelecineNew.
what about adding mode 5 using IT method https://github.com/HomeOfVapourSynthEvolution/VapourSynth-IT ?
also the tfm method has slow parameter
slow -
Sets which field matching fuction is used. Possible settings:
0 - normal (should have the worst accuracy)
1 - slower
2 - slowest (should have the best accuracy)
This is basically a quality vs. speed option (the slower the function the more
accurate it should be). Prior to v0.9.9.1 of tfm this was a boolean value, true
from previous versions corresponds to a current value of 1 and false corresponds
to a current value of 0.
Default: 1 (int)
kedautinh12
28th February 2022, 16:59
Avs ver
http://avisynth.nl/index.php/IT
real.finder
28th February 2022, 17:15
Avs ver
http://avisynth.nl/index.php/IT
vs one based on avs one, and avs IT has no c code so it hard to read it
kedautinh12
28th February 2022, 17:31
vs one based on avs one, and avs IT has no c code so it hard to read it
I think CTools is avs ver so i share avs ver of IT is acceptable
Ceppo
1st March 2022, 01:03
Thanks guys. About mode 5, I can't read both avs and vs versions :), I might need some time. It would be easier if I knew the "concept" of that filter so that I can implement it my own way. About TFM slow parameter, when I did TelecineBob, I found it not much needed, but I might look into it again.
EDIT: mode 4 runs at 500fps to me. What's the point of making it faster and losing precision?
Ceppo
1st March 2022, 02:12
v1.1.0
- Removed Sqrt parameter from CSharpen.
- Added mode parameter to CSharpen + new sharpening mode.
- Added CDeHalo.
- Added CAntiAliasing.
- Added ntN parameter to CTelecineNew for mode 3, 4.
- CTelecineNew default mode is now 3.
My idea for the mouth problem didn't work on anime. So it was pointless :). I had another idea for mode 3 and mode 4. Just decrease ntN parameter to get less false n matches.
gispos
1st March 2022, 17:45
Did you see some improvement like less ghosting or something? Once I have done with the plugin I might look into it.
There are minimal differences in my default settings.
For me, there is no winner. In some areas STGMC is a bit more contoured and in others Dogway's QTGMC is a bit more contoured. By that I also mean ghosting or blurr removed.
But I haven't tested any other settings. You have to test it yourself, some like it that way, others like it differently.
Milardo
2nd March 2022, 23:17
I'm currently encoding a source, so I can't encode, so, if you could wait, I will. Also if you upload a sample, I will tweak it for that sample so that I can better show you.
EDIT:
EXAMPLES (https://www.mediafire.com/file/zhja4ik2nizosvx/example.zip/file)
Messed a bit with mvtools. Came up with that to reduce artefacts.
MCompensate clip:
AddBorders(0,0,1280%64,720%64)
src = last
super = MSuper()
backvec1 = MAnalyse(super,blksize=4,overlap=2,isb=true,delta=1)
backvec2 = MAnalyse(super,blksize=8,overlap=4,isb=true,delta=1)
backvec3 = MAnalyse(super,blksize=16,overlap=8,isb=true,delta=1)
backvec4 = MAnalyse(super,blksize=32,overlap=16,isb=true,delta=1)
backvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
iClip1 = MCompensate(super,backvec1,time=50)
iClip2 = MCompensate(super,backvec2,time=50)
iClip3 = MCompensate(super,backvec3,time=50)
iClip4 = MCompensate(super,backvec4,time=50)
iClip5 = MCompensate(super,backvec5,time=50)
ScriptClip("""
AverageLuma(MMask(backvec1,kind=1,ml=255)) < 1 ? iClip1 : \
AverageLuma(MMask(backvec2,kind=1,ml=255)) < 1 ? iClip2 : \
AverageLuma(MMask(backvec3,kind=1,ml=255)) < 1 ? iClip3 : \
AverageLuma(MMask(backvec4,kind=1,ml=255)) < 1 ? iClip4 : iClip5
""")
CInterpolate(src,iClip=last)
Crop(0,0,-(1280%64),-(720%64))
MFlowInter clip (slow)
AddBorders(0,0,1280%64,720%64)
src = last
super = MSuper()
backvec1 = MAnalyse(super,blksize=4,overlap=2,isb=true,delta=1)
forwvec1 = MAnalyse(super,blksize=4,overlap=2,isb=false,delta=1)
backvec2 = MAnalyse(super,blksize=8,overlap=4,isb=true,delta=1)
forwvec2 = MAnalyse(super,blksize=8,overlap=4,isb=false,delta=1)
backvec3 = MAnalyse(super,blksize=16,overlap=8,isb=true,delta=1)
forwvec3 = MAnalyse(super,blksize=16,overlap=8,isb=false,delta=1)
backvec4 = MAnalyse(super,blksize=32,overlap=16,isb=true,delta=1)
forwvec4 = MAnalyse(super,blksize=32,overlap=16,isb=false,delta=1)
backvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
forwvec5 = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=false,delta=1)
iClip1 = MFlowInter(super,backvec1,forwvec1,time=50,blend=false)
iClip2 = MFlowInter(super,backvec2,forwvec2,time=50,blend=false)
iClip3 = MFlowInter(super,backvec3,forwvec3,time=50,blend=false)
iClip4 = MFlowInter(super,backvec4,forwvec4,time=50,blend=false)
iClip5 = MFlowInter(super,backvec5,forwvec5,time=50,blend=false)
ScriptClip("""
AverageLuma(MMask(backvec1,kind=1,ml=255)) < 1 ? iClip1 : \
AverageLuma(MMask(backvec2,kind=1,ml=255)) < 1 ? iClip2 : \
AverageLuma(MMask(backvec3,kind=1,ml=255)) < 1 ? iClip3 : \
AverageLuma(MMask(backvec4,kind=1,ml=255)) < 1 ? iClip4 : iClip5
""")
CInterpolate(src,iClip=last)
Crop(0,0,-(1280%64),-(720%64))
@ 24fps the artefacts are easy to spot, but it should not be so if you use it on a bobbed clip @60fps.
Ok. I don't really have any samples, i am testing using a live 60 fps video source capture card.
I don't know if your filter is designed to do this, but can you post an example for a source like mine, to get it as as smooth as possible, i'm doing this for realtime playback. Does adjusting any of the parameters like "thr" do anything for that?
Ceppo
3rd March 2022, 05:12
Ok. I don't really have any samples, i am testing using a live 60 fps video source capture card.
I don't know if your filter is designed to do this, but can you post an example for a source like mine, to get it as as smooth as possible, i'm doing this for realtime playback. Does adjusting any of the parameters like "thr" do anything for that?
I don't have a source like yours. Anyway the filter is designed for videos who have duplicate frames, a non anime source should not have duplicate unless your source is telecined and instead of dropping the duplicate you interpolate it with CInterpolate + mvtools. In other cases you don't need it. CInterpolate's parameters are all about finding duplicates, if you want more interpolation set an higher thr value so that more duplicates are detected. The interpolation job is done by mvtools, CInterpolate will just detect the duplicate.
Milardo
3rd March 2022, 06:02
I don't have a source like yours. Anyway the filter is designed for videos who have duplicate frames, a non anime source should not have duplicate unless your source is telecined and instead of dropping the duplicate you interpolate it with CInterpolate + mvtools. In other cases you don't need it. CInterpolate's parameters are all about finding duplicates, if you want more interpolation set an higher thr value so that more duplicates are detected. The interpolation job is done by mvtools, CInterpolate will just detect the duplicate.
src = last
super = MSuper()
backvec = MAnalyse(super,blksize=64,overlap=32,lambda=1000*64,isb=true,delta=1)
iClip = MCompensate(super,backvec,time=50)
CInterpolate(iClip=iClip, thr=1.00)
last
Would this script be the basic example and did i get "thr=1.00" a possible value?
Ceppo
3rd March 2022, 08:36
Use this presets. You should toy with mvtools to see what you like and what you don't like tho.
function iClip(clip src)
{
src
super = MSuper()
backvec = MAnalyse(super,blksize=4,overlap=2,isb=true,delta=1)
forwvec = MAnalyse(super,blksize=4,overlap=2,isb=false,delta=1)
MFlowInter(src,super,backvec,forwvec,blend=false,time=50)
return last
}
function iClip2(clip src)
{
src
super = MSuper()
backvec = MAnalyse(super,blksize=64,overlap=32,isb=true,delta=1)
forwvec = MAnalyse(super,blksize=64,overlap=32,isb=false,delta=1)
MFlowInter(src,super,backvec,forwvec,blend=false,time=50)
return last
}
So you do:
CInterpolate(iClip=iClip())
or
CInterpolate(iClip=iClip2())
You can use thr=1.0 if you want, sure. It will detect more frames as duplicates.
You can also set a denoise to get a better duplicate detection against noise.
CInterpolate(iClip=iClip2(),dClip=FFT3DFilter(sigma=4))
real.finder
3rd March 2022, 22:17
EDIT: mode 4 runs at 500fps to me. What's the point of making it faster and losing precision?
I was thinking about the opposite :) which is make it slower optionally
real.finder
3rd March 2022, 23:14
My idea for the mouth problem didn't work on anime. So it was pointless :). I had another idea for mode 3 and mode 4. Just decrease ntN parameter to get less false n matches.
is there a way to not match with n in first place? like mode=0 in tfm
0 = 2-way match (p/c)
I did try ntN=0 for https://forum.doom9.org/showthread.php?p=1964470#post1964470 but it not work well
edit: the n matching doesn't make sense for "tff: top field first" source anyway as the p matching doesn't make sense for "bff: bottom field first", maybe we need option to limit the matching for p/c for tff and p/n for bff
about idea for mouth problem I remember this was a good fix https://github.com/realfinder/AVS-Stuff/blob/c6a3ece311f825c346760cfae9ef518758b5d578/avs%202.5%20and%20up/AnimeIVTC.avsi#L84 and https://github.com/realfinder/AVS-Stuff/blob/c6a3ece311f825c346760cfae9ef518758b5d578/avs%202.5%20and%20up/AnimeIVTC.avsi#L289
the basic idea of it is to compare the output with the bob output using https://github.com/pinterf/TIVTC/blob/9c47880b3db1691ee928a6e1b953eedd852a6d1c/Doc_TIVTC/FrameDiff%20-%20READ%20ME.txt#L24
you can use the concept but instead of reverse the field it will be the output of "mode 4 (TIVTC)" vs "mode 3 (Decomb)" or optionally even better like mode 4 vs mode 3 vs mode 2
by maybe make "mode -1" mean "mode 4 vs mode 3" and "mode -2" mean "mode 4 vs mode 3 vs mode 2" and "mode -3" mean "mode 4 vs mode 3 vs mode 2 vs mode 1"
Ceppo
4th March 2022, 06:50
is there a way to not match with n in first place? like mode=0 in tfm
CTelecineNew(bob=true).SelectEven() is p match only.
edit: the n matching doesn't make sense for "tff: top field first" source anyway as the p matching doesn't make sense for "bff: bottom field first", maybe we need option to limit the matching for p/c for tff and p/n for bff
The parity is internally detected, if change the field order like AssumeBFF() for a TFF one. You are going to get the wrong result, I think it is b/u match from TFM. Which don't make any sense to me.
I was thinking about the opposite which is make it slower optionally
Well, it's the slowest formula already :).
the basic idea of it is to compare the output with the bob output using https://github.com/pinterf/TIVTC/blo...D%20ME.txt#L24
I think that's something to do after CPostProcessing, that I have yet to update with the other modes. But I will think about it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.