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 24th February 2022, 17:09   #941  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Updated ExTools to v7.6. Now all scripts are promoted to AVS+ v3.7.2 due to expected propCopy() refactor, at which time I will rebase all my scripts.
Here is the new filter ex_corner(), based on Harris corner detection but with some own modifications.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 24th February 2022, 17:31   #942  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,330
That propCopy issue is a nasty one, it's not because of properties because this pure script similarly exhibits the 'leak'.
Code:
ColorBars(pixel_type="YV12",staticframes=false)
org=last
Bob()
Merge(last, org)
Art of skeletonizing of QTGMC

The issue is inherited from times shortly after Neanderthals discovered Avisynth+ (I was able to go back to r1825 from 1996). After two days I think it is internal cache related, an otherwise smart cache size auto-optimization was fooled by the scenario of combining an original and a double rate clip. Resolving the problem is in progress, I've got already a non-memory-exhausting version on my test bench but I have a feeling that this workaround in this form would be suboptimal for other cases.

See the issue here
pinterf is offline   Reply With Quote
Old 24th February 2022, 18:14   #943  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Only exhibits the issue for double-rate merging? I trimmed the output of Bob() to match length and still showed memory leak.

Maybe this might be related (don't know) to the optimization that was present in Merge() (talking out of my a**). Thanks for looking into it.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 24th February 2022, 19:27   #944  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,330
What happens when you put SelectOdd(org) instead of org? (I'm not near my PC) or better: Interleave(org,org)

Last edited by pinterf; 24th February 2022 at 20:13.
pinterf is offline   Reply With Quote
Old 24th February 2022, 21:57   #945  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Quote:
Originally Posted by pinterf View Post
What happens when you put SelectOdd(org) instead of org? (I'm not near my PC) or better: Interleave(org,org)
Both options are fine.

By the way, do you know if there's such thing as IsRuntime(), so I can disable LUT in this environment, I can do a try catch though but it's not pretty.

Code:
function isRunTime(clip a, bool rgb) {
    try {
      iRT = rgb ? a.AverageR() : a.AverageLuma()
      iRT = true
    } catch ( error_msg ) {
      iRT = false
    }
return iRT }
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 25th February 2022 at 02:50.
Dogway is offline   Reply With Quote
Old 25th February 2022, 08:02   #946  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,330
Quote:
Originally Posted by Dogway View Post
Both options are fine.
Technically
Code:
propCopy(last, Interleave(org,org))
is what you need to use. This will pull the proper frame properties. because Nth original frame becomes (2N)th after QTGMC.

Or else - because of frame doubling - the filter before 'org' (in my example ColorBars, or ffms) is receiving the following frame request pattern (actually copied from my log file):

Code:
0, 0, 0, 1, 1, 2, 1, 3, 2, 4, 2, 5, 3, 6, 3, 7, 4, 8, 4, ...
44, 22, 45, 23, 56, 23...
Jumping to and fro is not healthy for any source filter (nor for Avisynth+ internal cache algorithm )

Using Interleave for this kind of propCopy will not only make the source of copying correctly placed but will speed up the whole thing - at least it won't make it slow down because of out-of-order frame requests. I hope I didn't write much nonsense. I recommend you trying it out.
pinterf is offline   Reply With Quote
Old 25th February 2022, 17:37   #947  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
But in this case we are pulling frameprops from frame#0. If using offset though frame order is important, same if run in runtime env.

Quote:
Originally Posted by pinterf View Post
- Allow propGetXXX property getter functions called as normal functions, outside runtime
By default frame property values are read from frame#0 which index can be overridden by the offset parameter
About Bob()+Merge(), I see that the frame request is N and 2N at the same time so the source loader suffers jumping up and down.

Anyway I tested with "output.propCopy(bobbed)" in QTGMC and it worked fine. But I will wait until you add selective frameprop copy if you still plan to add it.


EDIT: Boulder, updated QTGMC() give it a try now, so far looks fine here. I had to port sh_bob() to inherit some frame properties.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 25th February 2022 at 19:19.
Dogway is offline   Reply With Quote
Old 26th February 2022, 09:32   #948  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,804
The new version works fine, no memory leaks whatsoever
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 26th February 2022, 12:20   #949  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
Hi...
Dogway, please can you help me?
I'm trying to use your latest version of QTGMC with Ripbot, but when I try to preview the script, appear the message: cannot render the file. If i use the old QTGMC the preview start. I have updated all the dll of the core plugins to the version requested by the avsi file. This is the part of the script relative to QTCMG

#Deinterlace
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\SysInfo0129\SysInfo64.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\vinverse\vinverse.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\vsTCanny\vsTCanny.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\RgTools\RgTools.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\nnedi3\nnedi3.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\masktools\masktools2.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\mvtools\mvtools2.dll")
Import("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\Scripts\QTGMC.avsi")
video=AssumeTFF(video).QTGMC(Preset="Medium",FPSDivisor=1)
salvo00786 is offline   Reply With Quote
Old 26th February 2022, 16:36   #950  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
Quote:
Originally Posted by salvo00786 View Post
Hi...
Dogway, please can you help me?
I'm trying to use your latest version of QTGMC with Ripbot, but when I try to preview the script, appear the message: cannot render the file. If i use the old QTGMC the preview start.
What AviSynth+ version do you use? I recommend using latest v3.7.2 test3. And redownload QTGMC just in case, as I had a typo yesterday.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 26th February 2022 at 16:43.
Dogway is offline   Reply With Quote
Old 26th February 2022, 17:48   #951  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
Ok, I downloaded the new file, but same error. I use Ripbot not Avisynth. Can you help me on Ripbot?

Last edited by salvo00786; 26th February 2022 at 17:59.
salvo00786 is offline   Reply With Quote
Old 26th February 2022, 18:22   #952  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,367
It uses AviSynth+ as the backend, but it is still using the version from one year ago.
Simply install latest AVS+ version or replace by hand "%PROGRAMFILES%\AviSynth+".

I also modified the RipBot installer so simply save it to the extracted folder of "Avisynth_3.7.2_20220208_test3.7z" and execute the file, to let it do automatically.

modified install.cmd:
Code:
@ECHO OFF

cd /d %~dp0

ECHO AviSynth+ MT (r3622 x86/x64) Installer by Atak_Snajpera (modified)
ECHO =======================================================

SET HasAdminRights=0
FOR /F %%i IN ('WHOAMI /PRIV /NH') DO (
	IF "%%i"=="SeTakeOwnershipPrivilege" SET HasAdminRights=1
)

IF NOT %HasAdminRights%==1 (
	ECHO Error:No admin rights detected. 
	ECHO This script must be run as an Administrator.
	ECHO.
	GOTO END
)

if "%ProgramW6432%" == "" (
SET InstallPath="%PROGRAMFILES%\AviSynth+"
) else (
SET InstallPath="%PROGRAMFILES(x86)%\AviSynth+"
)

if "%ProgramW6432%" == "" (

xcopy "x86\plugins" "%InstallPath%\plugins+\" /Y 
xcopy "x86\AviSynth.dll" "%SYSTEMROOT%\System32\" /Y 
xcopy "x86\system\DevIL.dll" "%SYSTEMROOT%\System32\" /Y 

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /ve /d %InstallPath% /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /v plugindir2_5 /d %InstallPath%\plugins /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /v plugindir+ /d %InstallPath%\plugins+ /f 
ECHO =================================================================

) else (
xcopy "x86\plugins" "%InstallPath%\plugins+\" /Y 
xcopy "x64\plugins" "%InstallPath%\plugins64+\" /Y 
xcopy "x64\AviSynth.dll" "%SYSTEMROOT%\System32\" /Y 
xcopy "x86\AviSynth.dll" "%SYSTEMROOT%\SysWOW64\" /Y 
xcopy "x64\system\DevIL.dll" "%SYSTEMROOT%\System32\" /Y 
xcopy "x86\system\DevIL.dll" "%SYSTEMROOT%\SysWOW64\" /Y 

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /ve /d %InstallPath% /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /v plugindir2_5 /d %InstallPath%\plugins64 /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth /v plugindir+ /d %InstallPath%\plugins64+ /f 

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Avisynth /ve /d %InstallPath% /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Avisynth /v plugindir2_5 /d %InstallPath%\plugins /f 
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Avisynth /v plugindir+ /d %InstallPath%\plugins+ /f 
ECHO =================================================================
)

:END
rem pause
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 27th February 2022, 00:05   #953  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
ok, thanks but:
1)When I try to install avs+ the program is in directory program files x86 and not in program files
2)I can find only 7z portable version of ripbot. Where is your modded version?
3)I downloaded Avisynth_3.7.2_20220208_test3.7z and i created install cmd with your text, but when i extract Avisynth_3.7.2_20220208_test3.7z, in the root directory of 7z, your file doesn't start
salvo00786 is offline   Reply With Quote
Old 27th February 2022, 01:10   #954  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
I tried to copy manually the x86 plugins in RipBot264v1.26.0\Tools\AviSynth\AviSynth+\plugins+ and x64 plugins in RipBot264v1.26.0\Tools\AviSynth\AviSynth+\plugins64+. The same operation in the C:\Program Files (x86)\AviSynth+ directory. Now when I try to start the script this error appear
Attached Images
 
