Can somebody teach me how to create the corect script for this? It keeps saying that the plugin doesn't exist.
+ Reply to Thread
Results 1 to 30 of 32
-
-
-
Can somebody teach me how to create the corect script for this? It keeps saying that the plugin doesn't exist.
the script
AVISource("Yoursource.avi") #if the file is avi file
AssumeTFF() #or BFF
Bob()# double the frame rate it seems that depan and removedirtmc work better on progresive material
ConvertToYV12(matrix="Rec601",interlaced=true)
o=last # special depan stabilization by videofred
maxstabH=20 maxstabV=20 # maximum values for the stabiliser (in pixels) - 20 is a good start value
est_left=40 est_top=40 est_right=40 est_bottom=40 est_cont=1.4 #crop and contast values for special Estimate clip
stab_reference= o.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).MT_binarize(thres hold=80).greyscale().invert()
mdata=DePanEstimate(stab_reference,trust=1.0,dxmax =maxstabH,dymax=maxstabV)
DePanStabilize(o,data=mdata,cutoff=0.5,dxmax=maxst abH,dymax=maxstabV,method=0,mirror=15)
RemoveDirtMC(30,false)
SeparateFields().selectevery(4,0,3) # back to interlaced i think for BFF it needs another selecevery
weave()
and the plugins that you need are attached ( I use avysinth 2,6) -
I managed to get the DepanStabilise, but I don't know which rows to delete to get rid of the comparisons.
Script:
film= "C:\Users\You\Documents\Yourfile.avi" # source clip, you must specify the full path here
#PARAMETERS
#----------------------------------------------------------------------------------------------------------------------------
result="stabS" # specify the wanted output here stab= stabilised clip, stabS= comparison before/after
trim_begin=2 play_speed= 18 #trim frames and play speed
#SIZE, CROP AND BORDERS PARAMETERS
#----------------------------------------------------------------------------------------------------------------------------
CLeft=20 CTop=20 CRight=20 CBottom=20 #crop values after Depan and before final resizing
W=720 H=576 #final size after cropping
bord_left=0 bord_top=0 bord_right=0 bord_bot=0 #720p= borders 150
#STABILISING PARAMETERS, YOU REALY MUST USE STABS TO CHECK STABILISATION!
#----------------------------------------------------------------------------------------------------------------------------
maxstabH=40
maxstabV=40 #maximum values for the stabiliser (in pixels) 20 is a good start value
est_left=40 est_top=40 est_right=40 est_bottom=40 #crop values for special Estimate clip
trust_value= 1.0 # scene change detection, higher= more sensitive
cutoff_value= 0.5 # no need to change this, but you can play with it and see what you get
# END VARIABLES, BEGIN SCRIPT
#================================================= ================================================== ==============================
SetMemoryMax(800) #set this to 1/3 of the available memory
Loadplugin("plugins/Depan.dll")
LoadPlugin("plugins/DepanEstimate.dll")
source1= AviSource(film).assumefps(play_speed).trim(trim_be gin,0).converttoYV12()
#STABILIZING/CROPPING
#................................................. .................................................. .......................................
stab_reference= source1.crop(est_left,est_top,-est_right,-est_bottom).colorYUV(autogain=true)
mdata=DePanEstimate(stab_reference,trust=trust_val ue,dxmax=maxstabH,dymax=maxstabV)
stab=DePanStabilize(source1,data=mdata,cutoff=cuto ff_value,dxmax=maxstabH,dymax=maxstabV,method=0,mi rror=15)
stab2= stab.crop(CLeft,CTop,-CRight,-CBottom)
stab3=DePanStabilize(source1,data=mdata,cutoff=cut off_value,dxmax=maxstabH,dymax=maxstabV,method=0,i nfo=true)
WS= width(stab)
HS= height(stab)
stab4= stab3.addborders(10,10,10,10,$B1B1B1).Lanczos4Resi ze(WS,HS)
stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5)
#RESULT5: SPECIAL SERVICE CLIP FOR RESULT S5
#................................................. .................................................. ...............................................
result5= overlay(source1,greyscale(stab_reference),x=est_le ft,y=est_top).addborders(2,2,2,2,$FFFFFF).Lanczos4 Resize(WS,HS)
#PARAMETERS FOR THE COMPARISONS
#................................................. .................................................. ...............................................
W2= W+bord_left+bord_right
H2= H+bord_top+bord_bot
source4=Lanczos4Resize(source1,W2,H2)
#SPECIAL COMPARISON CLIP FOR TESTING THE STABILIZER
#................................................. .................................................. .................................................. ....................
stabS= stackhorizontal(subtitle(result5,"baseclip for stabiliser -only the B/W clip is used",size=32,align=2),\
subtitle(stab4,"test stabiliser: dx=horizontal, dy=vertical",size=32,align=5)).converttoYUY2()
Eval(result)
#REMOVE DIRT FUNCTION
#................................................. .................................................. .................................................. .................
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=li mit,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
} -
You dont have to put the whole script into your script just copy plugins in avysinth plugins directory and use The simple script that i posted.
Concerning results ( the videofred part of the script that you posted) s in front of the result means comparasion it has 5 results ( it depends on the processing wich one to use so insted of S1 use 1.
You dont need the whole fred script it is very slow and it depends on your material if you post some sample maybe someone else can help.
Is this 8mm film transfer VHS or something else? -
The script is made for a 8mm film. I'm trying to adapt it to a normal VHS rip. But the problem is that I don't really know what to extract from it regarding the enhancement of the video.
-
But the problem is that I don't really know what to extract from it regarding the enhancement of the video.
Also what are the "enhancement" that you are trying to acchive if it is drop outs than devcr or even descratch give better results than removedirtmc, or some noise reduction with MCtemporaldenoise or Neat video and so on and so on. -
This is the sample. I'm trying to get rid of the noise in the background. I also wanted to get rid of the ghosting/halos, but it's just too hard for me. I'm a noob in this situation. If you have any other ideas, please feel free to say.
Cheers! -
You can't do very much about the ghost trails, but there are ways to work on the stationary ghosts and halos. Some of that fine-grained "noise" you see appears to be added on purpose. You can always remove it, but you'll have to work pretty hard to avoid the banding that will surely result. The bitrate of the sample VOB was too low to begin with. It appears to be a re-encode from lossy DV (but I'm not certain about the latter).
Last edited by sanlyn; 25th Mar 2014 at 09:44.
-
I have no idea how to manage with the ghosts and halos. Regarding the noise, Neat Video will do the job. This is an officially released DVD, sourced from a VHS tape and it makes me cringe when I see all those errors. Can you help me in any way? I can contact you via PM if you need more info...
-
It's difficult to conduct a project via PM, and others wouldn't be able to share the answers. RE NeatVideo: there is no frame in the VOB from which one could get a suitable noise sample. Given a good noise sample, NeatVideo will remove most of the fine grain. You could also use one of the MVdegrain versions.
Halos don't seem to be much of a problem here. The ghost trails are impossible to eliminate. It almost looks as if the ghosts and glowing artifacts on bright specular objects like the mic stand and stage lights were done purposely. Filters don't make ghost trails that look like those in the sample. They're too persistent and don't affect other objects.Last edited by sanlyn; 25th Mar 2014 at 09:45.
-
Last edited by Dr.Who; 6th Aug 2013 at 10:23.
-
-
Did you want more explanation ?
You basically have to manually mask out areas you want to fix. You can speed up the work by using specialized tools that motion track (so you don't have to do it frame by frame)
That part is not something I would do in avisynth - it's the wrong tool IMO for the halo/ghosts part. There might some things you can do to improve it slightly in avisynth , but the masks generated won't be accurate enough (you will damage other parts, or miss some defects entirely)
To be clear, I'm talking about multiple edges (e.g. the mike stand, certain times when mj moves) .
Other things like the blue channel flares can be improved . This is a common issue with many digital cameras, where overbrights lead to one channel clipping differently and early
2.
Still, I can't open RemoveDirtMC. No function found? I import both the avs and the dll files.
bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
Just copy & paste the function to the bottom of your avs script .
You need removegrain.dll , and mvtools2.dll as well in the plugins folder to autoload
The call is
RemoveDirtMC(30,false)
The higher the number, the more crap removed, the more damaging
Post any error messages you get, verbatim
Code:#REMOVE DIRT FUNCTION #................................................. .................................................. .................................................. ................. 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=li mit,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've never been able to run RemoveDirtMC. RemoveDirt and several versions of it, no problem. But every time someone suggests MC, I crank it up again and something goes amiss. Will try it again tonite.
Last edited by sanlyn; 25th Mar 2014 at 09:45.
-
Well what error message are you guys getting ? Just copy & paste those 2 functions to the bottom of your script . IIRC , "Clense" requires a specific version of RemoveGrain.dll (there are about a 6-7 different versions as well, LOL), but the correct one should be included in videofred's download package
-
So what would you recommend to do to the blue channel?
And what software would you recommend to get rid of the ghosts? -
You can probably do that part in avisynth / vdub , maybe with gradation curves . You got to be careful, because only highlight blue is the main problem (you don't want to affect all areas of the channel or you will cause color imbalances) . But you have more control in other programs dedicated for color work
And what software would you recommend to get rid of the ghosts? -
-
I just used your version of RemoveDirtMC and it runs OK now. Guess I had an oldie that called for NLMeansCL. Will replace my old script with the one you posted. Thanks.
I love finding umpteen versions with the same name.I've archived three others that don't look like yours.
Last edited by sanlyn; 25th Mar 2014 at 09:45.
-
It's not "mine", it's copied directly from Videofred's script (the John Meyer modified version, with the swapped motion vectors) . I don't know who the original, original author is.
NLMeansCL is the GPU / OpenCL accelerated variant
Yes there are umpteendifferent versions, here are a few more
http://forum.doom9.org/showthread.php?p=1559137#post1559137 -
My Video Fred folder goes back a long way, maybe too far. I should check for updates. Anything for a GPU-capable card (my new one qualifies) still gives me problems, but so far I haven't had to use it. And thanks for the link, I caught that one a while back (and many many more). Update time again! It never ends.
The MC script I had was by NEPHILIS circa 2011. But the function call is for "RemoveDirtMC_SE2". Will shelve that one for now.Last edited by sanlyn; 25th Mar 2014 at 09:45.
-
Yes you're correct - RemoveDirtMC_SE2 is the GPU accelerated version for RemoveDirtMC; NLMeansCL is the GPU version for TNLMeans (a different denoiser)
Many of the GPU accelerated versions are buggy, or often it's just a driver issue (either upgrading or reverting back to the last stable version) -
Finally managed to get RemoveDirt work. Thanks for that.
I found some snippets of the original masters (claimed by them) of the videos I posted you. Comparison pic: -
Who are "they" ? The production company ?
What format is the original master? Do you have any info on that ? Obviously the version you have on DVD was deinterlaced
If the original master was available, now that might be worthwhile to spend some extra time fixing -
The production company. The master is not available, it's in the archives. MJ Estate is very careful with it, not releasing quality products.
The snippets are taken from a documantary from the '90s (The One DVD), but sadly only a few seconds are available.
Both of them are deinterlaced by me when I took the screenshots (it's an image that I have for quite some months, but due to my exams I couldn't start editing).
There's no way I can reach the original master, and I was trying to get the released version (purple-ish one) as close as I can to the original master.
Regarding the colorisation is almost impossible. It screwes up the other angles because of the degradation of the tape. Even though it was released on DVD, I suspect it's from a bootleg VHS that leaked on the internet few years ago. It looks the same.
If you have any advice for me, I am happy to hear. It's one of the most complex things I worked on.
EDIT:
You were right. The released DVD is INDEED deinterlaced. What the...?
Also the source a friend sent me had a saturation boost. I contacted him at this very moment. It seems this is the original source.
Uploading screenshots in original resolution. First the documentary. Second is the released DVD. Third is leaked version.Last edited by Dr.Who; 7th Aug 2013 at 01:29.
-
EDIT:
You were right. The released DVD is INDEED deinterlaced. What the...?
Also the source a friend sent me had a saturation boost. I contacted him at this very moment. It seems this is the original source.
MJ Estate is very careful with it, not releasing quality products.
-
Yes. I ripped the DVD on my PC and took the screens with VLC. I'll show you more. This was the BONUS. But as you see it's almost the same as the leaked version. More than that, another bonus was from a U-Matic tape from the archive.
MJ Estate is very careful with it, not releasing quality products.
This is the trailer of the damaged-unrestored VHS: https://www.youtube.com/watch?v=aZr7oaAFXJA
What they have in the archives (untouched masters) also from the "The One" DVD: https://www.youtube.com/watch?v=PmLqHZD-3x0
What they released this year in a documentary (HDTV rip): https://www.youtube.com/watch?v=KD8s6yAItfc
That's why I deseperately need help with restoring at least that `bonus` features.
And now I'll show you a screen from the U-Matic tape and one from the so-called "restored" VHS. -
They chose to release a damaged-poor quality VHS (restored by an unknown company that did a horrible job) despite having 35mm films in the archive.
35mm would be uncommon for concert footage. I heard that some of the concerts (Wembly ?) might have been shot on 35mm , but most from those years (?90's) would have been betacam footage
Youtube doesn't do much justice and doesn't necessarily indicate much . For example, that 2nd link looks like upscaled HD. You can see deinterlacing artifacts .
Similar Threads
-
RemoveDirtMC
By Mephesto in forum RestorationReplies: 31Last Post: 20th Oct 2015, 11:58 -
Avisynth help.
By ooze in forum Video ConversionReplies: 10Last Post: 4th Aug 2013, 17:29 -
RemoveDirtMC error cant engage it at all
By mammo1789 in forum RestorationReplies: 4Last Post: 8th Nov 2012, 11:00 -
Avisynth 2.5.8 or 2.6.0
By carlmart in forum Video ConversionReplies: 0Last Post: 30th Oct 2012, 08:58 -
please need help with AviSynth.
By zamy212 in forum EditingReplies: 27Last Post: 18th Oct 2012, 11:20