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 11th January 2023, 18:24   #1461  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by johnnytaco View Post
I did some troubleshooting and its not an issue with ImageSource. The standalone function works well. As soon as I change result="stab" (to isolate the first function in JM's script after source) the black frames show up. I suspect DePanEstimate or DePanStabilize might be looking back/ahead at frames and results in the black frames showing up.
What version of JM script, can you post a link or post the script ?

Depan/DepanStablilize works ok for me. What version of Depan are you using ? It's supposed to look at other frames, otherwise it couldn't establish the relationship between adjacent frames and stabilize
poisondeathray is offline   Reply With Quote
Old 12th January 2023, 12:06   #1462  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by johnmeyer View Post
BTW 2560x1920 is way more resolution than you need for Super 8. Try scanning and/or saving at 1/4 that resolution (1280x960) and see if you spot any difference at all. Scanning and using more resolution than is in the media just slows down your workflow, as well as eating up more disk space than you need to. I find that SD resolution is more than enough and therefore I suspect that 1280x960 will be 100% the same as 2560x1920.
I agree! It's not the size that counts, but the quality from the scanning device.

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 12th January 2023, 15:23   #1463  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by poisondeathray View Post
Depan/DepanStablilize works ok for me.
You might want to try this: much better stabilisation and scene detection can be set with "error"
Code:
  SetFilterMTMode("DEFAULT_MT_MODE", 2)

clip= AVISource("Z:\VDP\VdP_Sp2.avi").converttoYV12()

vectors= clip.MSuper().MAnalyse(isb=false)
mdata= MDepan(clip,vectors,rot=false, zoom=false, error= 65)

stab= clip.DePanStabilize(data=mdata,dxmax=40,dymax=40,zoommax=0, rotmax=0,method=0, mirror=0,  info=true)

stab

Prefetch(4)
SetFilterMTMode and Prefetch is for use with Avisynth+ of cource.

Forgot to mention:
Requires depan.dll vs. 2.13.1.3 or higher modified versions by Printerf
mvtools2.dll vs. 2.7.23.0 or higher
https://github.com/pinterf/mvtools/releases

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 12th January 2023 at 16:33.
videoFred is offline   Reply With Quote
Old 20th January 2024, 04:26   #1464  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
issue loading into johnmeyer's mod of VideoFred's script

getting the following error on trying to load a proreshq clip:

Script error: can't have a named (quoted) parameter followed by an ordinary parameter.

the line it highlights is this function line:
Code:
function RemoveDirt(clip input, int "limit", bool _grey)
i'm guessing we're referring to the "limit" parameter. how do i get around this? is it as simple as removing the quotes? will try that while waiting for response.

thanks,
babag
BabaG is offline   Reply With Quote
Old 20th January 2024, 05:34   #1465  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 1,058
Try:

Code:
function RemoveDirt(clip input, int "limit", bool "_grey")
VoodooFX is offline   Reply With Quote
Old 20th January 2024, 07:43   #1466  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks, voodoofx. that got me on to the next error.

now getting:

DePanEstimate: Can not load fftw3.dll or libfftw3f-3.dll!

i do have fft3dfilter.dll in my plugins64+ folder. maybe that doesn't cover it?

thanks again,
BabaG
BabaG is offline   Reply With Quote
Old 20th January 2024, 10:20   #1467  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 1,058
Quote:
Originally Posted by BabaG View Post
Can not load fftw3.dll or libfftw3f-3.dll!
FFTW 3.3.5 (fftw-3.3.5-dll32.zip or fftw-3.3.5-dll64.zip)

*** 32-bit libfftw3f-3.dll needs to be in the search path (C:\Windows\SysWOW64 64-bit OS or C:\windows\system32 32-bit OS)
*** 64-bit libfftw3f-3.dll needs to be in the search path (C:\windows\system32 64-bit OS)
VoodooFX is offline   Reply With Quote
Old 20th January 2024, 20:44   #1468  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
hmm. i've got the lib files in the proper places but getting crashes in avspmod on trying to preview the image. tried copy/renaming the lib files to fftw3.dll as per posts here and elsewhere and placed them in every conceivable combination of location. no luck. also tried simply copying the fft3.dll that VideoFred includes with his download to, again, every conceivable location. same thing. crash on preview.

out of ideas.
babag
BabaG is offline   Reply With Quote
Old 21st January 2024, 12:06   #1469  |  Link
Arx1meD
Registered User
 
Arx1meD's Avatar
 
Join Date: Feb 2021
Posts: 131
BabaG, try LoadDLL. Perhaps you first need to delete fftw3.dll from C:\Windows\...
Arx1meD is offline   Reply With Quote
Old 21st January 2024, 14:41   #1470  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,040
posted by BabaG:
Quote:
tried copy/renaming the lib files to fftw3.dll as per posts here and elsewhere and placed them in every conceivable combination of location.
You need the zip for the bittage of avisynth that you are using [32 bit Avisynth, then 32 bit zip, else 64 bit zip].

Make sure that you use the file with EXACT source name libfftw3f-3.dll
and make a copy named as fftw3.dll, and copy both of these files to ONLY ONE location as below,

32bit_OS_32bit_Avisynth: C:\Windows\system32
64bit_OS_64bit_Avisynth: C:\Windows\system32
64bit_OS_32bit_Avisynth: C:\Windows\SysWOW64

as outlined by VoodooFX, and delete any others that you mistakenly copied to the wrong directory [ie, "every conceivable combination of location"].

Some plugins use dll with filename libfftw3f-3.dll, and some with filename fftw3.dll, and some plugins may use either name.
__________________
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; 21st January 2024 at 15:58.
StainlessS is offline   Reply With Quote
Old 21st January 2024, 22:17   #1471  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks all.

avisynth version shows:
Code:
AviSynth+ 3.7.3 (r4003, 3.7, x86_64)
placed libfftw3f-3.dll and fftw3.dll in:

C:\Windows\system32

neither in SysWOW64. system is 64 bit.

same crash. other scripts load and run fine.

fwiw, my process has been to try the files in various locations and, after trying in that location, to remove them before trying in the next location. i do this to avoid having duplicates or wrong versions cluttered around the system.

thanks again,
babag
BabaG is offline   Reply With Quote
Old 21st January 2024, 22:29   #1472  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by BabaG View Post
thanks all.

avisynth version shows:
Code:
AviSynth+ 3.7.3 (r4003, 3.7, x86_64)
placed libfftw3f-3.dll and fftw3.dll in:

C:\Windows\system32

neither in SysWOW64. system is 64 bit.

same crash. other scripts load and run fine.
Try vdub2 to preview , any crash ?

How do you know the crash now is related to libfftw3f-3.dll ? That was for the previous error with DepanEstimate ? Do you have a different error message with the new crash ?

What other types of scripts run ok ? Simple ones ?

I'm thinking a bad (other) plugin .

Quote:
fwiw, my process has been to try the files in various locations and, after trying in that location, to remove them before trying in the next location. i do this to avoid having duplicates or wrong versions cluttered around the system.
You can try avsinfo tool for information and to identify versions of plugins

Last edited by poisondeathray; 21st January 2024 at 22:31.
poisondeathray is offline   Reply With Quote
Old 21st January 2024, 22:31   #1473  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
thanks, pdr.

i was actually just doing that. vdub2 also crashed but did give this as its best guess as to the cause:
Code:
An exception occurred in module 'warpsharp'.
thanks again,
babag
BabaG is offline   Reply With Quote
Old 22nd January 2024, 05:41   #1474  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
ran avsinfo tool and the 32 bit reported no problems but the 64 bit reported this:
Quote:
[Plugin errors/warnings]
________________________________________________________________________________

Function duplicates:

"m4" : "C:\Program Files (x86)\AviSynth+\plugins64+\GrainFactory3.avsi"
"m4" : "C:\Program Files (x86)\AviSynth+\plugins64+\HistogramRGBParade.avsi"
"undefined" : "[InternalFunction]"
"Undefined" : "C:\Program Files (x86)\AviSynth+\plugins64+\Zs_RF_Shared.avsi"
don't really know what to do about that.

thanks,
babag
BabaG is offline   Reply With Quote
Old 22nd January 2024, 16:23   #1475  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Function duplicates shouldn't cause a crash


Where is the modified JM script ?

Quote:
An exception occurred in module 'warpsharp'.
Check warpsharp version and is it actually being used? Move it into a different directory and/or comment out the LoadPlugin call


Check the dates of the other .dll's in avsinfo . Older ones that haven't been updated are more likely the culprit

If you still have problem - clean out the plugins directory , and one by one add them back according to the error message, checking the script each time . Since other scripts work ok without crashing, it's likely a bad/old plugin
poisondeathray is offline   Reply With Quote
Old 22nd January 2024, 17:24   #1476  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,723
Quote:
Originally Posted by poisondeathray View Post
Where is the modified JM script ?
I've skimmed these new posts and had the same exact question. He's obviously made a lot of changes. As one example, the modification VoodooFX made by putting the quotes in the correct place corrected an error that was NOT in any version of my script I ever posted. That syntax error, as BabaG has found, causes the script to fail, and my scripts did not have any obvious syntax errors like that.

Therefore, without seeing the script he is actually using, we cannot assume that it is actually the same as anything that I wrote.
johnmeyer is offline   Reply With Quote
Old 22nd January 2024, 22:32   #1477  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
here's the copy of the script, minus the head notes for space.

part 1 of 2.
Code:
#GENERAL PARAMETERS                                     #moved before file load by BabaG to define play_speed before it is first called (line 90)
#----------------------------------------------------------------------------------------------------------------------------
result="result4"                                               #specify the wanted output here; valid results are "result1" through "result4" and "resultS1" through "resultS4" for before/after
play_speed=18                                                  #play speed (8mm=16; Super8=18; 16mm sound=24)


#VIDEO FILE
#----------------------------------------------------------------------------------------------------------------------------
#Change the following line to point to your video file
#film="e:\fs.avi"                                             #original johnmeyer line
#film="path\to\prores_file.mov"
film="Appointment_Room_512_2048x1536p_GV-HQX_18fps____CLEANUP_MASTERING_SCRIPT_Lvl_4400x65535_TESTCLIP.mov"
#source1= LSmashVideoSource(film).killaudio().assumefps(play_speed).converttoYV12()    #supports proreshq import; suggested by poisondeathray
source1= LSmashVideoSource(film).killaudio().assumefps(play_speed).z_ConvertFormat(pixel_type="YUV420P10")    #supports proreshq import; suggested by poisondeathray
                                                              #z_ConvertFormat(pixel_type="YUV420P10") suggested by Boulder
                                                              #z_ConvertFormat(pixel_type="YUV420P16") suggested by Boulder also

                                                              
#COLOR AND LEVELS PARAMATERS
#----------------------------------------------------------------------------------------------------------------------------
saturation=1.0                                                  #for all outputs
gamma=1.0                                                       #for all outputs 
blue= -0  red=-0                                                #manual color adjustment, when returning result3 & result4. Values can be positive or negative
black_level=0  white_level=255 output_black=0  output_white=255 #manual levels, when returning result2 & result4
 

#SIZE, CROP AND BORDERS PARAMETERS
#----------------------------------------------------------------------------------------------------------------------------
CLeft=16  CTop=16  CRight=16  CBottom=16                         #crop values after Depan and before final resizing 
W=720  H=480                                                     #final size after cropping 
bord_left=0        bord_top=0     bord_right=0     bord_bot=0    #720p= borders 150
in_bord_left=0  in_bord_top=0  in_bord_right=0  in_bord_bot=0    #Borders around input that must be removed


#STABILISING PARAMETERS
#----------------------------------------------------------------------------------------------------------------------------
maxstabH=05                                                      #maximum values for the stabiliser (in pixels) 20 is a good start value 
maxstabV=20
est_left=40  est_top=40  est_right=40  est_bottom=40             #crop and contast values for special Estimate clip
est_cont=1.6

#DENOISING PARAMETERS
#----------------------------------------------------------------------------------------------------------------------------
#Fastest parameters
#denoising_strength=600                     #denoising level of first denoiser: MVDegrain() 
#denoising_strength=300                     #denoising level of first denoiser: MVDegrain() 
#block_size=   16                           #block size of MVDegrain
#block_size_v= 16
#block_over=    8                           #block overlapping of MVDegrainMulti()

#Best compromise between speed and quality
denoising_strength= 600                     #denoising level of first denoiser: MDegrain() 
block_size=    8                            #block size of MVDegrain
block_size_v=  8
block_over=    4                            #block overlapping of MVDegrainMulti()

dirt_strength=23                            #sets amount of dirt removal (big spots)


#FOUR STEP SHARPENING PARAMETERS
#--------------------------------------------------------------------------------------------------------------------------------
PRE_sharp_ness= 120   PRE_radi_us= 3              #presharpening (UnsharpMask) just after first denoising
Sharp_Strength= 0.1


#AUTO LEVELS PARAMETER
#--------------------------------------------------------------------------------------------------------------------------------
X=4   #X  is a special parameter for reducing the autolevels effect on the whites
X2=4  #X2 is a special parameter for reducing the autolevels effect on the blacks 


#NUMBER OF THREADS
#--------------------------------------------------------------------------------------------------------------------------------
threads=5


# END VARIABLES, BEGIN SCRIPT
#=================================================================================================================================

# Using AVISynth version 2.60, build August 28, 2012 (Ben-Rudiak-Gould, etc.)
# Using VirtualDub 1.8.6

#Change the following (lower or higher) if you have stability problems with multi-threading
SetMemoryMax(800)

#Load plugins explicitly            all commented by BabaG to avoid error that they are not found; make sure they are all in the proper avisynth plugin folders so as to auto load
#LoadPlugin ("mvtools2.dll")        #Version 2.5.11.9    2/24/2012
#LoadPlugin("autolevels.dll")       #Version 0.6.0.0     1/09/2011
#LoadPlugin("Deflicker.dll")        #Version 0.4.0.0     8/16/2004
#Loadplugin("Depan.dll")            #Version 1.10.0.0    4/09/2007
#LoadPlugin("DepanEstimate.dll")    #Version 1.9.2.0     3/25/2007
#Loadplugin("mt_masktools.dll")     #Version 2.0.23.0    3/14/2008
#loadplugin("RemoveDirtSSE2.dll")   #Version 0.9         5/05/2005    
#Loadplugin("RemoveGrainSSE2.dll")  #Version 0.9         5/01/2005
#Loadplugin("warpsharp.dll")        #                    4/05/2010

#Use the following for alternative frame interpolation
#loadplugin("svpflow1.dll")        #Version 1.2.1.0     5/29/2012
#loadplugin("svpflow2.dll")        #Version 1.3.1.0     6/02/2012 
#Import("InterFrame2.avsi")        #Version 2.1.0       6/27/2012

#Open and crop the video
#Remove all setmtmode statements (there are four in this script) if not using multi-threaded (MT) AVISynth
#setmtmode(5,threads)               #commented by BabaG
#source1= Avisource(film).killaudio().assumefps(play_speed).converttoYV12()           #killaudio() improves stability (in my experience -- others disagree)
source1= LSmashVideoSource(film).killaudio().assumefps(play_speed).z_ConvertFormat(pixel_type="YUV420P10")    #supports proreshq import; suggested by poisondeathray
                                                              #z_ConvertFormat(pixel_type="YUV420P10") suggested by Boulder
                                                              #z_ConvertFormat(pixel_type="YUV420P16") suggested by Boulder also

cropped_source=source1.crop(in_bord_left,in_bord_top,-in_bord_right,-in_bord_bot)    #temporarily remove any black borders on input video
#setmtmode(2)                       #commented by BabaG

#cropped_source=filldrops(cropped_source)     #Use this when removing bad frames that have been removed by duplicating previous frame
                                              #(see notes in function at end of script)

#STABILIZING
#....................................................................................................................................................................
stab_reference= cropped_source.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).MT_binarize(threshold=80).greyscale().invert()
mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=maxstabH,dymax=maxstabV)
stab=DePanStabilize(cropped_source,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=1,mirror=15)