salvo00786 is offline   Reply With Quote
Old 27th February 2022, 01:28   #955  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,124
Quote:
Originally Posted by salvo00786 View Post
ok, thanks but:
1)When I try to install avs+ the program is in directory program files x86 and not in program files
2)I can find only 7z portable version of ripbot. Where is your modded version?
3)I downloaded Avisynth_3.7.2_20220208_test3.7z and i created install cmd with your text, but when i extract Avisynth_3.7.2_20220208_test3.7z, in the root directory of 7z, your file doesn't start
Hi salvo00786,

At last, another RipBot user

How long have you been using it ??

Have you "created" many scripts before ??

Why I ask is, how do you "implement" your QTGMC script ???, do you copy it into the script window of RipBot ??, it's just that without trying your script myself, I can see at least 2 major problems.

Oh, and there is an easier way of "installing" Avisynth so that RipBot can use it...
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..

Last edited by TDS; 27th February 2022 at 01:31.
TDS is offline   Reply With Quote
Old 27th February 2022, 01:43   #956  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
I haven't created many scripts before. I have user Ripbot many times but only for deinterlacing or for denoising files with KNLMEANSCL. But I have used the integrated QTGMC until now. Now i want to use the latest version. Yes, I copy the scripts under the Deinterlace section of Script Windows in Ripbot. Please tell me what are these 2 major problems and the easier way of installing avisynth so that Ripbot can use it
salvo00786 is offline   Reply With Quote
Old 27th February 2022, 01:49   #957  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,124
Quote:
Originally Posted by salvo00786 View Post
I haven't created many scripts before. I have user Ripbot many times but only for deinterlacing or for denoising files with KNLMEANSCL. But I have used the integrated QTGMC until now. Now i want to use the latest version. Yes, I copy the scripts under the Deinterlace section of Script Windows in Ripbot. Please tell me what are these 2 major problems and the easier way of installing avisynth so that Ripbot can use it
Thanks for your quick reply...

