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 23rd September 2014, 21:46   #1  |  Link
flashmaster
Registered User
 
Join Date: Sep 2014
Posts: 10
how to use avisynth for beginners

hi i am really stuck on avisynth...i am just at the basics and i try to follow what i read but i only get so far then i get stuck. i try to copy and paste others scripts that has been posted here even to test it and it never works. now i am pulling out what hair i have left.

i am trying to remaster old 8mm films, i can so so much with virtualdub i can do the basic script for avisynth that will play in virtualdub or AvsPmod but once i try to copy and paste a script it fails at every step

any help is needed

many thanks

p.s i am lucky to get to even post this...about 8 tries because of the random question thing
flashmaster is offline   Reply With Quote
Old 23rd September 2014, 22:16   #2  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,203
Feel free to post a script you cannot get to work and the error messages you get. Also include anything you tried to get it to work. Maybe in the Newbie's section if that seems appropriate. Without that it is hard to know where you are getting stuck.

As a guess: you do know most posted scripts use plugins that are not part of the standard Avisynth install? You would need to download them and put them in Avisynth's plugin directory or explicitly load them with a LoadPlugin().
Asmodian is online now   Reply With Quote
Old 23rd September 2014, 22:28   #3  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,636
You might also want to try MeGUI. I suggest it, as after you open and index a video, MeGUI's script creator runs with a preview for creating the script. MeGUI does the basic stuff for you, applying any cropping and resizing etc, but it's script creator makes modifying the scripts manually nice and easy and seeing the result is just a matter of clicking on the "preview avs script" button.
In some respects I prefer using it to AvsPmod (although MeGUI's script creator and AvsPmod aren't the same thing).

As Asmodian said, you really need to post the steps you're using from installing the plugins to the script in question and any error messages when it doesn't work. It's hard to know what you might be doing wrong without knowing what you're doing.

Quote:
Originally Posted by flashmaster View Post
p.s i am lucky to get to even post this...about 8 tries because of the random question thing
I don't recall that, but I assume it's some sort of anti-spam thing. I'd imagine once you've posted a few times, the random question will go away.

Last edited by hello_hello; 23rd September 2014 at 22:31.
hello_hello is offline   Reply With Quote
Old 24th September 2014, 00:20   #4  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
It's kind of normal to get a series of error messages when trying to run someone else's script, because of the plugins Asmodian mentioned. Each error message will have a simple solution, such as downloading the right plugin. Google the message text first; it may tell you the name of the plugin you need. Then Google that (or check out the Avisynth wiki) to find where to get it. If Googling doesn't help, post the error message(s) here.
raffriff42 is offline   Reply With Quote
Old 24th September 2014, 01:45   #5  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
avisynth itself runs by a very simple script programming language, kinda easy to learn for anyone, even for those that never had any programming experiences before, but things could be foggy if some powerful and professional filters get involved, so if ur trying to use complicated functions in avisynth like lut expr, colorspace conversion, mvtools, u gotta learn somethin about image processing first
feisty2 is offline   Reply With Quote
Old 24th September 2014, 12:10   #6  |  Link
flashmaster
Registered User
 
Join Date: Sep 2014
Posts: 10
thanks guys soon has i have chance i will run though it and write it down what happens if i can.

p.s these are some the random questions i get asked:

what software is the most popular thread in the development forum about?

name a popular video player supported on this board

what software is the most popular thread in the development forum about?

these are just some and non i know its crazy

again it has took me ages to reply so i don't think i be coming here much
flashmaster is offline   Reply With Quote
Old 24th September 2014, 12:26   #7  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
I never saw one single random question kinda stuff when I tried to start a new thread, donno what ur talkin bout
feisty2 is offline   Reply With Quote
Old 24th September 2014, 13:42   #8  |  Link
flashmaster
Registered User
 
Join Date: Sep 2014
Posts: 10
this is has far has i got...feel like i am getting somewhere but also feel like i have walked into a closed room and power has gone out.

for now all i want to do is remove the dirt and spots...when i have done what i have done and no error message comes up, i don't see no change at all i try changing the numbers and still no change.
Attached Images
    
flashmaster is offline   Reply With Quote
Old 24th September 2014, 14:17   #9  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
Quote:
Originally Posted by flashmaster View Post
for now all i want to do is remove the dirt and spots....
you need a denoiser, and a temporal one to remove flashing scratches on old 8mm films, mdegrain would be a balanced choice
feisty2 is offline   Reply With Quote
Old 24th September 2014, 14:31   #10  |  Link
flashmaster
Registered User
 
Join Date: Sep 2014
Posts: 10
this is what i get every time...non of them i know i just have to renew it every time till i can find one i know. its a pain the ass..i understand why it is there and like others ask to a simple sum but to ask questions i have no idea is crazy

how am i meant to know what the popular video player is ?

so i will be using another forum now but thanks for everyone's help for this. i am not going to reply because i am not going to spend ages trying to find an answer to a question i do not know.
Attached Images
 
flashmaster is offline   Reply With Quote
Old 24th September 2014, 14:44   #11  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
maybe u should contact forum moderators and let them help u find out what exactly goes wrong and gets u troubles

Last edited by feisty2; 24th September 2014 at 14:47.
feisty2 is offline   Reply With Quote
Old 24th September 2014, 17:53   #12  |  Link
lisztfr9
Registered User
 
