Log in

View Full Version : another restore function


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [17] 18

Groucho2004
28th February 2019, 20:46
If even AVS gurus like youI'm anything but an AVS guru. That's StainlessS' forte.

videoh
28th February 2019, 20:48
It would be a choice to run exclusively DOS apps on Windows 3.1, but nobody is going to take you seriously. :p

StainlessS
28th February 2019, 21:07
I'm anything but an AVS guru. That's StainlessS' forte.

You're talking rubbish again Grouchy :)

Groucho2004
28th February 2019, 21:17
You're talking rubbish again Grouchy :)That's so sweet. :o

StainlessS
28th February 2019, 21:47
Mani,

You could try Groucho2004 AOI installer, setup, ie copy you current plugs into the VideoPrograms/Avisynthsetup/... (or whatever it is)
and it should work just fine after running the batch setup file.
As time and your bravery permits, you could try setup for avs+ x86 (also x64) and if you experience any probs, then just switch
setup back to whatever one you wish, not really any kind of problem.
Plugin dll's usually will provide fewer problems since they tend (on average) not to call other plugin dll's, the biggest problem is
most likely script functions, where they have many plugin requirements and have no idea which version of a plugin that you have installed.
Just make backup after successful update, and life can be so very sweet for you. I'm sure that if you try, you could well become a convert,
even if some of your machines are P3 XP32.