#Alternative line that includes deflicker. I find that this usually is not needed.
#stab=DePanStabilize(cropped_source,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=1,mirror=15).deflicker()


#DENOISING
#...................................................................................................................................................................

#Remove dirt
input_to_removedirt=stab.crop(CLeft,CTop,-CRight,-CBottom)
stabcrop=RemoveDirtMC(input_to_removedirt,dirt_strength,false)

#Reduce grain
prefiltered = RemoveGrain(stabcrop,2)
superfilt =   MSuper(prefiltered, hpad=32, vpad=32,pel=2)
super=        MSuper(stabcrop, hpad=32, vpad=32,pel=2)

halfblksize= (block_size>4)   ? block_size/2 : 4
halfoverlap= (block_over>2)   ? block_over/2 : 2

bvec1 =  MAnalyse(superfilt, isb = true,  delta = 1, blksize=block_size, overlap=block_over,dct=0)
bvec1 =  MRecalculate(super, bvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100) 

fvec1 =  MAnalyse(superfilt, isb = false, delta = 1, blksize=block_size, overlap=block_over,dct=0)
fvec1 =  MRecalculate(super, fvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100)

bvec2 =  MAnalyse(superfilt, isb = true,  delta = 2, blksize=block_size, overlap=block_over,dct=0)
bvec2 =  MRecalculate(super, bvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)

