I'm a novice or newb using avisynth with any program.
I have added plugins to avisynth as other errors appeared.
Those seem to be fixed now.
I may install avisynth+ but I wanted to get avisynth working if I can.
I tried to keep the code simple.
These are the errors:
[Attachment 81580 - Click to enlarge]
[Attachment 81581 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 98
Thread
-
-
Filters are automatically applied one after the other using a variable called Last, unless you assign a clip to a variable yourself, which you've done. TemporalDegrain2 is complaining because it expects to see a clip, but it's not getting one.
Code:V = ffms2("source") A = LWLibavAudioSource("source") V.TemporalDegrain2(degrainTR=0) # or TemporalDegrain2(V, degrainTR=0)
Code:ffms2("source") A = LWLibavAudioSource("source") TemporalDegrain2(degrainTR=0)
The audio is assigned to the variable "A" so it doesn't change the value of Last.
Last is automatically used as the input for TemporalDegrain2() like this.
Code:ffms2("source") A = LWLibavAudioSource("source") TemporalDegrain2(clip=Last, degrainTR=0)
Code:ffms2("source") A = LWLibavAudioSource("source") X = Last FilterA() Y = last FilterB() FilterC() return X # would return the source video, unfiltered return Y # would return the output of FilterA
Code:V = ffms2("source") A = LWLibavAudioSource("source") AudioDub(V, A)
Dump Avisynth and install Avisynth+. There's no point starting out with an obsolete version.
And when you do, don't forget to add Prefetch(x) to the end of your script otherwise Avisynth+ will run in single threaded mode (where "x" is an integer specifying the number of threads). TemporalDegrain2 is quite slow, and in single threaded mode it might be slow enough to be impractical.
http://avisynth.nl/index.php/SetFilterMTMode#PrefetchLast edited by hello_hello; 19th Aug 2024 at 11:14.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I was trying what I believe would be the simplest setting first.
http://avisynth.nl/index.php/TemporalDegrain2
Suggested settings for removing the grain, sorted by increasing source grain
degrainTR=0,postFFT=0 (aka Undot)
degrainTR=0,postFFT=1,postSigma=value between 0 and 1
degrainTR=1,grainLevel=-1,postFFT=0
degrainTR=1,grainLevel=0,postFFT=0
degrainTR=1,grainLevel=0,postFFT=1,postSigma=value between 0 and 1
degrainTR=1,grainLevel=1,postFFT=0
degrainTR=1,grainLevel=1,postFFT=1,postSigma=value between 0 and 2
degrainTR=1,grainLevel=2,postFFT=0
degrainTR=1,grainLevel=2,postFFT=1,postSigma=value between 0 and 2
degrainTR=2,grainLevel=2,postFFT=1,postSigma=value between 0 and 2
degrainTR=2,grainLevel=3,postFFT=1,postSigma=value between 0 and 2
Any degrainTR above 0 not work for very fast-paced films with many particles flying around (explosions, rain). In this case only this setting will work:
degrainTR=0,postFFT=1,postSigma=value between 0 and 4
This is what I plan to do but I want to try the settings you suggest first.
As I will probably use avisynth on one computer & avisynth+ on another computer.
Both these computers are 32-bit OS's. -
There's really no point using Avisynth. Some newer functions will only work with Avisynth Plus, but it's quite backwards compatible. If a plugin or function works with Avisynth it's bound to work with Avisynth+. And the original Avisynth isn't multi-threaded, which could be why you're having trouble with TemporalDegrain2.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
Now I think about it, TemporalDegrain2 won't work with Avisynth. It'll result in an "unexpected character" error, probably complaining about finding a square bracket in the script. The wiki is out of date.
http://forum.doom9.net/showthread.php?t=175798
Dec 21, 2021: v2.4.0 (This and later releases need AviSynth 3.7.1+)Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I get "unrecognized exception" but it means close to the same to me as "unexpected character".
I believe you are correct about TemporalDegrain2 not working with avisynth.
All codes I tested resulted with an error.
The second example now works with "audio" instead of "video".
I copied & pasted this & got the wrong one.
It will take me a bit to install avisynth+. -
Avisynth plus can be installed over the old version. It will detect it and offer to back it up.
Then if you uninstall the plus version later, it will put it back as it was.
Works well -
Earlier versions of Avisynth Plus that don't support square brackets in scripts will produce an "unexpected character" error message or something to that effect. At least that's my experience. The original Avisynth might produce a different error message for the same problem. I don't actually know though, so it could be due something else. If the plugins you're using are the latest versions, maybe one of them doesn't play nice with the original Avisynth anymore.
Installing Avisynth+ should be easy as there's two installers. One includes the runtime files Avisynth requires while the other does not. The exe with vcredist in the file name is the one with the runtime files included.
https://github.com/AviSynth/AviSynthPlus/releasesAvisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I forgot to mention that ffms2 can open both audio and video, but the audio is disabled by default. A value of -1 means the first audio stream in the file is decoded.
ffms2("source" atrack=-1)
or
FFmpegSource2("source", atrack=-1)
Attached are a couple of functions you can also use. FFMS3 is called FFMS3 so it'll co-exist with FFMS2.
LibavSource2 does the same thing for lsmash (combining LWLibavVideoSource & LWLibavAudioSource).
Both functions have the audio enabled by default, and they both have a vtrack argument, allowing you to disable the video and decode only the audio.
vtrack=-2 disables the video and atrack=-2 disables the audio. Obviously you should only disable one of them at a time.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
That part works & I knew about it from installing Avisynth plus before.
I never got Avisynth plus to work then,
What I meant by "It will take me a bit to install avisynth+" is what I've been doing today adding plugins until it works.
Seems to be working now.
@ hello_hello,
I had the version that did not include the runtime files but it was working so maybe I had the runtime files installed.
I went ahead & uninstalled that version & installed the version with the runtime files.
I wish I had known before I installed the version without.
I DLed & placed the two .avsi files in the plugins folder.
avisynth + seems to be working now.
The avs script I tested with is fairly simple but it does work without errors usingVDub2.
What code did you use in this post #15 for the TemporalDeGrain2 ?
Or the complete avs script used.
Horse TemporalDeGrain2 (Avisynth).mkv (26.41 MB, 8 views)
https://forum.videohelp.com/threads/415579-Converting-old-MPEG2-videos-to-HEVC-how-muc...ve#post2747075Last edited by cholla; 19th Aug 2024 at 15:57.
-
If I set "TemporalDegrain2(degrainTR=x) to any setting except ) 0 I get this error:
[Attachment 81677 - Click to enlarge]
I added the "neo-fft3d.dll" that is related to it.
Before that I was getting an error that avisynth needed it.
"fftwf_malloc" is a part of "neo-fft3d.dll" as far as I can tell & not available seperately. -
FFTW 3.3.5 is a Fourier transform library required by neo-fft3d, fft3d and possibly a couple of other plugins. It's shown as a dependency on the wiki.
http://avisynth.nl/index.php/Neo_FFT3D
http://www.fftw.org/download.html
It was once the case that some plugins required the dll to be named libfftw3f-3.dll and some required it to be named fftw3.dll. I don't know if that's still the case but it can't hurt to put it in the Windows/System32 folder with both names so you're covered. To make it easy there's a zip file attached with the two 32 bit dlls included.
I deleted the script I used for the Horse sample but I'm fairly sure it was this.
The source file is an MKV rather than the original m2ts as I remuxed it with MKVToolNixGUI to make it easier to extract the audio and convert to AAC.
Code:FFVideoSource("D:\Horse.mkv", cachefile="D:\Horse.ffindex") CropResize(1920,1080, 60,0,-60,-0, Resizer="Resize8") TemporalDeGrain2(degrainTR=2, grainLevel=2) Prefetch(8)
If I was encoding the whole video though, I'd probably do this so it's denoised after the black is cropped (because there's no point denoising that), and before it's resized (as the resizing will upscale).
Code:FFVideoSource("D:\Horse.mkv", cachefile="D:\Horse.ffindex") Crop(60,0,-60,-0) TemporalDeGrain2(degrainTR=2, grainLevel=2) CropResize(1920,1080, Resizer="Resize8") # you can remove Resizer="Resize8" and it'll resize with Spline36Resize GradFun3() # from the DitherTools plugin Prefetch(8)
Code:FFVideoSource("D:\Horse.mkv", cachefile="D:\Horse.ffindex") Crop(60,0,-60,-0) TemporalDeGrain2(degrainTR=2, grainLevel=2) Spline36Resize(1920,1080) GradFun3() Prefetch(8)
Crop(60,0,-60,-0)
CropResize(1920,1080) or CropResize(1920,1080, InDAR=5.0/3.0)
Would result in maximum cropping and therefore no stretching when it's resized to 1920x1080 (the aspect ratio after cropping the black is 5:3 or 1.66667 and it'll be cropped to 16:9 before it's resized).
Crop(60,0,-60,-0)
CropResize(1920,1080, InDAR=16.0/9.0)
Would cause CropResize to assume the 1800x1080 video remaining after cropping is supposed to display as 16:9, so it'll stretch it to 1920x1080 without applying any additional cropping.
Any InDAR between 1.66667 and 1.77778 will give you some sort of compromise between how much the video is cropped and therefore how much it's stretched. You can use one of the cropping previews to preview the cropping (the video isn't resized while the cropping preview is enabled).
No Stretching.
Crop(60,0,-60,-0)
CropResize(1920,1080, CPreview=2)
[Attachment 81716 - Click to enlarge]
Medium stretching.
Crop(60,0,-60,-0)
CropResize(1920,1080, InDAR=1.72222, CPreview=2)
[Attachment 81717 - Click to enlarge]
Maximum stretching.
Crop(60,0,-60,-0)
CropResize(1920,1080, InDAR=16.0/9.0, CPreview=2)
[Attachment 81718 - Click to enlarge]
All of the above of course uses standard resizing rather than warped resizing.
The CropResize version my signature links to will display slightly different text for the preview. I fiddled with it a bit for the version I used above but it's is not quite ready to upload yet.Last edited by hello_hello; 22nd Aug 2024 at 11:32.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
@ hello_hello,
I used the .mts file. first.
Then I created a .mkv file as you did.
At least maybe the same way.
I demuxed the .mts file with MKVToolNixGUI to .mkv & .m4a files.
Then with ffmpeg converted the .m4a file from DTS to acc.
Then muxed the back together with MKVToolNixGUI.
At first I'm trying to keep the script even simpler.
I do not have a "cachefile="D:\Horse.ffindex")"
or a Horse.ffindex file. How do I create one ?
I could not use that in the script.
This is the simpler script I used:
Code:FFVideosource("Horse.mkv") TemporalDegrain2(degrainTR=2, grainLevel=2) Prefetch(2)
I did the same using the .mts file instead.
Both the same results:
Avisynth open failure:
neo fft3d: Library function is missing: fftwf malloc -
Make sure you have FFTW 3.3.5 installed properly.
The 64 version of fftw3.dll should be copied into \Windows\System32\
and the 32 bit version of fftw3.dll should be copied into \Windows\Syswow64\ -
@ davexnet,
I already followed those instructions after I found out about the "bassakards" way to do it.
There is no \Windows\Syswow64\ on Windows 7 32-bit.
hello_hello posted the fftw3.dll & Alwyn also link me to some.
They turned out to be the same files. -
Good point. I forgot you were running a 32 bit OS.
Have you tried running the AVSInfoTool? It may help to identify any errors in your Avisynth installation. -
Yes I have the AVSInfoTool.
On my Lenovo the one I have a fresh install of avisynth & avisynth plus it shows no errors & lists the plugins.
On my Dell it doesn't work & shows "No information".
Both are installed & show in Programs & Features.
Also show in CCleaner, & two other uninstallers I have.
Here is an odd fact Windows 7 32-bit does have a registry key named :"WOW6432Node" -
There is no need to mess with Windows system folders.
As we said several times, load that specific DLLs with the LoadDLL plugin:
Code:# FFTW loadPlugin(<path>\LoadDll.dll") loadDll(<path>\libfftw3f-3.dll")
-
BTW, in general is always better to individually load all the required filters rather than randomnly put them in the plugins folder. But 99% of the people do the second.
As for putting in the paths to every dependency I need for a particular video (if I can remember them), no thanks. I'm quite happy to chuck all the plugins in the plugins folder and actually get on with doing what I want, which is to open a video and work on it, not waste time copying and pasting paths to plugin files. -
Because you have full control of what is loaded, including the dependancies of the filters. They are all update indipendently each other, and sometimes incompatibilities appear. Probably your usage of AviSynth is minimalist, so not relevant here.
Do whatever you want, nobody cares. You were not even able to run a simple QTGMC or Inverse Telecine for years, so definitevley not a reference. BTW, you can avoid pasting paths by defining a global variable, but that's probably out of your knowledge. -
Originally Posted by Lollo
-
Sure!
LoadDll.zip
BTW I see that Selur already gave you some indication: https://forum.videohelp.com/threads/415671-Easier-AVISynth#post2747721 -
Thank you.
I see that Selur already gave you some indication: -
To save me 1/2 an hour of experimentation, is loaddll bitness agnostic? It works for both 32 and 64 bit?
-
It is certainly beyond my knowledge.
So is using the LoadDLL plugin.
Even with the script:
Code:# FFTW loadPlugin(<path>\LoadDll.dll") loadDll(<path>\libfftw3f-3.dll")
Avisynth open failure:
neo fft3d: Library function is missing: fftwf malloc
Why does
Code:TemporalDegrain2(degrainTR=0)
butCode:TemporalDegrain2(degrainTR=1)
Creates the error.
Searching yeilds very little information on " fftwf malloc". -
Why does
Code:
TemporalDegrain2(degrainTR=0)
load in VDub2
but
Code:
TemporalDegrain2(degrainTR=1)
Or any number above 0. I believe the settings for TemporalDegrain2(degrainTR= are -1through 6 .
Creates the error.
If you look to TD2 code, you will see that neo_fft3d is called only when degrainTR>0:
Code:dgLimit = (degrainTR>0 && firstStepD && limitFFT==1) ? dgO.neo_fft3d(y=LumaD?3:2, u=ChromaD?3:2, v=ChromaD?3:2, sigma=limitSigma, sigma2=dgS2, sigma3=dgS3, sigma4=dgS4, bt=3, bw=limitBlksz, bh=limitBlksz, ow=dgOv, oh=dgOv, ncpu=fftThreads ) : \ ...
This is my set-up, AviSynth 2.60 32-bit, just as example (YMMV):
Code:# plugins directory plugins_dir="C:\Users\giuse\Documents\VideoSoft\MPEG\AviSynth\extFilters\" # TemporalDegrain2 Import(plugins_dir + "TemporalDegrain-v2.2.1.avsi") # RgTools loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll") # MaskTools2 loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll") # MVTools loadPlugin(plugins_dir + "mvtools-2.7.41-with-depans20200430\x86\mvtools2.dll") # FFT3DFilter loadPlugin(plugins_dir + "FFT3dFilter-v2.6\x86\fft3dfilter.dll") # FFTW loadPlugin(plugins_dir + "LoadDll\LoadDll.dll") loadDll(plugins_dir + "fftw-3.3.5-dll32\libfftw3f-3.dll")
edit: If you are not able to solve, just let me know. I can send you a basic set-up to start with, and then you can upgrade as wished
edit2: example attached. Install AviSynt 2.60, unzip the cholla.zip dir and load the file example.avs in VirtualDub, after replacing my source file with yours. It should work. From there, you can upgrade the plugins, the filters and AviSynth.
cholla.zipLast edited by lollo; 23rd Aug 2024 at 13:31.
-
To save me 1/2 an hour of experimentation, is loaddll bitness agnostic? It works for both 32 and 64 bit?
[Attachment 81765 - Click to enlarge]
I didn't try the linking, because I assume it will still be loading Loaddll and the same error would therefore occur.
Can someone (@Lollo, @Selur?) please verify then that Loaddll does not work in 64bit.
Similar Threads
-
the strange virtualdub2 errors in 32 and/or 64 bit versions.
By roeselpi in forum EditingReplies: 6Last Post: 11th May 2023, 06:18 -
Using Avisynth+ with Virtualdub2
By stymie in forum Video ConversionReplies: 7Last Post: 5th Feb 2021, 18:17 -
How to install the nnedi3 plugin into Virtualdub2 and Avisynth?
By Guernsey in forum Newbie / General discussionsReplies: 7Last Post: 25th Apr 2020, 04:27 -
Add exteneral encoder errors on VirtualDub2
By hintlou in forum Newbie / General discussionsReplies: 2Last Post: 29th Feb 2020, 05:41 -
Avisynth+ not refreshing in VirtualDub2
By Chief Mouse in forum Video ConversionReplies: 2Last Post: 6th Sep 2019, 16:18