Groucho2004, dont know if is currently supported (I recently have only been updating dll's in you AIO installer thing, and leaving batch alone),
but perhaps could auto switch (via some additional setup dir) to copy non avs dll's to the system32 or SysWoW64 whatsit, so that could be done
automaticlly too.

(2nd time I've wrritten something akin to above, 1st time browser started going nuts and swallowed everything I'de written)

manolito
28th February 2019, 22:00
You guys missed the fact (which I stated frequently) that this old P3 is not my only computer. For AVS+ of course I use one of my ThinkPads T530 with an Intel Core i5 third generation. Probably not a "fairly modern CPU" in your book, but things which do require newer and faster CPUs than this one will simply get ignored by me.

A side note to DG: On your website you explicitly make it clear that NVidia Graphics in Notebooks are not supported by you. My ThinkPad has the NVidia Optimus feature which is also explicitly excluded from your support, so please forgive me if I am not really eager to check out your source filters.

One of the consequences using different computers in parallel is that I do not want to maintain very different AVS plugin folders. All plugins I use need to work on all of my machines. And the old P3 is the lowest common denominator. After many tests I concluded that the speed gains when using the latest plugin versions on my ThinkPad are minimal, not worth the effort.

So if anyone does not take me seriously because I still want to use my old computer (the mainboard is from 2001) I couldn't care less. I do have my reasons, I do not like to waste resources, and to me it does not feel like a sacrifice. My motorcycle is from 1991, I do a long trip every year, it is absolutely reliable, the modern bikes do nothing for me. So please, you do not have to agree with me, but keep your derogatory comments like this one:
Doesn't manolito run a P3 with Windows XP? And we're supposed to take him seriously?
to yourself.


Cheers
manolito

ChaosKing
28th February 2019, 22:00
If anyone wants to test it. I added srestore to avsrepo https://github.com/theChaosCoder/vsrepo/releases
usage:
avsrepo.exe -p install srestore
This will download all plugins in a avisynth32/avisynth64 folder, use -t win32 or -t win64 for your plattform.

(since smdegrain is a dependency of srestore now, it will install also all its dependencies)

StainlessS
28th February 2019, 22:22
Thanx CK, gonna give it a whirl.

Mani, I too used to use an AMD IronSides chipset 500MHz P3 m/c and hated junkin' it, me loved that little doofa,
was way better than equiv Intel whotsit of the time. (Actually, I still have an Atari ST with a 1/2 GB hard drive
[at one time 16 partitions, had to reduce that, was too confusing] and an Amiga 1200 with 10MB RAM [assign 2MB for RamDisk just cos I dont know what else to do with it].
I am now however past the P3 thing, having just dumped two P4 machines, as somebody on-site says in sig,
"Nostalgia aint what it used to be".

EDIT: 1st hard drive for the Atari cost me £400 pound for a 20MB drive, Arh, the good old days.

Groucho2004
28th February 2019, 23:01
Groucho2004, dont know if is currently supported (I recently have only been updating dll's in you AIO installer thing, and leaving batch alone),
but perhaps could auto switch (via some additional setup dir) to copy non avs dll's to the system32 or SysWoW64 whatsit, so that could be done
automaticlly too.What non-AVS dll's?

StainlessS
28th February 2019, 23:22
Mobile (In pub), fft3d.dll or whatever to system32, + the directshowsource dll (cant remember name)
I mean the image/jpeg thing.

Gonna catch my bus, sorry.

ChaosKing
28th February 2019, 23:34
libfftw3-3.dll is not part of the installer and as far as I can see it libfftw*.dll can stay in plugins (avs+ only). I don't have it system32, only in my plugins folder and everything works.

Groucho2004
1st March 2019, 00:41
I don't have it system32, only in my plugins folder and everything works.That only works if your PATH environment variable points to that plugin directory.

real.finder
1st March 2019, 06:49
That only works if your PATH environment variable points to that plugin directory.

Note: Starting from version 2012.04.03 plugin's folder is searched first for its dll dependences. You can now move some things from system32 folder to plugins folder, but check that there are no unexpected old dll versions in plugins folder in case you see strange errors.

from

https://forum.doom9.org/showthread.php?t=148782

avs+ take this from SEt avs mt

StainlessS
1st March 2019, 10:11
I personally dont like non Avs dll's in plugins, would rather install in sytem32 or the other SysWOW64 dir.

Ones I copy to above dirs


AvsRecursion.dll
fftw3.dll
libfftw3f-3.dll
libsndfile-1.dll


Think AvsInstaller already copies DevIL.dll (the one I could not remember name of in pub).

Groucho2004
1st March 2019, 10:46
Note: Starting from version 2012.04.03 plugin's folder is searched first for its dll dependences. You can now move some things from system32 folder to plugins folder, but check that there are no unexpected old dll versions in plugins folder in case you see strange errors.
Just tried this with AVSMT and AVS+ - Does not work (on XP, have to try W7).

Groucho2004
1st March 2019, 10:48
I personally dont like non Avs dll's in plugins, would rather install in sytem32 or the other SysWOW64 dir.Ditto.

Think AvsInstaller already copies DevIL.dll (the one I could not remember name of in pub).Yes, it does. DevIL.dll is a dependency of avisynth.dll.

a1s2d3f4
1st March 2019, 16:06
Ok, so I followed directions from post #785 and copied the defined functions to the bottom of srestore.avsi

Continued with my loading attempts.

(I also included a couple of AVSIs I had written myself in the past which all my scripts use.)
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Script error: There is no function named 'GScript'.
(D:/programs-non-setup/AvisynthRepository/plugins/AnatolyAVISynthFunctions.avsi, line 67)
...

So, I copied gscript.dll (date modified says 12/6/2009).

---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Script error: There is no function named 'MSuper'.
...

That's from mvtools2.dll - latest version I could find was from 4/26/2016.
----

And so at this point, indeed, it finally loads and, hooray, I have utf8 support for subtitles.

Also, I do see that the processing speed is not as sluggish as before on my W540 Lenovo (especially with svpflow frame interpolation stuff).

Thanks to everyone for their help.

I guess the only other thing that I could work on is to implement AVSPLUS_x64 to see if my hardware can deliver even faster processing speeds.
I understand that all the .dlls have to be "64 bit" versions for this to work.
So, I am going to try to gather the x64 dll versions of all the plugins I use and stick them in a plugins64 folder (which I would specify in setavs.bat as set PLUGDIR64=D:\programs-non-setup\AvisynthRepository\plugins64).
It also appears that I would need to rewrite my "personal functions" (in AVSI files) using AVSPLUS native if/then format, without using Gscript.dll (from 2009).
Am I correct in thinking this and if so, is there a way to have a single .avsi file that can work for both versions (x86 and x64)?
(If this question shouldn't be in the thread, I'll be happy to ask it in a General Discussion thread)

#EDIT
I also understood from some posts that "avsi files" shouldn't be considered as "plugins". Should I have a separate folder for those, or is it ok for them to continue living inside the plugins folder like they'd always done?

poisondeathray
1st March 2019, 16:35
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
Script error: There is no function named 'MSuper'.
...

That's from mvtools2.dll - latest version I could find was from 4/26/2016.
----


mvtools2 pinterf branch
https://github.com/pinterf/mvtools/releases





I guess the only other thing that I could work on is to implement AVSPLUS_x64 to see if my hardware can deliver even faster processing speeds.
I understand that all the .dlls have to be "64 bit" versions for this to work.
So, I am going to try to gather the x64 dll versions of all the plugins I use and stick them in a plugins64 folder (which I would specify in setavs.bat as set PLUGDIR64=D:\programs-non-setup\AvisynthRepository\plugins64).
It also appears that I would need to rewrite my "personal functions" (in AVSI files) using AVSPLUS native if/then format, without using Gscript.dll (from 2009).
Am I correct in thinking this and if so, is there a way to have a single .avsi file that can work for both versions (x86 and x64)?
(If this question shouldn't be in the thread, I'll be happy to ask it in a General Discussion thread)

x64 is definitely faster ; and the difference becomes larger, the more complex the scripts as you hit memory limits

You can use multithreading to speed things up (avs+ mt is faster than the old avs classic mt)

What is different about your "personal" avsi's ? You should be able to use the same for each x86/x64, unless they have specific references to versions (such as specific .dll's) - but that's bad practice for a general .avsi . I would argue you should do a better job of organizing the .avsi's then

Having all that clutter in plugins folder actually slow things down on initialization. Clean plugins folder makes things start faster. Only load things that you need, or keep frequently used things there. I'm surprised the old avisynth even worked with multiple mvtools2 /masktools versions in there, even from 2.5


#EDIT
I also understood from some posts that "avsi files" shouldn't be considered as "plugins". Should I have a separate folder for those, or is it ok for them to continue living inside the plugins folder like they'd always done?
You can keep them, but I wouldn't keep so much clutter . It can cause problems

a1s2d3f4
1st March 2019, 16:41
What is different about your "personal" avsi's ? You should be able to use the same for each x86/x64, unless they have specific references to versions (such as specific .dll's) - but that's bad practice for a general .avsi . I would argue you should do a better job of organizing the .avsi's then


My avsi's use GScript to allow me to have conditional statements in my functions. Gscript.dll is from 2009 and it is probably a 32-bit plugin.

So, my question was about that.
Right now I have:


function AddBorders_AIL( clip incoming_clip, float w_to_h_ratio ) {
.....
GScript("""
if(.....

...
""")


Do I need to create an alternative avsi that eliminates GScript( ) call:

function AddBorders_AIL( clip incoming_clip, float w_to_h_ratio ) {
.....
if(.....

...
)

or can I, somehow, keep my original code, and still use it as part of the x64 environment?

poisondeathray
1st March 2019, 16:48
There is a gscript x86 and a gscript x64 . You can use the same code, same script. It should be identical for everything in terms of scripts and .avsi's . The problem you might have is if there are specific references to plugin loading (e.g. LoadPlugin() , and it references an x86 version explicitly) - but that's just bad form

If you use x64 application eg. avspmod x64 , or vdub2 x64, or ffmpeg x64, x264 x64 etc... - it will initialize the avs x64 pathway . If you use x86 app, it will initialize the x86 pathway

There are still a few "missing" x64 avs plugins, but the majority of commonly used ones have x64 versions by now

a1s2d3f4
1st March 2019, 16:53
mvtools2 pinterf branch
https://github.com/pinterf/mvtools/releases


I used this link to "update" my mvtools2.dll and it ended up breaking my script.

---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
MFlowFps: inconsistent clips frame size!

Going back to the 04/26/2016 version of mvtools2.dll fixes the problem.

ChaosKing
1st March 2019, 16:54
Am I correct in thinking this and if so, is there a way to have a single .avsi file that can work for both versions (x86 and x64)?


I solved it like this
VersionString: AviSynth+ 0.1 (r2772, MT, i386)
PluginDir2_5 (HKLM, x86): D:\AvisynthRepository\AVSPLUS_x86\plugins
PluginDir+ (HKLM, x86): D:\AvisynthRepository\SCRIPTS

VersionString: AviSynth+ 0.1 (r2772, MT, x86_64)
PluginDir2_5 (HKLM, x64): D:\AvisynthRepository\AVSPLUS_x64\plugins
PluginDir+ (HKLM, x64): D:\AvisynthRepository\SCRIPTS

poisondeathray
1st March 2019, 16:55
I used this link to "update" my mvtools2.dll and it ended up breaking my script.

---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
MFlowFps: inconsistent clips frame size!

Going back to the 04/26/2016 version of mvtools2.dll fixes the problem.

Post your full script

a1s2d3f4
1st March 2019, 16:56
There is a gscript x86 and a gscript x64 .

Could you tell me where to download?

On the Gscript download page I only see this file: GScript_11.zip.

Inside, I only see one dll.

poisondeathray
1st March 2019, 16:58
My bad, I thought you mean grunt, not gscript :o

(You can run x86 plugins in x64 environment with mp_pipeline )

a1s2d3f4
1st March 2019, 17:00
Post your full script

Ok, here is my script.
The problem it complained about is the MFlowFps call at the bottom


#Load some necessary tools
SetMemoryMax( 1024 )
LoadPlugin("D:\programs-non-setup\AvisynthRepository\plugins\svpflow1.dll" )
LoadPlugin("D:\programs-non-setup\AvisynthRepository\plugins\svpflow2.dll" )
#
#AVISynth file script below:
video_file = "F:\PRODUCTS\PerformanceVideos\SoloPerformer(withOccasionalPartner)\_DVDs\MediciArts\Cziffra-Moiseiwitsch-Bolet\VIDEO_TS\VTS_01_1.d2v.bad.d2v"
audio_file = "F:\PRODUCTS\PerformanceVideos\SoloPerformer(withOccasionalPartner)\_DVDs\MediciArts\Cziffra-Moiseiwitsch-Bolet\VIDEO_TS\VTS_01_1 Ta0 48K 16bit 2ch.wav"
# Define start and stop variables
beg_clip_len_in_secs = 7
end_clip_len_in_secs = 10
#Load in the file
audio = WavSource( audio_file )
v1 = DGDecode_Mpeg2source( video_file )
my_fps = v1.framerate
#Calculate variables (these can be copied multiple times if there happen to be multiple artists in the same video)
#Name of Piece: Grand Galop Chromatique
start_time_of_track_in_sec = 2857.5
start_frame = Round( my_fps * start_time_of_track_in_sec )
end_time_of_track_in_sec = 3043
end_frame = Round( my_fps * end_time_of_track_in_sec )
total_frames = end_frame - start_frame
audio_delay_value = 1.32

#Mux Audio and Video then clean up further
v1 = AudioDub( v1, audio )
v1 = DelayAudio( v1, audio_delay_value)
v1 = Trim( v1, start_frame, end_frame )

#
v1 = Crop( v1, 0, 0, 0, 0 )

v1 = ConvertToYV12( v1 )

v1 = Yadif( v1, 1, 0 )

#NTSC->PAL
# The next line only applies if we have an originally PAL video upconverted to NTSC (where every 5th frame is doubled)
v2 = Trim( v1, 0, 9999999 ).srestore( )
#You also do have to convert to RGB for mixing with titles lower
v2 = ConvertToRGB( v2 )

#Create a gentle fade in out
v2 = AddFadeInOut( v2, 5, 5, 0, 0, 0 )

#Create title frames
v200 = v2
begin = BlankClip( v200, Round( beg_clip_len_in_secs * v200.framerate ) )
end = BlankClip( v200, Round( end_clip_len_in_secs * v200.framerate ) )
v2 = begin + v200 + end

w_to_h_ratio = Float( 16 ) / 9
v2 = AddBorders_AIL( v2, w_to_h_ratio )

titles = "
\n\n
György Cziffra\n
London, 1962\n
\n\n\n
'Grand Galop Chromatique'\n
Franz Liszt"
title_size = v1.width / 21
v2 = ConvertToRGB24( v2 )
global desired_pixel_type = "RGB24"
global desired_video_width = v2.width
global desired_video_height = v2.height
tit = DefineTitleClip( v2, titles, beg_clip_len_in_secs - 1, 1, 1, "Georgia", $bbbbbb, title_size )


v2 = uu_mt_blend( v2, tit, mode = "exclude")
ConvertToY8( v2 ).ConvertToYV12( )

#Frame interpolation block

num_frames = 12
super = SVSuper( "{pel: 2, gpu: 1}" )
vectors = SVAnalyse( super, "{overlap: 4}" )
forward_vec = SVConvert( vectors, false )
backward_vec = SVConvert( vectors, true )
super_mv = MSuper( pel = 2, hpad = 0, vpad = 0 ) #padding should be zero here!
v100 = MFlowFps( super_mv, backward_vec, forward_vec, num = num_frames * FramerateNumerator( last ), den = FramerateDenominator( last ) )


v200 = ConvertToY8( v100 ).AssumeFPS( 300 )
# return v200
v200 = ChangeFPS( v200, 60 )
return v200

StainlessS
1st March 2019, 17:02
AVS+ can run GScript While and For/Next and If() Else type stuff, but you need to remove the

GScript("""
...
""")

wrapping stuff.Its easier (on x86) to keep GScript in plugins, and so dont need to strip wrapper, but x64 need strip wrapper.[as no x64 version GScript]

EDIT:
The Wiki gives the impression that you dont need to have GSCript(""" ... """) for the gscript functionality, when it should say that you have to remove
the wrapper else it produces an error (unless you install the Gscript plugin on x86).

a1s2d3f4
1st March 2019, 17:06
AVS+ can run GScript While and For/Next and If() Else type stuff, but you need to remove the

GScript("""
...
""")

wrapping stuff.Its easier (on x86) to keep GScript in plugins, and so dont need to strip wrapper, bug x64 need strip wrapper.

That's what I understood, that AVS+ has a native way of dealing with if() else(). But my question was, given that most of my functions are coded to use the GScript(""" .... """) approach, should I create separate, very similar version of each function where all I do is I strip out GScript(""" .... """), or is there a way to NOT to have to do that and still be able to use my functions with x86 or x64 avisynth?

StainlessS
1st March 2019, 17:15
If you have a function that is called rarely (a couple of times per frame serve, ie not like every frame),
then I use something like below


myName="a1s2d3f4_Stuff: "
IsAvsPlus=(FindStr(UCase(versionString),"AVISYNTH+")!=0) HasGScript=RT_FunctionExist("GScript")
HasGRunt =RT_FunctionExist("GScriptClip") HasMvTools=RT_FunctionExist("MSuper")
HasMaskTools=RT_FunctionExist("MT_Lutxy") HasRemoveGrain=RT_FunctionExist("RemoveGrain")
HasCallCmd = RT_FunctionExist("CallCmd") IsAvs26=VersionNumber>=2.6

Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName))

...

GS = """
# Some if/else type Gscript Stuff
"""

HasGScript ? GScript(GS) : Eval(GS) # Use GSCript if installed (loaded plugs override builtin)

...


EDIT: Above will work on Avs Standard 32 bit with Gscript, or avs+ x86 with/without GScript, and x64 without the non existing x64 Gscript.

a1s2d3f4
1st March 2019, 17:24
If you have a function that is called rarely (a couple of times per frame serve, ie not like every frame,
then I use something like below


IsAvsPlus=(FindStr(UCase(versionString),"AVISYNTH+")!=0) HasGScript=RT_FunctionExist("GScript")
HasGRunt =RT_FunctionExist("GScriptClip") HasMvTools=RT_FunctionExist("MSuper")
HasMaskTools=RT_FunctionExist("MT_Lutxy") HasRemoveGrain=RT_FunctionExist("RemoveGrain")
HasCallCmd = RT_FunctionExist("CallCmd") IsAvs26=VersionNumber>=2.6

...

GS = """
# Some if/else type Gscript Stuff
"""

HasGScript ? GScript(GS) : Eval(GS) # Use GSCript if installed (loaded plugs override builtin)

...



This looks interesting. Is this the kind of thing where if GScript(GS) needs to get called then my script automatically gets loaded as the slower x86 process, and if not, then "I am lucky"?

poisondeathray
1st March 2019, 17:26
Ok, here is my script.
The problem it complained about is the MFlowFps call at the bottom


Testing the frame interpolation section of that script - there is some bugginess to the svpflow vectors . Not sure why. It works some of the time , but I can reproduce the error message some of the time too. If you drag the slider (in vdub2, or avspmod), or open/close it , it works here

Or replacing with mvtools2 vectors work too without the bugginess

StainlessS
1st March 2019, 17:32
I forgot to add this after first block and before 1st '...'

Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName))