fvec2 =  MAnalyse(superfilt, isb = false, delta = 2, blksize=block_size, overlap=block_over,dct=0)
fvec2 =  MRecalculate(super, fvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)

denoised=stabcrop.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength).levels(0,gamma,255,0,255).tweak(sat=saturation).unsharpmask(PRE_sharp_ness,PRE_radi_us,0)


#SHARPENING
#...................................................................................................................................................................
sharp1=denoised.sharpen(Sharp_Strength)	
PreBorderFrame = sharp1.Lanczos4Resize(W - bord_left - in_bord_left - bord_right - in_bord_right, H - bord_top - in_bord_top - bord_bot - in_bord_bot)

Last edited by BabaG; 22nd January 2024 at 22:35.
BabaG is offline   Reply With Quote
Old 22nd January 2024, 22:32   #1478  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
paret 2 of 2.
Code:
#FRAME INTERPOLATION (optional)
#...................................................................................................................................................................

#Interpolate frames
#Use this for progressive output -- example shows 29.97 progressive
#PreBorderFrame=InterFrame(NewNum=30000,NewDen=1001,PreBorderFrame,GPU=true,Cores=threads)

#Use this for interlaced output -- example shows 29.97 interlaced
#PreBorderFrame=InterFrame(NewNum=60000,NewDen=1001,PreBorderFrame,GPU=true,Cores=threads).SeparateFields().SelectEvery(4, 0, 3).Weave()


