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 7th May 2023, 22:00   #1  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
[HELP] Help with upscale and sharpening

Hi, I'm new with avisynth upscaling. I installed that + Avsmod.
I was impressed with the results of videoFred's post (https://forum.doom9.org/showthread.php?t=144271) , and I want to achieve the same (or any improved method) in old 1970's footage.

I downloaded the scripts and tried to run them on avsPmod but got the error "Cannot load a 32 bit dll in 64 bit avisynth". This is odd because avisynth+ was installed automatically in programfilesx86 by default, which makes me think that it was a 32 bit version. I'm using windows 11, if that helps.

I'm willing to use other script(s )if they are available and produce equivalent or better results. Please help!
mcabel is offline   Reply With Quote
Old 7th May 2023, 22:46   #2  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
Typically AVS+ installs both 32 and 64bit versions. But if your plugins 32bit - you need to run 32bit application to load 32bit AVS and plugins. Many old plugins are not updated to 64bit (mostly because of lots of handcrafted 32bit asm inside and new compilers can not autocompile it to 64bit). So you need first to separate all you found 32bit plugins from 64bit and try to arrange your workflow with using either only 32bit or 64bit only plugins.
DTL is offline   Reply With Quote
Old 7th May 2023, 23:48   #3  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by DTL View Post
Typically AVS+ installs both 32 and 64bit versions. But if your plugins 32bit - you need to run 32bit application to load 32bit AVS and plugins. Many old plugins are not updated to 64bit (mostly because of lots of handcrafted 32bit asm inside and new compilers can not autocompile it to 64bit). So you need first to separate all you found 32bit plugins from 64bit and try to arrange your workflow with using either only 32bit or 64bit only plugins.
How do I make Avsmod run 32bit avisynth+ rather than 64bit?
mcabel is offline   Reply With Quote
Old 8th May 2023, 00:10   #4  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 806
Quote:
Originally Posted by mcabel View Post
How do I make Avsmod run 32bit avisynth+ rather than 64bit?
Go here and get it.

https://www.videohelp.com/software/AvsP/old-versions

I would suggest you try Topaz Video AI.
__________________
This can be Very "TeDiouS"..
Long term RipBot264 user.

Ryzen 9 7950X
Intel i9-13900KF
Ryzen 9 5950X
Ryzen 9 5900X
Ryzen 9 3950X


Link to RB v1.27.0
TDS is offline   Reply With Quote
Old 8th May 2023, 00:42   #5  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by TDS View Post
Go here and get it.



I would suggest you try Topaz Video AI.
Thanks, I was able to run it, although the error is not "avs cannot load file specified module could not be found" ...but the ""plugins/removegrain.dll"" is in the directory mentioned in the error... I also tried running on admin mode but same error.