It just selects Gscript if installed and builtin avs+ Gscript if not, the only reason not to use where frequent calls is that it creates a GS string on every call,
so could swallow vast amounts of memory if the GS string is a large code block & called every frame.

EDIT: (repeating edit from prev post) Above will work on Avs Standard 32 bit with Gscript, or avs+ x86 with/without GScript, and x64 without the non existing x64 Gscript.

a1s2d3f4
1st March 2019, 17:58
I forgot to add this after first block and before 1st '...'

Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName))

It just selects Gscript if installed and builtin avs+ Gscript if not, the only reason not to use where frequent calls is that it creates a GS string on every call,
so could swallow vast amounts of memory if the GS string is a large code block.

EDIT: (repeating edit from prev post) Above will work on Avs Standard 32 bit with Gscript, or avs+ x86 with/without GScript, and x64 without the non existing x64 Gscript.

Ok, thanks, I'll try to recode my avsi file this way.
If I understand correctly, your code blocks will have to be repeated inside each of my functions that use GS statements
[CODE]
function whatever ( ) {
<your block goes here>
....
return something
}

as opposed to having your code block appear only once at the top of AVSI file and then having a local definition of GS= inside each of my many functions.

StainlessS
1st March 2019, 18:04
I would include in each function,
the other stuff for eg MvTools and RemoveGrain was just to give a few other examples, and not needed,
you only need the IsAvsPlus and HasGScript bits.
If you will always use Avs+ (and never again standard v2.6), then you can skip the IsAvsPlus related parts, eg can remove the Assert (if always IsAvsPlus).