#RESULT1: AUTOLEVELS,AUTOWHITE
#......................................................................................................................................................................
#SetMTMode(5)         #Turn off SetMTMode for Autolevels    #commented by BabaG
result1= PreBorderFrame.coloryuv(autowhite=true).addborders(X,0,0,0,$FFFFFF).addborders(0,0,X2,0,$000000).autolevels(filterRadius=2).crop(X,0,-X2,-0).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)

#RESULT3: AUTOLEVELS, MANUAL COLOR CORRECTIONS
#.....................................................................................................................................................................
result3= PreBorderFrame.coloryuv(off_U=blue,off_V=red).addborders(X,0,0,0,$FFFFFF).addborders(0,0,X2,0,$000000).autolevels(filterRadius=2).crop(X,0,-X2,-0).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
#SetMTMode(2)        #Re-enable SetMTMode after Autolevels  #commented by BabaG

#RESULT2: MANUAL LEVELS, AUTOWHITE
#......................................................................................................................................................................
result2= PreBorderFrame.levels(black_level,gamma,white_level,0,255).coloryuv(autowhite=true).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)

#RESULT4: MANUAL LEVELS, MANUAL COLOR CORRECTIONS
#.....................................................................................................................................................................
result4= PreBorderFrame.coloryuv(off_U=blue,off_V=red).levels(black_level,gamma,white_level,0,255).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)


