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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st August 2018, 13:40   #1  |  Link
TheLastOfUs
Registered User
 
Join Date: Nov 2014
Posts: 18
ConditionalFilter

Hi all,

How does one use the Conditional filter? Did a read up and kind of lost. I see scripts using it as a debanding sort of thing - but unclear as to how the SceneTypes.txt is generated exactly? Also unsure of the "R # # 1/2/3" in that file.

Can anyone please explain?
TheLastOfUs is offline   Reply With Quote
Old 1st August 2018, 14:56   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Your question dont seem to make much sense, what SceneTypes.txt ???

Quote:
ConditionalFilter(clip testclip, clip source1, clip source2, string expression1, string operator, string expression2 [, bool show] )
Anyways, you could do an Advanced Search (at top of every D9 page) limiting to Avisynth Usage forum.

Maybe you mean ConditionalReader:- http://avisynth.nl/index.php/ConditionalReader
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 2nd August 2018, 01:04   #3  |  Link
TheLastOfUs
Registered User
 
Join Date: Nov 2014
Posts: 18
Conditional Filter and Reader yes both. I'm seeing scripts of text files with conditional reader. That link you sent was super helpful. I get it now.

Last edited by TheLastOfUs; 2nd August 2018 at 01:09.
TheLastOfUs is offline   Reply With Quote
Old 29th January 2021, 12:54   #4  |  Link
Shinkiro
Registered User
 
Join Date: Dec 2012
Posts: 65
can someone explain why this script works?
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
LWLibavVideoSource(lossless - 02.mkv").Spline36Resize(720, 480)
C2=last
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
and this one works
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
C2=LWLibavVideoSource(lossless - 02.mkv").Spline36Resize(720, 480)
С2
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
but this one does not work?
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
C2=LWLibavVideoSource("lossless - 02.mkv").Spline36Resize(720, 480)
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
__________________
Ryzen 2700x | ASUS ROG Strix GTX 1080 Ti | 16 Gb DDR4
Windows 10 x64 20H2
KD-55XE9005 | Edifier R2800

Last edited by Shinkiro; 29th January 2021 at 13:02.
Shinkiro is offline   Reply With Quote
Old 29th January 2021, 19:53   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
Quote:
Originally Posted by Shinkiro View Post
can someone explain why this script works?
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
LWLibavVideoSource(lossless - 02.mkv").Spline36Resize(720, 480)
C2=last
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
and this one works
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
C2=LWLibavVideoSource(lossless - 02.mkv").Spline36Resize(720, 480)
С2
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
but this one does not work?
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
C2=LWLibavVideoSource("lossless - 02.mkv").Spline36Resize(720, 480)
ConditionalFilter(C1, C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)

There is no implied "last" in the last one
poisondeathray is offline   Reply With Quote
Old 29th January 2021, 20:43   #6  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
That's right, pdr.

ConditionalFilter takes three clip arguments, so when only two are supplied, last will be implicitly used as the first clip.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 29th January 2021, 20:49   #7  |  Link
Shinkiro
Registered User
 
Join Date: Dec 2012
Posts: 65
Quote:
Originally Posted by poisondeathray View Post
There is no implied "last" in the last one
Ok you're right, this is how it works without errors
Code:
C1=DGSource("VTS_01_2.dgi").TFM(mode=4,pp=5,MI=1,display=false, slow=1,cthresh=9,mthresh=5,chroma=false,ubsco=false,hint=true,opt=4,metric=0)
C2=LWLibavVideoSource("lossless - 02.mkv").Spline36Resize(720, 480)
ConditionalFilter(С2,C1,C2, "MyVar", "==", "False", false)
ConditionalReader("Frame-list2.txt", "MyVar", false)
In my case, source1 is the main clip, source2 takes frames to be replaced and then the output is a mix. As far as I understand, it doesn't matter for me which clip I put there, it will not affect the result?
__________________
Ryzen 2700x | ASUS ROG Strix GTX 1080 Ti | 16 Gb DDR4
Windows 10 x64 20H2
KD-55XE9005 | Edifier R2800
Shinkiro is offline   Reply With Quote
Old 29th January 2021, 23:12   #8  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Shinkiro View Post
As far as I understand, it doesn't matter for me which clip I put there, it will not affect the result?
Correct.
Since in your case, the conditional expression ("MyVar == False") does not depend on the first clip (the so-called 'test clip').
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 30th January 2021, 00:06   #9  |  Link
Shinkiro
Registered User
 
Join Date: Dec 2012
Posts: 65
Gavino
I see, thank you for your help!
__________________
Ryzen 2700x | ASUS ROG Strix GTX 1080 Ti | 16 Gb DDR4
Windows 10 x64 20H2
KD-55XE9005 | Edifier R2800
Shinkiro is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 20:11.


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