View Full Version : how to use avisynth for beginners
flashmaster
23rd September 2014, 21:46
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
Asmodian
23rd September 2014, 22:16
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().
hello_hello
23rd September 2014, 22:28
You might also want to try MeGUI (http://www.videohelp.com/tools/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.
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.
raffriff42
24th September 2014, 00:20
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 (http://avisynth.nl/index.php/External_filters)) to find where to get it. If Googling doesn't help, post the error message(s) here.
feisty2
24th September 2014, 01:45
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
flashmaster
24th September 2014, 12: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 :(
feisty2
24th September 2014, 12:26
I never saw one single random question kinda stuff when I tried to start a new thread, donno what ur talkin bout
flashmaster
24th September 2014, 13:42
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.
feisty2
24th September 2014, 14:17
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
flashmaster
24th September 2014, 14:31
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.
feisty2
24th September 2014, 14:44
maybe u should contact forum moderators and let them help u find out what exactly goes wrong and gets u troubles
lisztfr9
24th September 2014, 17:53
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 :-)
Groucho2004
24th September 2014, 18:32
I can understand flashmaster... he maybe doesn't know where to start.
This (http://avisynth.nl/index.php/Main_Page) is a good place to start.
hello_hello
24th September 2014, 20:06
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.php?p=1485300#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.
Wilbert
24th September 2014, 20:20
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.
raffriff42
24th September 2014, 22:58
"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 (http://avisynth.nl/index.php/External_filters#Film_Damage_correction) page and search it for the plugin "RemoveDirt."
Now we have a link to the RemoveDirt web site (http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm); we go there, download the file(s) (http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.zip) 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.
colours
25th September 2014, 01:57
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.
avisource("derby.avi")
function RemoveDirtMC(clip,...)
{
...
}
RemoveDirtMC()
Do also what raffriff42 said if it still complains about missing functions.
hello_hello
25th September 2014, 03:55
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 (http://forum.doom9.org/showthread.php?t=144271). 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:
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.
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 )
}
feisty2
25th September 2014, 05:56
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
TurboPascal7
25th September 2014, 06:20
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.
foxyshadis
25th September 2014, 06:30
The first script hello_hello posted didn't have proper quoted argument names in the function definition, which is how Avisynth defines an optional argument. By quoting them, you can call it without passing everything. The limit = default(limit,6) without limit being quoted is obviously an error.
flashmaster
25th September 2014, 06:50
i have tried this
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 )
}
...it loads up on vituraldub no problem only thing is there is no changes..so now what ? i have seen clips where all the dirt and pops go away...but for me nothing.
so far the only way i have i have cleaned up old film is frame by frame and thats over 1,300 frames for about 1min of film and treating each frame has if i am cleaning old photos..but this takes almost a day and next month i will have 25min film to do.
but at the looks of things..i have tried it all...i have copy and paste and i have tried fiddling with numbers and nothing...the only thing works for me in avisynth is the basic scripts thats on the wiki site other then nothing else works just either an error or no changes
at some point i will give up and face facts that this will not work
manono
25th September 2014, 09:06
Please post a complete script that you say does nothing.
hello_hello
25th September 2014, 09:40
flashmaster,
You really need to be fairly specific as to what you're doing otherwise you'll find most of the time is spent playing 20 questions. Posting your entire script might help. I'm not sure what "loads up on VirtualDub" means.
The script you copied specifies the functions and default values etc, but it won't do anything if you just copy and paste it into a script for encoding. You need to follow it with RemoveDirt(), so if you're going to copy and paste it into a script, you'd need to end up with something like this:
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 )
}
RemoveDirt()
You could create an avsi file containing the script, as I mentioned in a previous post, and put the avsi script in the Avisynth plugins folder. That way, all you'd need to add to your script is RemoveDirt() with any optional values you might want to use.
Keep in mind there's a few RemoveDirt scripts, so if you do create an avsi file with a function RemoveDirt and put it in the Avisynth plugins folder, don't put more than one in their at a time.
Anyway, my next post contains step by step instructions for getting the above script to work..... I hope. ;)
feisty2
25th September 2014, 09:43
@TurboPascal7
here are some buggy sample scripts.
first, the working one
lwlibavvideoSource("xxx")
super=msuper ()
vectors=super.manalyse (multi=true,delta=6)
mdegrainn (super,vectors,6)
buggy script ver 1
lwlibavvideoSource("xxx")
super=msuper ()
vectors=super.manalyse (multi=true,delta=6)
mdegrainn (super,vectors,tr=6)
#the script returns "Script error: Invalid arguments to function 'mdegrainn'" while "tr=6" works with no error in mcompensate
buggy script ver 2
super=msuper ()
vectors=manalyse (super=super,multi=true,delta=6) #manalyse (super,multi=true,delta=6) works
mdegrainn (super,vectors,6)
#the script returns "Script error: manalyse does not have a named argument "super"", but it's clearly written in MVtools2 document that the first parameter of manalyse is "clip super"
I'm using AVS+ 0.1 (r1576, x86) and MVTools 2.6.0.5
hello_hello
25th September 2014, 09:45
flashmaster,
copy the text below and paste it into a new text file. Save it as RemoveDirt.txt and then change the extension to RemoveDirst.avsi (or simply call it RemoveDirst.avsi in the first place). Copy it to your Avisynth plugins folder. I'm running XP so the folder location would be "C:\Program Files\AviSynth 2.5\plugins".
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 )
}
There's so many version of plugins floating around it can get confusing.
http://home.arcor.de/kassandro/prerelease/RemoveGrain-1.0.rar
http://home.arcor.de/kassandro/prerelease/RemoveGrainT-1.0.rar
Download both the above, unzip them and copy every file inside with an SSE2 at the end of it's name to your Avisynth plugins folder. I honestly can't remember if they're all required but it can't hurt.
When that's done, add this to a script you're using for encoding:
RemoveDirt()
If all went well......
If you get an error along the lines of "no function named RemoveDirt" then the avsi script you created isn't being auto-loaded for some reason, or you've done something wrong.
There's a slightly modified version of the above script. You can copy and paste the text below again and use it to create a file called RemoveSpots.avsi which you'd copy to your Avisynth plugins folder and add to a script like this:
RemoveSpots()
function RemoveSpots(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 corrected
}
Both work quite well for removing blemishes in individual frames. I think the second one blurs a little less. I can't remember though as I haven't used them for a while. Keep in mind both have a tendency to blur detail where's there's motion. Pretty much all filtering is some sort of compromise between the result you want and one you don't.
hello_hello
25th September 2014, 09:54
feisty2,
In this case the problem seemed to be the script not having proper quoted argument names, as foxyshadis suggested. When I changed it to this, the error messages went away.
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
}
Mind you I'm still not sure I understand it correctly. Should RemoveDirt() or RemoveDirtMC() be added to a script? Or either?
I experimented with it a little and couldn't seem to get any action out of it unless I cranked up the limit value quite a bit:
RemoveDirt(limit = 60)
flashmaster,
If you want to try the above script it also requires mvtools.dll be in the Avisynth plugins folder.
http://avisynth.org.ru/mvtools/mvtools-v1.11.4.5.zip
feisty2
25th September 2014, 10:21
"Mxx" is the format of mvtools2, mvtools 1.x script would be "MVxx" format
you don't need old mvtools 1
see #785 at http://forum.doom9.org/showthread.php?t=168856&page=40
you can run that script with mvtools2 and other modern filters
colours
25th September 2014, 10:28
@TurboPascal7
here are some buggy sample scripts.
I'm using AVS+ 0.1 (r1576, x86) and MVTools 2.6.0.5
Fun fact: non-optional arguments cannot be used with name=value syntax. If I'm not wrong, the Avisynth API treats named arguments as being optional so there's no way to have a named but non-optional argument for a C/C++ plugin.
feisty2
25th September 2014, 10:37
but they don't seem "non optional" in the document, they are written with the same format as other normal parameters inside the function list
TurboPascal7
25th September 2014, 10:59
but they don't seem "non optional" in the document, they are written with the same format as other normal parameters inside the function list
Then you need to complain to the author of said documentation about it being misleading instead of saying that mvtools is buggy when it's not.
hello_hello
25th September 2014, 17:43
"Mxx" is the format of mvtools2, mvtools 1.x script would be "MVxx" format
you don't need old mvtools 1
see #785 at http://forum.doom9.org/showthread.php?t=168856&page=40
you can run that script with mvtools2 and other modern filters
Ahhhhh.... I just assumed the original mvtools was required as it's one of the plugins included here, but there's several scripts, so maybe one of the other scripts needs it?
I'll confess you did help me to conclude mvtools was required given you posted about it being buggy directly below the script I posted. ;)
Cheers.
While I was encoding some old video I thought I'd try some spot removal. There's a zip file at the bottom of this post with some samples.
Re-encode.mkv is a re-encode only. No filtering.
QTGMC.mkv is a re-encode while running QTGMC (http://forum.doom9.org/showthread.php?t=156028) in progressive mode. That's my benchmark against which I often compare other filters.
QTGMC(InputType=1) was added to the script.
RemoveSpots.mkv is an encode using the RemoveSpots script here (http://forum.doom9.org/showthread.php?p=1694965#post1694965) (second script).
RemoveSpots() was all that was added to the script.
RemoveDirt.mkv is an encode using the RemoveDirt script here (http://forum.doom9.org/showthread.php?p=1694965#post1694965).
RemoveDirt() was all that was added to the script.
RemoveDirty.mkv is an encode using the RemoveDirty script below. It's the RemoveDirtMC script with a name change so I could put them all in the plugins folder.
RemoveDirty(limit=12) was added to the script.
QTGMC leaves the most spots behind but also tends to improve the quality in other areas rather than reduce it. As many of us know, it's very slow.
RemoveDirt blurs to much for me but it did remove all the spots.
RemoveSpots blurs less than RemoveDirt and seems to do a pretty good job.
RemoveDirty is the script below which was originally RemoveDirtMC. I'm guessing the idea is it removes dirt where there's no motion, but not so much where there is motion to cut down on the blurring? Or something like that?
function RemoveDirty(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
}
I made the samples in the zip file for my own little comparison, but thought while I was at it I might upload them too. How well they'll apply to fixing old film transfers, I have no idea. The source was 720x576 and resized to 640x480 each time. If anybody's got a better script......
No doubt each of the scripts could be tweaked for better results. I just used the default settings for each, except for the last one. I seemed to need to bump it up a bit.
samples.zip (http://ge.tt/44J3fVz1/v/0) 20.2MB
flashmaster
25th September 2014, 17:56
thanks hello_hello i have tried all 3 of your scripts and amazing no errors but also i see no changes..nothing at all, on virtualdub both screen views are the same
Keiyakusha
25th September 2014, 18:16
on virtualdub both screen views are the same
What makes you think that they are supposed to be different? Second panel will only reflect the difference made by internal vdub filters and not related to avisynth in any way.
Groucho2004
25th September 2014, 18:18
thanks hello_hello i have tried all 3 of your scripts and amazing no errors but also i see no changes..nothing at all, on virtualdub both screen views are the same
As requested several times - Post your complete script.
hello_hello
25th September 2014, 18:59
thanks hello_hello i have tried all 3 of your scripts and amazing no errors but also i see no changes..nothing at all, on virtualdub both screen views are the same
If you're putting an Avisynth filter in an Avisynth script, then you open the script with VirtualDub, the filter will be applied to the video when it's opened.
ie You put a filter in a VirtualDub script which turns the entire frame purple, you open the script with VirtualDub, you'll see a purple frame. As far as VirtualDub's concerned, that's the original video.
Or try adding this to a script: ColorBars() If you put it at the end you should see nothing but colour bars when you open the script.
You're making it too hard to help you. You need to post a detailed description of what you're doing. What does "trying the scripts" involve? I mentioned why they may be having no effect here (http://forum.doom9.org/showthread.php?p=1694963#post1694963), but you haven't replied to say if that's what you're doing.
Try MeGUI instead of VirtualDub. I mentioned it here (http://forum.doom9.org/showthread.php?p=1694780#post1694780).
Use the File/Open menu and follow the prompts. Eventually the script creator will open with a preview. MeGUI creates a basic script for you but it's easy to modify the script manually. You can switch between the original unfiltered video and the video with the script applied using the Preview button.
I quite often use MPC-HC (http://mpc-hc.org/) to compare scripts. You need to change the setting to view "all files" to see scripts when you use the File/Open menu. I've also put a shortcut to MPC-HC in the Windows SendTo folder, so to open a script I can right click on one and select SendTo/MPC-HC. Often I'll create a simple script with virtually no filtering, then another with filtering, maybe a third etc.... then I use 3 instances of MPC-HC to open them all at the same time. You can open them as if they were the original video and run them full screen etc. I have my PC connected to my TV so I use the TV for viewing scripts in full screen mode before encoding.
Anyway.... please explain exactly what you're doing as it's impossible to help otherwise. The easier you make it for someone to help you.....
Maybe also explaining which scripts and/or plugins you have in the Avisynth plugins folder might help.
flashmaster
26th September 2014, 15:43
well i am truly giving up..avisynth just does not work on my pc, had days of help from anther form with links, scrips, tips and i tried all..he even showed me how he had cleaned up some frames with the script he gave me. no matter what i do i can't load up removedirt or removespots i have tried dll, avs and avsi but all have errors
TheFluff
26th September 2014, 16:38
well i am truly giving up..avisynth just does not work on my pc, had days of help from anther form with links, scrips, tips and i tried all..he even showed me how he had cleaned up some frames with the script he gave me. no matter what i do i can't load up removedirt or removespots i have tried dll, avs and avsi but all have errors
"it doesn't work on my PC" isn't a thing. Computers do not magically decide not to run certain software. Of course it works on your PC, you're just doing it wrong. Furthermore, you're making it impossible for other people to help you by refusing to explain what exactly you're doing. If we knew what you were doing, we could tell you what you were doing wrong and what you should do instead, but we're not telepaths and "it has errors" tells us absolutely nothing. These problems are all your own fault.
hello_hello
26th September 2014, 18:12
"It doesn't work on my PC" is obviously nonsense, given it'd appear from the tiny bit of information we've been given, you've been able to create a basic script and open it in VirtualDub. If that's the case, then Avisynth works. You posted a screenshot of AvsPmod showing a preview of a script, and another screenshot of an Avisynth error message regarding a function in a script. Therefore, Avisynth is working. You've just not managed to get the plugins to load/work, but given you won't provide the slightest detail regarding what you've tried, giving up does seem like the sensible choice at this point.
I've no idea how much time you spent trying to sort the problem via the other forum you referred to, but if it's anything like the time you've put into posting here..... writing detailed posts gets frustrating pretty quickly when the person asking for help won't even make the effort to answer a single question.
manono
27th September 2014, 03:48
...but given you won't provide the slightest detail regarding what you've tried, giving up does seem like the sensible choice at this point.
I'm inclined to agree. He resolutely refuses to provide the information asked for. And it's usually a good idea to walk before you run. Learn to use AviSynth for basic stuff before jumping into fairly advanced scripting.
I've no idea how much time you spent trying to sort the problem via the other forum you referred to, but if it's anything like the time you've put into posting here.....
http://forum.videohelp.com/threads/367368-restore-old-film-with-avisynth
They're having the same problem over there.
feisty2
27th September 2014, 05:13
feel like actually the problem is he doesn't know how to use a computer :p
hello_hello
27th September 2014, 05:18
They're having the same problem over there.
Ahhhhh.... I don't visit the "restoration" forum at VideoHelp as it's generally not my thing..... although maybe I should start having a look. I might learn some stuff. At least they got to view all the attached screenshots over there without it bringing the entire forum to a halt. We weren't allowed to see the scripts in the plugins folder didn't have an avsi extension or that flashmaster was running multiple version of the same plugin.
I had a look at the sample uploaded to the other forum and it'd be fairly easy to use the default removedirt, removespots (or whatever script) settings and assume they're not "working", as all the spots and blemishes don't magically disappear. In fact, not many of them do. I think those scripts are pretty good at cleaning spots and blemishes from single frames, but the clip in question has blemishes which span two or three frames. And there's lots of background movement which I think also means the MC scripts won't be as effective.
Anyway.... I pinched the idea someone posted over at VideoHelp and tried it on the sample clip. It made an obvious difference.
av=last
av1=av.SelectEvery(3,0).RemoveSpots()
av2=av.SelectEvery(3,1).RemoveSpots()
av3=av.SelectEvery(3,2).RemoveSpots()
Interleave(av1,av2,av3)
RemoveSpots()
flashmaster
27th September 2014, 14:10
yes i agree first i am happy to finally get it working and yes i saw a difference i played it back to back and you can see the changes...i have saved all the plugins that are working with this script and saved it into a zip folder...i even tried it with another clip and just renamed it and it still worked. so yes its great..this clip you saw is not has good quality has the 8mm film and same with my family film...these are newly found and good to great quality so when i go home to england i will redo the films in hd and do it again with this script :)
LemMotlow
27th September 2014, 16:59
Glad it's helping to clean things up and you have a working script. But it's not a good idea to work with 8mm film as HD. 8mm simply doesn't have the resolution for HD work. That especially applies to the sample clip we saw at the other forum. It's like trying to blow up a postage-stamp frame to the size of a wall mural. It just doesn't work.
However, the BluRay spec does have provision for high-bitrate standard definition video. You might also consider that your source is progressive film at 29.97fps, while DVD and SD BluRay for disc output are usually interlaced or telecined. You might have a few things to learn about handling that problem.
flashmaster
29th September 2014, 07:54
i understand the clip i have at the moment is not great, its been compressed and played about with a few times...i have the original 8mm and its lovely and sharp and so is my family one which is so much clearer and sharper then what i friend did about 20 years ago. so i will have better material to work with..i will record it in hd with my phone maybe not full hd i do not know but i will see what it like in size first has the rendering time. i will make sure this time i can get the focus sorted which was the problem last time but now i have manual focus and control over most of the flicker before i put it on the pc :) it was mostly the clean up bit i wanted to do..i have seen some of the examples on youtube that others have done and i really wanted to give my family home video the best i can
ChiDragon
29th September 2014, 19:20
i have the original 8mm and its lovely and sharp
<snip>
i will record it in hd with my phone
wat. :angry:
flashmaster
30th September 2014, 08:14
wat. :angry:
lol why its has full HD and is better image then my Panasonic video camera i brought 2 years ago. i will test both too see which one is best but no matter which either will be a massive improvement to the old video copy we have of it...when i first saw our family film played from the projector it was like watching it for the first time. and will be the best any of my family have seen it since the late 70s so i am over the moon :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.