#PARAMETERS FOR THE COMPARISONS
#.....................................................................................................................................................................
W2= W+bord_left+bord_right
H2= H+bord_top+bord_bot
source4=Lanczos4Resize(source1,W2,H2)


#COMPARISONS: ORIGINAL VS RESULTS
#......................................................................................................................................................................
resultS1= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result1,"autolevels, autowhite",size=28,align=2))
resultS2= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result2,"autowhite, manual levels correction",size=28,align=2))
resultS3= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result3,"autolevels, manual color correction",size=28,align=2))
resultS4= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result4,"manual colors and levels correction",size=28,align=2))

#Finish and go home
Eval(result)


# END SCRIPT, BEGIN FUNCTIONS
#=================================================================================================================================


#REMOVE DIRT FUNCTION
#......................................................................................................................................................................
function RemoveDirt(clip input, int "limit", bool "_grey")      #quotes added around _grey per forum suggestion for error
{
  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)
}

#This function provides motion compensation for the remove dirt function, thus improving quality.
function RemoveDirtMC(clip,int "limit", bool "_grey")
{
  _grey=default(_grey, false)
  limit = default(limit,6)
 
  prefiltered = RemoveGrain(clip,2)
  superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)
  super=MSuper(clip, hpad=32, vpad=32,pel=2)

  bvec = MAnalyse(superfilt,isb=true,  blksize=16, overlap=2,delta=1, truemotion=true)
  fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)

  bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=100)
  fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=100)

  backw = MFlow(clip,super,bvec_re)
  forw  = MFlow(clip,super,fvec_re)

  clp=interleave(forw,clip,backw)
  clp=clp.RemoveDirt(limit,_grey)
  clp=clp.SelectEvery(3,1)
  return clp
}