Join Date: Apr 2010
Posts: 175
I can understand flashmaster... he maybe doesn't know where to start. It's like said the Greec philosopher, the known way isn't good : “Whoever cannot seek the unforeseen sees nothing for the known way is an impasse.” The known way is boring, the unknown way is painful :-)
lisztfr9 is offline   Reply With Quote
Old 24th September 2014, 18:32   #13  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 3,786
Quote:
Originally Posted by lisztfr9 View Post
I can understand flashmaster... he maybe doesn't know where to start.
This is a good place to start.
Groucho2004 is offline   Reply With Quote
Old 24th September 2014, 20:06   #14  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,636
Why on earth do attached images require mod approval? We can insert images in posts for days without approval if they're hosted on a third party site, but upload them here and the waiting game begins.... or is it just a way of discouraging uploading images to the forum? So far, 1 pic out of 5 has been approved.

Anyway.... the first pic shows an error message despite a claim to the contrary. "There is no function named RemoveDirtMC" is fairly reminiscent of an error message. It means the RemoveDirtMC script hasn't been loaded, which is possibly because it's not been named RemoveDirtMC.avsi (required for scripts in the plugins folder to be auto loaded) and/or it's not located in the Avisynth plugins folder.

Or alternatively:

Import("D:\RemoveDirtMC.avs")
RemoveDirtMC()

I don't know which version of the script is being used but there's a list of required plugins for it to work here: http://forum.doom9.org/showthread.ph...00#post1485300

flashmaster announced he wasn't coming back so there's probably no point trying to help further unless he indicated he's changed his mind.

Last edited by hello_hello; 24th September 2014 at 20:10.
hello_hello is offline   Reply With Quote
Old 24th September 2014, 20:20   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,306
Quote:
Why on earth do attached images require mod approval? We can insert images in posts for days without approval if they're hosted on a third party site, but upload them here and the waiting game begins.... or is it just a way of discouraging uploading images to the forum? So far, 1 pic out of 5 has been approved.
I approved the important one (and now also the script). They were a bit big.

@flashmaster, please copy only the scripts and messages next time. Screenshots like those are not necessary and only eat space.

Last edited by Wilbert; 24th September 2014 at 20:24.
Wilbert is offline   Reply With Quote
Old 24th September 2014, 22:58   #16  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
"Error: There is no function named RemoveDirt" This is a typical error message when there is a missing plugin. What to do about it?

We go to the Avisynth wiki, External Filters page and search it for the plugin "RemoveDirt."

Now we have a link to the RemoveDirt web site; we go there, download the file(s) and read the instructions.

We unzip the ZIP file and copy the file(s) (plugins files are usually *.dll or *.avsi) into the Avisynth "plugins" folder.

Then we try the script again. If it works, great; if we get another error, we repeat the process: search, install, retry.
raffriff42 is offline   Reply With Quote
Old 25th September 2014, 01:57   #17  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
Quote:
Originally Posted by flashmaster View Post
this is has far has i got...feel like i am getting somewhere but also feel like i have walked into a closed room and power has gone out.
Is the power going out why you're posting photos instead of screenshots?

Anyhow, the solution is simple. "function foo(){return bar}" only defines a function; it doesn't call the function. On the other hand, you can't use a filter that has not been defined. So just… define the function and then call it.

Code:
avisource("derby.avi")
function RemoveDirtMC(clip,...)
{
...
}
RemoveDirtMC()
Do also what raffriff42 said if it still complains about missing functions.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 25th September 2014, 03:55   #18  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,636
Well I'll confess RemoveDirtMC is beating me. I haven't used it before. I've tried at least two variations of the script. I cleared out my plugins folder and copied just the required plugins from here. I've tried alternative versions of the plugins, but no matter what I do, the only result I get is "invalid arguments to function RemoveDirtMC" when I add this to a script:

RemoveDirtMC()

Or the same thing happens when I add RemoveDirt(). I assume I'm missing the obvious or don't know how to use the script. This is the one I can't get to work:

Quote:
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3, dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)

# Alternative settings
# return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=true)
# return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=false)
}

function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
i=MSuper(clip,pel=2)
bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
backw = MFlow(clip,i,bvec)
forw = MFlow(clip,i,fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
For the record, I've been using this script now and then and it works fine.

Quote:
function RemoveDirt(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
}

Last edited by hello_hello; 25th September 2014 at 03:58.
hello_hello is offline   Reply With Quote
Old 25th September 2014, 05:56   #19  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
mvtools is very buggy, some identical scripts for avs just can't get to work on mvtools
like msuper (clip) should be identical to clip.msuper () for avs
but clip.msuper works, msuper (clip) doesnt, same goes for manalyze
feisty2 is offline   Reply With Quote
Old 25th September 2014, 06:20   #20  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Quote:
Originally Posted by feisty2 View Post
mvtools is very buggy, some identical scripts for avs just can't get to work on mvtools
like msuper (clip) should be identical to clip.msuper () for avs
but clip.msuper works, msuper (clip) doesnt, same goes for manalyze
Mvtools has absolutely nothing to do with the way clips are passed to it. Either it's a bug in avisynth (which is hardly possible), or you're doing something wrong.
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 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 05:46.


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