EDIT:
You could in an avsi, use something like below, but I am yet to do anything like that. [EDIT: Ie only single instance of the Global String]

Global HasGScript_A_Unique_Name_Untouched_by_human_hand = RT_FunctionExist("GScript") # Unique to this avsi file, can use in multiple places/functions

Global GS_Some_Very_Unique_Name_that_is_Unlikely_To_be_used_by_anything_else="""
# some Gscipt Code
"""
Function MyFunc(clip c) {

HasGScript_A_Unique_Name_Untouched_by_human_hand
\ ? GScript(GS_Some_Very_Unique_Name_that_is_Unlikely_To_be_used_by_anything_else)
\ : Eval(GS_Some_Very_Unique_Name_that_is_Unlikely_To_be_used_by_anything_else)
return whatever
}


EDIT: Could also replace RT_FunctionExist("GScript") with FunctionExists("GScript") # Note the additional 's'. (if always Avs+)

a1s2d3f4
1st March 2019, 18:13
I would include in each function,
the other stuff for eg MvTools and RemoveGrain was just to give a few other examples, and not needed,
you only need the IsAvsPlus and HasGScript bits.
If you will always use Avs+ (and never again standard v2.6), then you can skip the IsAvsPlus related parts, eg can remove the Assert (if always IsAvsPlus).