# The following function will remove near duplicates ("0.1") or exact duplicates (change to "0.0"). 
# It replaces these duplicates with a motion estimated frame. It works really well (IMHO).
#
# Use: In your video editor, replace any single bad frame (burned frame, jump, missing frame from splice, etc.) with a duplicate of the 
# previous frame. Then, include a call to this function (see script above, where it is commented out).
#
# Here's an example of how this function can be use:
#
# http://www.youtube.com/watch?v=uzMFodrGHDs
#

function filldrops (clip c)
{
  super=MSuper(c,pel=2)
  vfe=manalyse(super,truemotion=true,isb=false,delta=1)
  vbe=manalyse(super,truemotion=true,isb=true,delta=1)
  filldrops = mflowinter(c,super,vbe,vfe,time=50)
  fixed = ConditionalFilter(c, filldrops, c, "YDifferenceFromPrevious()", "lessthan", "0.1")
  return fixed
}
i moved the 'play_speed' variable definition ahead of everything else as i was getting an error that avisynth didn't know what it meant. i assume that meant it hadn't been defined before it was called. moving it allowed the script to continue.

i commented out the 'loadplugins' commands and put the plugins in the main avisynth plugin folders.

setmtmode was causing errors so i commented those for the time being.

thanks,
babag
BabaG is offline   Reply With Quote
Old 22nd January 2024, 23:22   #1479  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by BabaG View Post
i commented out the 'loadplugins' commands and put the plugins in the main avisynth plugin folders.
I meant don't even move them to autoload directory. Move them somewhere else. They are all older versions and some of them are known to cause problems with modern avs+ versions .

Or stick with old avs classic with old plugins.

If you're going to use avs+ x64:

Don't use the plugin warpsharp.dll. It's probably the old avs 2.5 plugin.
#Loadplugin("warpsharp.dll") # 4/05/2010
There is a newer awarpsharp2 , that has a compatibility function for old scripts and it works for avs+ x64
But it looks like warpsharp isn't even being called. Sharpen is using the internal sharpen function in that script

Another common problem is mt_masktools.dll - this version is known to cause various problems with modern avs+
#Loadplugin("mt_masktools.dll") #Version 2.0.23.0 3/14/2008
#LoadPlugin ("mvtools2.dll") #Version 2.5.11.9 2/24/2012

Use the pinterf masktools and mvtools2
https://github.com/pinterf/mvtools/releases
https://github.com/pinterf/masktools/releases

In avsinfo tool , look at the dates of the plugins - that should be a big clue. Move any old versions to some other folder and update them to the updated versions