About Topaz AI.... on 4x proteus, it creates ugly artifacts on faces. On 2x, I feel that the output is rather not that well enhanced; at least on this type of old footage using porteus, or otherwise(I've seen good results in HD-to-4k, but not in old-footage to 2x or higher ).

https://ibb.co/7NxrJqx


Last edited by mcabel; 8th May 2023 at 00:44.
mcabel is offline   Reply With Quote
Old 8th May 2023, 01:10   #6  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 806
Quote:
Originally Posted by mcabel View Post
Thanks, I was able to run it, although the error is not "avs cannot load file specified module could not be found" ...but the ""plugins/removegrain.dll"" is in the directory mentioned in the error... I also tried running on admin mode but same error.
You might be able to update that .dll..

http://avisynth.nl/index.php/RemoveGrain_v0.9

Quote:
About Topaz AI.... on 4x proteus, it creates ugly artifacts on faces. On 2x, I feel that the output is rather not that well enhanced; at least on this type of old footage using porteus, or otherwise(I've seen good results in HD-to-4k, but not in old-footage to 2x or higher ).
Oh, yes, I know exactly what you mean, I have seen even worse results than your sample, on some older stuff I've tried, I don't think Topaz is all it's cracked up to be
__________________
This can be Very "TeDiouS"..
Long term RipBot264 user.

Ryzen 9 7950X
Intel i9-13900KF
Ryzen 9 5950X
Ryzen 9 5900X
Ryzen 9 3950X


Link to RB v1.27.0
TDS is offline   Reply With Quote
Old 8th May 2023, 04:57   #7  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by TDS View Post
You might be able to update that .dll..

http://avisynth.nl/index.php/RemoveGrain_v0.9
Thanks. I updated it but same error. I suspect there might be a mystery dependency that I'm not aware of >__<
mcabel is offline   Reply With Quote
Old 8th May 2023, 05:38   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,258
Did you try rgtools ?
http://avisynth.nl/index.php/RgTools
https://github.com/pinterf/RgTools/releases
poisondeathray is offline   Reply With Quote
Old 8th May 2023, 05:57   #9  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 806
Quote:
Originally Posted by mcabel View Post
Thanks. I updated it but same error. I suspect there might be a mystery dependency that I'm not aware of >__<
I just downloaded and had a look at "Fred's" scripts, I think it might be that they are pretty old, and due to that they are probably mostly 32bit

https://forum.doom9.org/showthread.p...54#post1237054

Code:
LoadPlugin("plugins/Deflicker.dll")
Loadplugin("plugins/Depan.dll")
LoadPlugin("plugins/DepanEstimate.dll")
Loadplugin("plugins/removegrain.dll")
LoadPlugin("plugins/removedirt.dll")
LoadPlugin("plugins/MVTools.dll")
LoadPlugin("plugins/MVTools2.dll")
Loadplugin("plugins/warpsharp.dll")
LoadPlugin("plugins/autolevels_06.dll")
LoadPlugin("plugins/Motion_06Dec05B.dll")
Import("plugins/03_RemoveDirtMC.avs")

Unless he has a more up to date "set".

What is your preferred encoding app ??

Maybe a more informative error message might help...
__________________
This can be Very "TeDiouS"..
Long term RipBot264 user.

Ryzen 9 7950X
Intel i9-13900KF
Ryzen 9 5950X
Ryzen 9 5900X
Ryzen 9 3950X


Link to RB v1.27.0
TDS is offline   Reply With Quote
Old 8th May 2023, 11:24   #10  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
The new upscalers may be designed to process max possible sharp 'video' into larger size. For old very soft film transfers and VHS captures may not detect any fine details and no textures for enchance.

For very soft sources it may be tested some medium(/low)-frequencies convolution sharpener like described in https://github.com/AviSynth/AviSynthPlus/issues/343

Current AVS working example is like
GeneralConvolution(0, "
-1 -2 -2 -2 -1
-2 -2 -3 -2 -2
-2 -3 70 -3 -2
-2 -2 -3 -2 -2
-1 -2 -2 -2 -1", auto=true, luma=true, chroma=false)
And adjusting center member in range about 60..100 it is now possible to adjust 'strength'. Where 60 is very strong, 100 is very weak and 50 is sort of high-pass filter only.

For even more soft sources it is require to design even larger spatial sized kernel of 7x7.
DTL is offline   Reply With Quote
Old 8th May 2023, 15:41   #11  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by TDS View Post
I just downloaded and had a look at "Fred's" scripts, I think it might be that they are pretty old, and due to that they are probably mostly 32bit


What is your preferred encoding app ??

Maybe a more informative error message might help...
I've been trying with meGui and avspmod, but I'm open to suggestions if anything is either better/easier to make it work. Megui 32bits gives me the same error message: "cannot load the file ...removegrain.dll Platform returned code 126: the specified module could not be found"
mcabel is offline   Reply With Quote
Old 8th May 2023, 15:44   #12  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
May be required MSVC redistributable not installed :
Requirements
MSVCR71.DLL

Good to found how is named redistributable installation file for MSVCR71.DLL . Also it must be 32bit too.

It may be - Microsoft Visual c++ 2003 redistributable (or something around .NET 1.1 and SDK ?) https://stackoverflow.com/questions/...edistributable

Last edited by DTL; 8th May 2023 at 15:50.
DTL is offline   Reply With Quote
Old 8th May 2023, 15:45   #13  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by DTL View Post
The new upscalers may be designed to process max possible sharp 'video' into larger size. For old very soft film transfers and VHS captures may not detect any fine details and no textures for enchance.

For very soft sources it may be tested some medium(/low)-frequencies convolution sharpener like described in https://github.com/AviSynth/AviSynthPlus/issues/343

Current AVS working example is like
GeneralConvolution(0, "
-1 -2 -2 -2 -1
-2 -2 -3 -2 -2
-2 -3 70 -3 -2
-2 -2 -3 -2 -2
-1 -2 -2 -2 -1", auto=true, luma=true, chroma=false)
And adjusting center member in range about 60..100 it is now possible to adjust 'strength'. Where 60 is very strong, 100 is very weak and 50 is sort of high-pass filter only.

For even more soft sources it is require to design even larger spatial sized kernel of 7x7.
Sounds interesting. How would I put this in practice in meGui avsPmod or any encoding tool?
mcabel is offline   Reply With Quote
Old 8th May 2023, 15:52   #14  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
Put it into your AVS script.

After source load and before final Prefetch().
DTL is offline   Reply With Quote
Old 8th May 2023, 16:44   #15  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by DTL View Post
May be required MSVC redistributable not installed :
Requirements
MSVCR71.DLL

Good to found how is named redistributable installation file for MSVCR71.DLL . Also it must be 32bit too.

It may be - Microsoft Visual c++ 2003 redistributable (or something around .NET 1.1 and SDK ?) https://stackoverflow.com/questions/...edistributable
After installing an old version of the redistributable, and finding other dependencies that came after that error, things evolved into:

"DePanestimate: can not load FFTw3.dll "-_-

Last edited by mcabel; 8th May 2023 at 17:02.
mcabel is offline   Reply With Quote
Old 8th May 2023, 16:47   #16  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
It is separately distributed .dll from https://www.fftw.org/ . Also you need 32bit and 64bit versions for different execution environments.
DTL is offline   Reply With Quote
Old 8th May 2023, 17:04   #17  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by DTL View Post
It is separately distributed .dll from https://www.fftw.org/ . Also you need 32bit and 64bit versions for different execution environments.

I downloaded the 32 bit version and put into system32/wow64 after renaming libfftw3f-3.dll file to "FFTW3.dll" as the author mentioned. There was no change after restarting. Am I missing something?
mcabel is offline   Reply With Quote
Old 8th May 2023, 17:22   #18  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
32bit .dlls in x64 windows go into syswow64 only. Try to put fftw3.dll into folder with depanestimate.dll. Also may be API version may change and no more compatible with old builds of depanestimate.dll - try some old version of fftw3.dll (may be dated of mid-200x or mid-201x years.

For mvtools latest builds with depanestimate you can try pinterf 2.7.45 - https://github.com/pinterf/mvtools/releases . But I not sure it is compatible with very old scripts - need testing. Also if script not used depan/depanestimate you can disable it load in scripts. For depan you can use MDepan from mvtools and not use depanestimate.
DTL is offline   Reply With Quote
Old 8th May 2023, 19:24   #19  |  Link
mcabel
Registered User
 
Join Date: Jan 2017
Posts: 13
Quote:
Originally Posted by DTL View Post
Also if script not used depan/depanestimate you can disable it load in scripts.
This sounds like a good option, since I don't really need stabilizing in my video. But the code for "cleaning" makes references to variable stab2. Is there a way to modify the "cleaning code" so it takes the uncropped video instead?

(I also tried placing fftw3.dll in the plugins folder but that did not work either. I guess I have to give up on making that work... )

Code:
#STABILIZING/CROPPING
#...........................................................................................................................................

stab_reference= source1.crop(20,20,-20,-20).colorYUV(autogain=true).crop(est_left,est_top,-est_right,-est_bottom)

mdata=DePanEstimate(stab_reference,trust=trust_value,dxmax=maxstabH,dymax=maxstabV)
stab=DePanStabilize(source1,data=mdata,cutoff=cutoff_value,dxmax=maxstabH,dymax=maxstabV,method=0,mirror=15).deflicker()
stab2= stab.crop(CLeft,CTop,-CRight,-CBottom)
stab3=DePanStabilize(source1,data=mdata,cutoff=cutoff_value,dxmax=maxstabH,dymax=maxstabV,method=0,info=true)


WS= width(stab)
HS= height(stab)
stab4= stab3.addborders(10,10,10,10,$B1B1B1).Lanczos4Resize(WS,HS)
stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5)
 



#CLEANING/PRESHARPENING/RESIZING
#..........................................................................................................................................


noise_baseclip= stab2.levels(0,gamma,255,0,255).tweak(sat=saturation)

cleaned= RemoveDirtMC(noise_baseclip,dirt_strenght).unsharpmask(USM_sharp_ness1,USM_radi_us1,0)\
.unsharpmask(USM_sharp_ness2,USM_radi_us2,0).Lanczos4Resize(W,H)
mcabel is offline   Reply With Quote
Old 8th May 2023, 21:21   #20  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 989
Try
Code:
#stab_reference= source1.crop(20,20,-20,-20).colorYUV(autogain=true).crop(est_left,est_top,-est_right,-est_bottom)

#mdata=DePanEstimate(stab_reference,trust=trust_value,dxmax=maxstabH,dymax=maxstabV)
#stab=DePanStabilize(source1,data=mdata,cutoff=cutoff_value,dxmax=maxstabH,dymax=maxstabV,method=0,mirror=15).deflicker()
stab2= source1.crop(CLeft,CTop,-CRight,-CBottom)
#stab3=DePanStabilize(source1,data=mdata,cutoff=cutoff_value,dxmax=maxstabH,dymax=maxstabV,method=0,info=true)


#WS= width(stab)
#HS= height(stab)
#stab4= stab3.addborders(10,10,10,10,$B1B1B1).Lanczos4Resize(WS,HS)
#stab5= Lanczos4Resize(stab2,W,H).sharpen(0.5)
DTL is offline   Reply With Quote
Reply

Tags
avisynth, avspmod, restoration, upscaling

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 01:41.


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