I'd like to "always" use AVS+. I am just worried that if in the future I run into some plugin that is not "supported" by AVS+ or something like that, I would need to go back to the standard AVS, in which case I would want my Gscript("""....""") stuff to work too.

StainlessS
1st March 2019, 18:26
Then you need the IsAvsPlus, Assert, and must use RT_FunctionExist() too.

EDIT: If Avs+ was bright enought to skip over the GScript(""" ... """) parts, most/all of this would be un-needed, however it would probably complicate the parser for Avs+
and is probably unlikely to ever happen.

a1s2d3f4
2nd March 2019, 20:38
Then you need the IsAvsPlus, Assert, and must use RT_FunctionExist() too.

EDIT: If Avs+ was bright enought to skip over the GScript(""" ... """) parts, most/all of this would be un-needed, however it would probably complicate the parser for Avs+
and is probably unlikely to ever happen.

Kinda like C Preprocessor works.
#ifdef regular AviSynth
GScript("""
#endif

....

#ifdef regular AviSynth
""")
#endif

Of course, given that # is used for comments in AVS, it would be a different special character

StainlessS
2nd March 2019, 22:35
Kinda like C Preprocessor works.


Yep, that would work (in AVS+ but not Avs standard), I was more thinking of the wrapping simply being optional in Avs+ [if exists then just ignore it].

