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 > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th February 2022, 01:45   #81  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
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
Messed a bit with mvtools. Came up with that to reduce artefacts.
MCompensate clip:
Code:
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)
Code:
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.

Last edited by Ceppo; 27th February 2022 at 04:01.
Ceppo is offline   Reply With Quote
Old 27th February 2022, 18:15   #82  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
Will do. But what do you think about it?
I can't say unless I test

Quote:
Also can you link me the post with your filters? I can't find them.
in my forum signature blow
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 27th February 2022, 18:54   #83  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 1,002
Quote:
Originally Posted by Ceppo View Post
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!
__________________
Live and let live
gispos is offline   Reply With Quote
Old 27th February 2022, 23:18   #84  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
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.
Quote:
in my forum signature blow
I checked there, but I can't find the 2 filters. I'm missing something...
Ceppo is offline   Reply With Quote
Old 27th February 2022, 23:59   #85  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
sanimebob is part of my animeivtc mod, stgmc and any new things https://github.com/realfinder/AVS-Stuff as the big note said there
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th February 2022, 01:26   #86  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Mystery solved!
Ceppo is offline   Reply With Quote
Old 28th February 2022, 16:47   #87  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
v1.0.9
- Added mode=3 and mode=4 to CTelecineNew.
what about adding mode 5 using IT method https://github.com/HomeOfVapourSynth...VapourSynth-IT ?

also the tfm method has slow parameter

Quote:
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)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th February 2022, 16:59   #88  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Avs ver
http://avisynth.nl/index.php/IT
kedautinh12 is offline   Reply With Quote
Old 28th February 2022, 17:15   #89  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by kedautinh12 View Post
vs one based on avs one, and avs IT has no c code so it hard to read it
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th February 2022, 17:31   #90  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
Quote:
Originally Posted by real.finder View Post
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
kedautinh12 is offline   Reply With Quote
Old 1st March 2022, 01:03   #91  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
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?

Last edited by Ceppo; 1st March 2022 at 01:27.
Ceppo is offline   Reply With Quote
Old 1st March 2022, 02:12   #92  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
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.
Ceppo is offline   Reply With Quote
Old 1st March 2022, 17:45   #93  |  Link
gispos
Registered User
 
Join Date: Oct 2018
Location: Germany
Posts: 1,002
Quote:
Originally Posted by Ceppo View Post
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.
__________________
Live and let live
gispos is offline   Reply With Quote
Old 2nd March 2022, 23:17   #94  |  Link
Milardo
Registered User
 
Join Date: Nov 2008
Posts: 137
Quote:
Originally Posted by Ceppo View Post
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
Messed a bit with mvtools. Came up with that to reduce artefacts.
MCompensate clip:
Code:
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)
Code:
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?
Milardo is offline   Reply With Quote
Old 3rd March 2022, 05:12   #95  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
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.
Ceppo is offline   Reply With Quote
Old 3rd March 2022, 06:02   #96  |  Link
Milardo
Registered User
 
Join Date: Nov 2008
Posts: 137
Quote:
Originally Posted by Ceppo View Post
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?
Milardo is offline   Reply With Quote
Old 3rd March 2022, 08:36   #97  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Use this presets. You should toy with mvtools to see what you like and what you don't like tho.

Code:
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:
Code:
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.
Code:
CInterpolate(iClip=iClip2(),dClip=FFT3DFilter(sigma=4))

Last edited by Ceppo; 3rd March 2022 at 08:40.
Ceppo is offline   Reply With Quote
Old 3rd March 2022, 22:17   #98  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
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
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 3rd March 2022, 23:14   #99  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Ceppo View Post
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
Quote:
0 = 2-way match (p/c)
I did try ntN=0 for https://forum.doom9.org/showthread.p...70#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-St...eIVTC.avsi#L84 and https://github.com/realfinder/AVS-St...IVTC.avsi#L289

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

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"
__________________
See My Avisynth Stuff

Last edited by real.finder; 3rd March 2022 at 23:41.
real.finder is offline   Reply With Quote
Old 4th March 2022, 06:50   #100  |  Link
Ceppo
Registered User
 
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
Quote:
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.
Quote:
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.
Quote:
I was thinking about the opposite which is make it slower optionally
Well, it's the slowest formula already .
Quote:
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.
Ceppo is offline   Reply With Quote
Reply


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 00:00.


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