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 12th April 2015, 14:19   #101  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,085
Quote:
Originally Posted by kotuwa View Post
What is the difference between putting two functions in two lines vs in one line with a period/dot (.)
!?
.....
Performance-wise differences,
And differences in Qulaity and Lossyness...
There should be no difference. It's just 2 different ways of achieving the same thing.
Reel.Deel is offline   Reply With Quote
Old 12th April 2015, 16:26   #102  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 360
The first version is the short form of

Code:
last = Crop(last, 0, 10, 0, -10)
last = Spline64Resize(last, 1280, 720)
...and the second version is the short form of

Code:
last = Spline64Resize(Crop(last, 0, 10, 0, -10), 1280, 720)
The difference is that in the second version, the implied (hidden) variable "last" is not modified between the lines. Consider this example:

Code:
Version
PointResize(Width * 2, Height * 2)
PointResize(Width / 2, Height / 2)
Result_1 = last

Version
PointResize(Width * 2, Height * 2).PointResize(Width / 2, Height / 2)
Result_2 = last
Clip "Result_1" will have the same content as the result of "Version", but clip "Result_2" will be half the size of "Version" because "Width" and "Height" refer to clip "last" when not prefixed with a clip variable name.

Expanded to its full form the example looks like this:

Code:
a = Version
b = PointResize(a, a.Width * 2, a.Height * 2)
c = PointResize(b, b.Width / 2, b.Height / 2)
Result_1 = c

d = Version
e = PointResize(PointResize(d, d.Width * 2, d.Height * 2), d.Width / 2, d.Height / 2)
Result_2 = e
Btw. an easy way to add a blur effect would be this:

Code:
BilinearResize(int(Width * 0.75), int(Height * 0.75)).BilinearResize(Width, Height)

Last edited by creaothceann; 12th April 2015 at 16:41.
creaothceann is offline   Reply With Quote
Old 16th October 2017, 21:30   #103  |  Link
ale_x
Registered User
 
Join Date: Jan 2012
Posts: 23
Hi.

I used this function recently

ExtractU().dither_resize16()

But I got an error "there is no function named ExtractU"

by the way, I'm using Avynth + .

Thanx =)
ale_x is offline   Reply With Quote
Old 16th October 2017, 21:52   #104  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 3,878
Quote:
Originally Posted by ale_x View Post
But I got an error "there is no function named ExtractU"
You're probably using an older version of AVS+ that does not have that function. Update to the latest version (r2508).
Groucho2004 is offline   Reply With Quote
Old 17th October 2017, 10:40   #105  |  Link
ale_x
Registered User
 
Join Date: Jan 2012
Posts: 23
Quote:
Originally Posted by Groucho2004 View Post
You're probably using an older version of AVS+ that does not have that function. Update to the latest version (r2508).
Thank u very much =).
ale_x is offline   Reply With Quote
Old 17th October 2017, 15:13   #106  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,043
I think last posts should move to https://forum.doom9.org/showthread.php?t=174120
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 26th December 2017, 07:25   #107  |  Link
ilko
Registered User
 
Join Date: Nov 2016
Posts: 11
Q : is there a way to enumerate variables in avs ?

I'm trying to do something similar to the following batch script :
Code:
set /a count=1
set var=video%count%
echo the resulting var is "video1"

set /a count+=1
echo we add 1 to the initial count so it's now 2
echo then we set the var gain

set var=video%count%
echo the var is now "video2"

pause
__________________
My BLog

Last edited by ilko; 26th December 2017 at 07:27.
ilko is offline   Reply With Quote
Old 26th December 2017, 10:39   #108  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,904
RT_Stats:- https://forum.doom9.org/showthread.p...light=RT_Stats

Code:
RT_VarExist(string)
 Given the name (string) of the variable that you want to test for existence, returns true if exists, else false.
 Eg, #a=32
    RT_Debug(string(RT_VarExist("a")))  # would output 'false' to debugview unless '#a=32' uncommented. {Defined(a) would fail with error}.
    return colorbars()
Could also simulate (for Globals) with Try/Catch in script (within a function, and return as result).

EDIT:

Code:
Function VarType(String GlobalName) {
    Try {
	g = Eval(GlobalName) # Fail here if not exist
        res=    g.IsBool   ? 1
            \ : g.IsInt    ? 2
            \ : g.IsFloat  ? 3
            \ : g.IsString ? 4
            \ : g.IsClip   ? 5
            \ : 0
    } Catch (msg) {
        res = 0 # Not Exist
    }
    return res
}

Function VarTypeName(Int TypIx) {Assert(0 <= Typix <= 5,"VarTypeName: Bad Typix") Return Select(TypIx,"NOT_EXIST","Bool","Int","Float","String","Clip")}

Global G_i = 666   # Comment Me Out

Type = VarType("G_i")

TypeName=VarTypeName(Type)

MessageClip("Global G_i Type = "+String(Type) + " : TypeName='"+TypeName+"'")
EDITED:

EDIT: RT_VarExist just returns result of an Avisynth function, would do equivalent of VarExist on local of that name, and if failed then on Global of that name.
We cant test locals in script within a separate function, you would need to inline script try/catch in-situ if required for local.

EDIT: Something like
Code:
    Try {Dummy=Eval(LocalName) LocalExist=True} Catch(msg) {LocalExist=False} # Dummy, avoid assign anything to Last
__________________
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 ???

Last edited by StainlessS; 26th December 2017 at 11:29.
StainlessS is offline   Reply With Quote
Old 18th April 2018, 08:04   #109  |  Link
ShogunGino
Registered User
 
Join Date: Apr 2018
Posts: 4
Was looking through the guides and the wiki and seemed to find that the Force Film, IVTC, and Deinterlacing tutorial link seems to be dead. Does anyone have a zip file of it? It looks like its the main tutorial that I need for my current situation.
ShogunGino is offline   Reply With Quote
Old 29th August 2018, 18:34   #110  |  Link
Seedmanc
Registered User
 
Join Date: Sep 2010
Location: Russia
Posts: 71
Do we have a definitive guide for MVTools options that does a better job at explaining what the more obscure settings do than the official page? I'm particularly interested in what typical situations the options like divide, trymany, temporal, rfilter and so on should be used.
You'd think after all this time somebody would have done a proper analysis and comparison the way they're done for videocodecs. For example, by taking a source video, halving its framerate then upsampling it back and comparing with the original using tools like MSU VQM or other stuff with metrics like PSNR. This is the way I'm trying to do it, but there's only so much you can derive from metrics you don't know comparing options you don't understand.
For example I was surprised to find out that a combination of block size 32 and truemotion=true gives results a lot worse than most other combinations of sizes and values. Another counter-intuitive discovery was that the search method 3 (which is claimed to be similar to x264's ESA) is actually faster and not better than 5 (UMH).
What options should be tweaked first when dealing with 2K video with lots of flickering? I'm under the impression that most of Avisynth's filters were written in the DVD era and might have SD resolution dependency hardcoded in one way or another somewhere.
Seedmanc is offline   Reply With Quote
Reply

Tags
avisynth, faq

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 04:55.


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