a1s2d3f4
3rd March 2019, 23:01
Or replacing with mvtools2 vectors work too without the bugginess

Could you explain what you mean in more detail?

I know that if I do that entire block of code, I get frame interpolation.
For a long time I was using mvtools2 functions, as described on this page: https://avisynth.org.ru/mvtools/mvtools2.html

Then last year I tried svpflow and found it to do an even better job, so now I'd like to use its functionality.

poisondeathray
4th March 2019, 00:40
Could you explain what you mean in more detail?

I know that if I do that entire block of code, I get frame interpolation.
For a long time I was using mvtools2 functions, as described on this page: https://avisynth.org.ru/mvtools/mvtools2.html

Then last year I tried svpflow and found it to do an even better job, so now I'd like to use its functionality.


I mean use mvtools2 vectors instead of svconvert . You can also use SVSmoothFps instead of MFlowFPS; that combo doesn't seem to be as buggy

svpflow (in general) produces slightly worse results in my experience, and GPU worse than CPU (hundreds of tests, different types of content). Of course you can tweak the settings, just like you can tweak many settings with mvtools2. But others have posted similar findings

Natty
14th March 2019, 11:31
can someone help me in removing ghosting/blending in this clip ? i dont understand exactly what type of artifact is this. i tried plain qtgmc + srestore and