Not sure how often you "visit" the RipBot forum, but RipBot is definitely dying a slow death, unfortunately.

Like I said, I haven't tested your script, so I don't want to say anything right now, but like I said, I can see 2 errors, but will confirm.

I don't use QTGMC much, as I have very little interlaced material to work with.

So I will see what I can come up with and get back to you either here or a PM.
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is offline   Reply With Quote
Old 27th February 2022, 02:16   #958  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
ok, thanks
salvo00786 is offline   Reply With Quote
Old 27th February 2022, 02:55   #959  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,124
Quote:
Originally Posted by salvo00786 View Post
ok, thanks
OK, I think I've got it sussed...

You need to be VERY, VERY particular with the "calls" within the script, meaning their EXACT location !!!

So copy this into Notepad, save as an .avs, not .txt.

#Custom
Loadplugin("%AVISYNTHPLUGINS%\dfttest\dfttest.dll") may not need this
Loadplugin("%AVISYNTHPLUGINS%\SysInfo_0129\SysInfo64.dll")
Loadplugin("%AVISYNTHPLUGINS%\vinverse\vinverse.dll")
Loadplugin("%AVISYNTHPLUGINS%\vsTCanny-1.1.5\vsTCanny.dll")
Loadplugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Loadplugin("%AVISYNTHPLUGINS%\nnedi3\nnedi3.dll")
Loadplugin("%AVISYNTHPLUGINS%\masktools\masktools2.dll")
Loadplugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools76.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain347d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")

Import("%AVISYNTHPLUGINS%\Scripts\QTGMC.avs")
video=AssumeTFF(video).QTGMC(Preset="Medium",FPSDivisor=1)

Save it into the Custom Folder under Tools / Avisynth plugins / Scripts / Custom..

You'll have to download ExTools, SMDegrain & Zs_RF_Shared and create a new folder called extras (as shown in script)

Then from in RipBot you can just choose it from the Custom Scripts "list", check with AVSMeter.

orig

#Deinterlace
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\SysInfo0129\SysInfo64.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\vinverse\vinverse.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\vsTCanny\vsTCanny.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\RgTools\RgTools.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\nnedi3\nnedi3.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\masktools\masktools2.dll")
Loadplugin("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\mvtools\mvtools2.dll")
Import("A:\PORTABLE\RipBot264v1.26.0\Tools\AviSynth plugins\Scripts\QTGMC.avsi")
video=AssumeTFF(video).QTGMC(Preset="Medium",FPSDivisor=1)


------------------------------------------------------------

Ok, so for Avisynth, extract the "test 3" .7z with WinRar.

From there go to the x64 & x86 folders..

Copy the AviSynth.dll & DevIL.dll (from the system folder), into the x64 & x86 folders, respectively, under "Tools / Avisynth / Libraries" folder in RipBot main folder.

Then run the "install.cmd" in the main Avisynth folder, as Admin.

Good luck
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..

Last edited by TDS; 27th February 2022 at 03:14.
TDS is offline   Reply With Quote
Old 27th February 2022, 04:02   #960  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,124
Error with ExTools v7.6, from v7.5, with DFTTest (for prefilter=4)

Error at Line 251 in SMDegrain v3.4 7d
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

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


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