Quote:
setmtmode was causing errors so i commented those for the time being.
That is for avs classic . For avs+ you would use SetFilterMTMode and Prefetch
http://avisynth.nl/index.php/SetFilterMTMode
poisondeathray is offline   Reply With Quote
Old 23rd January 2024, 06:58   #1480  |  Link
BabaG
Registered User
 
Join Date: Dec 2003
Posts: 253
here's the avsinfo file for 64:
Code:
[OS/Hardware info]
Operating system:           Windows 10 (x64) (Build 18362)

CPU:                        Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz / Coffee Lake (Core i7)
                            MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX
                            6 physical cores / 12 logical cores


[Avisynth info]
VersionString:              AviSynth+ 3.7.3 (r4003, 3.7, x86_64)
VersionNumber:              2.60
File / Product version:     3.7.3.0 / 3.7.3.0
Interface Version:          10
Multi-threading support:    Yes
Avisynth.dll location:      C:\windows\system32\avisynth.DLL
Avisynth.dll time stamp:    2023-07-16, 07:48:08 (UTC)
PluginDir2_5 (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+   (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64+


[C++ 2.5 Plugins (64 Bit)]
C:\Program Files (x86)\AviSynth+\plugins64+\Decomb.dll  [2013-12-02]
C:\Program Files (x86)\AviSynth+\plugins64+\warpsharp.dll  [2011-06-15]

[C++ 2.6 Plugins (64 Bit)]
C:\Program Files (x86)\AviSynth+\plugins64+\AutoLevels_x64.dll  [0.12.3.0]
C:\Program Files (x86)\AviSynth+\plugins64+\avsresize.dll  [0.0.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\aWarpSharp.dll  [2016-06-24]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\Deflicker.dll  [0.6.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\DePan.dll  [2.13.1.6]
C:\Program Files (x86)\AviSynth+\plugins64+\DePanEstimate.dll  [2.10.0.4]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\ffms2.dll  [2020-08-22]
C:\Program Files (x86)\AviSynth+\plugins64+\fft3dfilter.dll  [2.10.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\FluxSmooth.dll  [1.4.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\hqdn3d.dll  [1.1.1.0]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\KNLMeansCL.dll  [2020-11-12]
C:\Program Files (x86)\AviSynth+\plugins64+\LSMASHSource.dll  [2022-05-05]
C:\Program Files (x86)\AviSynth+\plugins64+\masktools2.dll  [2.2.30.0]
C:\Program Files (x86)\AviSynth+\plugins64+\mvtools2.dll  [2.7.45.0]
C:\Program Files (x86)\AviSynth+\plugins64+\neo-fft3d.dll  [1.0.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\nnedi3.dll  [0.9.4.60]
C:\Program Files (x86)\AviSynth+\plugins64+\RemoveDirt.dll  [0.9.3.0]
C:\Program Files (x86)\AviSynth+\plugins64+\RgTools.dll  [1.2.0.0]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TIVTC.dll  [1.0.26.0]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll  [2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64\AddGrainC.dll  [1.8.4.0]

[Scripts (AVSI)]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.avsi  [2022-10-07]
C:\Program Files (x86)\AviSynth+\plugins64+\GrainFactory3.avsi  [2022-10-23]
C:\Program Files (x86)\AviSynth+\plugins64+\HistogramRGBParade.avsi  [2024-01-18]
C:\Program Files (x86)\AviSynth+\plugins64+\QTGMC.avsi  [2022-10-24]
C:\Program Files (x86)\AviSynth+\plugins64+\SMDegrain.avsi  [2023-12-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TemporalDegrain.avsi  [2023-03-01]
C:\Program Files (x86)\AviSynth+\plugins64+\TransformsPack - Main.avsi  [2023-12-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TransformsPack - Models.avsi  [2023-12-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TransformsPack - Transfers.avsi  [2023-12-16]
C:\Program Files (x86)\AviSynth+\plugins64+\Zs_RF_Shared.avsi  [2022-10-24]

[Uncategorized files]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt  [2022-10-07]
omitted the duplicate functions section as i already posted that. i think things seem to be pretty current. don't really know what i'm doing as far as checking though.

thanks,
babag
BabaG 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 11:03.


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