QTGMC(Preset = "Slower", InputType=0, NoiseProcess=0)
srestore(mode=4, thresh=44)

but cant fix it completely or reduce it to minimum. heres the sample source and encoded clip

https://www34.zippyshare.com/v/wpy3Lzha/file.html

SaurusX
14th March 2019, 20:11
I didn't look, but I can immediately recommend not using QTGMC as your detection clip for sretore. The best results come from simpler bobs. However, you can still using the frames generated by QTGMC by running both at the same time like so:

FFmpegSource2("....")
d=TDeint(mode=1, type=2, full=false, tryWeave=true)
QTGMC(Preset = "Slower", InputType=0, NoiseProcess=0)
srestore(frate=23.976, speed=-1, thresh=1, dclip=d, mode=4)

Yes, these are aggressive srestore parameters, so I'd suggest bumping up the thresh value until the filter stops working well. You might want to try mode=-4 also, since sometimes srestore will work better by analyzing the chroma instead of the luma. It's kind of an art using srestore since no one method seems to work best all the time.

Boulder
14th March 2019, 20:26
I've also had better results sometimes by downscaling the analysis clip with ReduceBy2() after bobbing it.

Boulder
15th March 2019, 11:27
Here's one strange case I've been trying to fix.

https://drive.google.com/open?id=1oIAK_ixeGrQ1Oqn5PiPD71KtYKHKyZsp (original clip)
https://drive.google.com/open?id=1O1uKGsvamTMP33vkNodNAplNFP5oUVnw (bobbed clip)

I tried figuring out a pattern with a that bobbed clip and it looks like 4 good frames, 2 blended ones. Then if you look closer, it looks more like 3 good frames and 3 blended ones where the middle one is a real blended mess and the surrounding frames much less so :( Is it something that cannot be handled by SRestore as the origins seem to be an interlaced clip?

simple_simon
4th August 2019, 21:49
I'm using the latest version of the script (2.796) with the latest avisynth+ x64 and all the latest necessary plugins (masktools, etc) and I'm getting an error complaining "I don't know what 'avsplusversionnumber' means". I tried usiing 2.795 but with that one it complains about not knowing what 'dm' means. I looked at the script and both things are specified so it should 'know' what it means. What am i doing wrong? I can't find any mention of this in the previous entries of this thread.

real.finder
4th August 2019, 21:56
I'm using the latest version of the script (2.796) with the latest avisynth+ x64 and all the latest necessary plugins (masktools, etc) and I'm getting an error complaining "I don't know what 'avsplusversionnumber' means". I tried usiing 2.795 but with that one it complains about not knowing what 'dm' means. I looked at the script and both things are specified so it should 'know' what it means. What am i doing wrong? I can't find any mention of this in the previous entries of this thread.

you need SMDegrain.avsi (v3.1.2.101s or up) (https://forum.doom9.org/showthread.php?p=1790702#post1790702)

hello_hello
4th August 2019, 23:03
I'm using the latest version of the script (2.796) with the latest avisynth+ x64 and all the latest necessary plugins (masktools, etc) and I'm getting an error complaining "I don't know what 'avsplusversionnumber' means". I tried usiing 2.795 but with that one it complains about not knowing what 'dm' means. I looked at the script and both things are specified so it should 'know' what it means. What am i doing wrong? I can't find any mention of this in the previous entries of this thread.

The functions for checking the Avisynth version don't come with SRestore. They come with SMDegrain. Given it's only a few lines, I'd also include the functions with the SRestore script myself, so people won't have this problem, but that's just me and it's not up to me.

Here's what you're missing if you don't want to download the latest SMDegrain, you could add it to the end of the SRestore script if you have it in the auto-loading Avisynth plugins folder, or you could create a separate avsi file etc.

function IsAvsNeo(){ FindStr(VersionString, "AviSynth Neo") != 0 }
function IsAvsPlus(){ FindStr(VersionString, "AviSynth+") != 0 || IsAvsNeo }
function AvsPlusVersionNumber(){ \
IsAvsNeo ? eval(MidStr(VersionString(),20,4)) : \
IsAvsPlus ? val(MidStr(VersionString(),17,4)) : 0 }

simple_simon
5th August 2019, 19:29
Thanks for letting me know. I thought I had latest one (smdegrain_v3.1.2.100s) but guess not. Downloading SMDegrain v3.1.2.104s solved the 'avsplusversionnumber' error but now it's throwing up "I don't know what 'dm' means" error. Anyone know what that one's about?

real.finder
5th August 2019, 20:03
Thanks for letting me know. I thought I had latest one (smdegrain_v3.1.2.100s) but guess not. Downloading SMDegrain v3.1.2.104s solved the 'avsplusversionnumber' error but now it's throwing up "I don't know what 'dm' means" error. Anyone know what that one's about?

what is your full srestore line?

simple_simon
5th August 2019, 22:29
srestore(frate=24.975, thresh=14, cache=8)