digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   VirtualDub problem with ContrastMask (https://www.digitalfaq.com/forum/video-restore/9250-virtualdub-problem-contrastmask.html)

stevevid 12-20-2018 03:07 AM

VirtualDub problem with ContrastMask
 
1 Attachment(s)
VirtualDub is giving me the error shown in the attachment when I try to use ContrastMask. I have set up a script to import the ContrastMask avs file and alternatively tried renamed ContrastMask.avs to avsi and removed the import function. Same error occurs. Here's where I'm trying to use it:

HDRagc(coef_gain=2.5)
ContrastMask(enhance=3.0)
Tweak(cont=1.1,coring=false,dither=true)

Any idea what's wrong?

Thanks,
Steve

sanlyn 12-20-2018 04:47 AM

If you got your ContrastMask from the download link at http://www.digitalfaq.com/forum/atta...ontrastmaskavs, (the download was .avs script, not avsi, but it should still work), then line 10 in that script is:

Code:

photoshop_overlay=mt_lutxy(v,v2,"x 127.5 > y 255 x - 127.5 / * x 255 x - - + y x 127.5 / * ? ")
Make sure your copy of MastTools.avs doesn't have Notepad's "Word Wrap" option enabled when you save it, or that line of code might be split into two lines incorrectly. Also make sure we're talking about the same line of code.

It could be either a MaskTools loading error or a memory fault. That GET CHILD error shows up unexpectedly in several programs -- Stab.avs is one, DePan,m, DePanEstimate, QTGMC and TemporalDegrain are others. It indicates that MaskTools2 isn't loading properly. MaskTool2.dll's shouldn't be a problem with this filter, which was written for older versions of MaskTools and works with new ones as well. If you downloaded the QTGMC package recently from digitalfaq at http://www.digitalfaq.com/forum/atta...g-qtgmc_newzip, then you have an updated MaskTool2 version that is compatible.

If your script still keeps running to completion, it means Avisynth ignored the error and just kept running. If the script or Virtualdub crashed, try loading the MaskTools plugin explicitly with the LoadPlugin() function. Usually a reboot clears it. If you are trying to use an "MT" version of Avisynth, "GET CHILD" VistualC++ errors occur all the time and are a constant pain the neck with MT.

stevevid 12-20-2018 02:33 PM

Thanks for the information!

I assume your comment "Make sure your copy of MastTools.avs doesn't have Notepad's "Word Wrap" option enabled when you save it, or that line of code might be split into two lines incorrectly" meant to refer to ContrastMask.avs--true? I checked ContrasMask.avs with Notepad, turned off wrap text then saved the file to make sure there was nothing fishy there. Line 10 is the same as you showed.

How do I check which version of 32-bit AviSynth I am using? I believe I have 2.6.

I get an error from AvsPmod when I start it. The error is in the attachment. Is this related to what I am running into? (BTW, how do I insert jpg files into the thread text?)

I do have QTGMC 3.32 installed. Where is MaskTools2.dll stored? I don't see it listed anywhere to do a LoadPlugin step. Is MaskTools2 only for AviSynth+? The AviSynth Wiki says it's for AvsSynth+.

sanlyn 12-20-2018 05:13 PM

Quote:

Originally Posted by stevevid (Post 57965)
How do I check which version of 32-bit AviSynth I am using? I believe I have 2.6.

Make an avs script with this statement all by itself:
Code:

version()
Saver the text file as "version.avs". Run it in VirtualDub or Avspmod.

Quote:

Originally Posted by stevevid (Post 57965)
I get an error from AvsPmod when I start it. The error is in the attachment. Is this related to what I am running into?

I don't use avspmod. Tried in a while back. No cigar. Likely the message would show up in VDub if the problem still exists.

Quote:

Originally Posted by stevevid (Post 57965)
(BTW, how do I insert jpg files into the thread text?)

Use the "insert Image" icon, it's a square light-blue icon in the second row of icons across the top of the reply window. If you don't see that entire row of icons, you have to be in advanced view.

Click that icon and in the window that pops up type the URL of the jpg. If the jpg is offsite, type the htt5 address of the image. If the jpg is attached to the post, right-click on the name of the attached jpg (attachments will be listed under the reply window in advanced view). The right-click popup window has a menu that lets you copy the jpg's address to the Windows clipboard. Then enter the http address in the dialog for the "Insert Image" icon. Takes longer to describe it than to do it.

Quote:

Originally Posted by stevevid (Post 57965)
I do have QTGMC 3.32 installed. Where is MaskTools2.dll stored? I don't see it listed anywhere to do a LoadPlugin step. Is MaskTools2 only for AviSynth+? The AviSynth Wiki says it's for AvsSynth+.

The newest version of MaskTools2 is v2.2.18. It's for Avisynth and Avisynth+ both. But I believe you already have QTGMC and its support files if you downloaded QTGMC_new.zip from digitalfaq at http://www.digitalfaq.com/forum/atta...g-qtgmc_newzip. That package contains MaskTools2.1.10, which is good enough.

MaskTools2.dll is an Avisynth plugin. Avisynth plugins are stored in the Avisynth "plugins" folder. It is a subfolder in the Avisynth program folder, which will be in "Program Files" in 32-bit Windows or in "Program Files (x86) in 64-bit Windows. Right-click on MaskTools2.dll and click "properties" to see .dll version info.

The newest version 2.2.18 isn't necessary, it's just a big headache to self-stroke the programmer's ego and make you download and install the Microsoft VisualC++ 2017 runtime (x86 runtime version is at https://aka.ms/vs/15/release/vc_redist.x86.exe, x64 runtime version is at https://aka.ms/vs/15/release/vc_redist.x64.exe.) If you have 64-bit Windows, install both x64 and x86 versions of the .exe downloads. If you have 32-bit Windows you can install only the x86 runtime.

The slightly earlier but still current MaskTools 2.2.10 version that comes with the QTGMC package linked earlier requires VisualC++ 2015, which you would already have installed if you downloaded the QTGMC package from digitalfaq.

stevevid 12-20-2018 05:46 PM

Quote:

Originally Posted by sanlyn (Post 57971)
The newest version of MaskTools2 is v2.2.18. It's for Avisynth and Avisynth+ both. But I believe you already have QTGMC and its support files if you downloaded QTGMC_new.zip from digitalfaq at http://www.digitalfaq.com/forum/atta...g-qtgmc_newzip. That package contains MaskTools2.1.10, which is good enough.

Maybe I'm blind, but I don't see MaskTools2 in the zip file. I had loaded the material from the file last September and redownloaded it today. Er, now what?

sanlyn 12-20-2018 09:29 PM

The file QTGMC_new.zip unzips to a folder named "PluginsPackageNov2017".
In that folder is a subfolder named "Avisynth 32-bit Plugins".
In that subfolder are 19 files. One of the 19 files is masktools2.dll.

In the root folder "PluginsPackageNov2017" there is a file named "READ_ME_FIRST.txt".
Start there.

stevevid 12-20-2018 11:50 PM

Quote:

Originally Posted by sanlyn (Post 57981)
The file QTGMC_new.zip unzips to a folder named "PluginsPackageNov2017".
In that folder is a subfolder named "Avisynth 32-bit Plugins".
In that subfolder are 19 files. One of the 19 files is masktools2.dll.

In the root folder "PluginsPackageNov2017" there is a file named "READ_ME_FIRST.txt".
Start there.

I think we exist in two alternate universes. The QTGMC_new.zip I download from your link (I just did it again) extracts to a folder named QTGMC_new. The plugin folder has 18 files instead of 19. The closest file name to Masktools2.dll is MVtools2.dll. Is your link wrong or has zip file been modified somewhere along the line?

sanlyn 12-21-2018 08:01 AM

1 Attachment(s)
Oh, brother, I'm glad you caught that. Thaty QTGMC_new should have been replaced months ago. I'll have to contact the moderator and ask (again) to have it replaced with one that I remade -- and now it's time to remake it again!

The download file containing the November updates was supposed to be in the QTGMC_new collection all by itself, but it never got replaced with the Nov version. The PluginsPackageNov2017 was also p[osted in a big collection of plugins, but that package also needs an update!

I'm attaching the Nov. QTGMC updates here, by itself as a new attachment called QTGMCPluginsPackageNov2017.zip. After I get back from an appointment this morning I'll contact the moderator.

Thanks again. That old "new" should have been replaced a long time ago.
:mad4:

stevevid 12-21-2018 01:42 PM

Yea! This proves I'm not as crazy as my wife thinks I am.

Thanks. MaskTools2 now rests comfortably in AviSynth's plugin folder.

stevevid 12-22-2018 01:17 AM

3 Attachment(s)
Boy this is getting tedious! After all of this I still got the error:

http://www.digitalfaq.com/forum/atta...1&d=1545461494

I fixed this problem by adding LoadPlugin for MaskTools2 even though this plugin was in the proper plugin folder. Why did I have to do this?

Now VDub gives this error:

http://www.digitalfaq.com/forum/atta...1&d=1545462461

The script is:

Attachment 9316

Oy, Now what?

Thanks,
Steve

sanlyn 12-22-2018 04:36 AM

Quote:

Originally Posted by stevevid (Post 58001)
I fixed this problem by adding LoadPlugin for MaskTools2 even though this plugin was in the proper plugin folder. Why did I have to do this?

That's just it -- you shouldn't have to use LoadPlugin if it's in your plugins folder.

Quote:

Originally Posted by stevevid (Post 58001)

Line 592 in QTGMC is related to RepairSSE2.dll. You are allowed to have both RepairSSE2.dll and RGtools.dll in your plugins folder -- RGtools.dll is a newer version of Repair. They both belong to the old RemoveGrain package. Some people keep both of those dll's so that older avs scripts can run. Try using LoadPlugin for RGTools.dll. As for MaskTools2, there should be only one copy of masktools2.dll in your plugins. If you find that you also have a makstools_25.dll or masktools_26.dll, remove it but save it elsewhere in case you need it for something else.

LoadPlugin should always be at the top of a script, before a file is opened.

RE: Your script layout, is that how avsPmod looks nowadays? (I gave up on avspmod long ago, too limiting and buggy). Be that as it may, something is screwy somewhere. Were you able to run these same plugins in earlier scripts, or is this error a new development?

stevevid 12-22-2018 11:50 AM

1 Attachment(s)
Here is the full script and error message. The parts I added are above the line #---STEP 1 SCRIPT.
Attachment 9317

Quote:

Originally Posted by sanlyn (Post 58002)
That's just it -- you shouldn't have to use LoadPlugin if it's in your plugins folder.

Sanlyn, the LoadPlugin for MaskTools2 trick I got from you in post 2. This step loads the plugin directly from the AviSynth plugin folder. Weird that it works, but it does.

Quote:

Originally Posted by sanlyn (Post 58002)
Line 592 in QTGMC is related to RepairSSE2.dll. You are allowed to have both RepairSSE2.dll and RGtools.dll in your plugins folder -- RGtools.dll is a newer version of Repair. They both belong to the old RemoveGrain package. Some people keep both of those dll's so that older avs scripts can run. Try using LoadPlugin for RGTools.dll. As for MaskTools2, there should be only one copy of masktools2.dll in your plugins. If you find that you also have a makstools_25.dll or masktools_26.dll, remove it but save it elsewhere in case you need it for something else.

I added LoadPlugin for RGTools.dll. Still get same VDub error. The only other plugin in the Plugins folder related to MaskTools2 is mt_masktoold-26.dll. I tested blocking it by changing its file type to .dll-disable. Still get same VDub error. The External Filters folder has a MaskTools.dll but that shouldn't matter since its plugins are not in the main Plugins folder.

I turned on preview in AVSPmod and get the same QTGMC error when it tries to show the video.

Quote:

Originally Posted by sanlyn (Post 58002)
LoadPlugin should always be at the top of a script, before a file is opened.

I moved them to the top. No change.

Quote:

Originally Posted by sanlyn (Post 58002)
RE: Your script layout, is that how avsPmod looks nowadays? (I gave up on avspmod long ago, too limiting and buggy). Be that as it may, something is screwy somewhere. Were you able to run these same plugins in earlier scripts, or is this error a new development?

I'm not sure where the extra bracketed info came from. It doesn't show up in any other scripts I've used or created.

I'm pretty sure I was able to run the script in September. To recreate the conditions from September, I changed the plugins from the newest November ones to the ones that were available in September (except for MaskTools2 since it just showed up in the file you posted yesterday). Still get error.

Thoughts?

Thanks,
Steve

BTW: I'm revisiting this script because I was having trouble with QTGMC in a new script I was trying to get to work. I thought going back to the old script would give a clue to what's wrong with the new script. The new script throws off two QTGMC errors. It's a very simple script. I can post it if it would give a different perspective on what is going on.

sanlyn 12-22-2018 03:53 PM

Quote:

Originally Posted by stevevid (Post 58010)
I added LoadPlugin for RGTools.dll. Still get same VDub error. The only other plugin in the Plugins folder related to MaskTools2 is mt_masktoold-26.dll. I tested blocking it by changing its file type to .dll-disable. Still get same VDub error. The External Filters folder has a MaskTools.dll but that shouldn't matter since its plugins are not in the main Plugins folder.

You shouldn't use your default plugins folder as storage for various unwanted files. The main avisynth .dll looks at everything when it starts up, and even reads .avsi's that I haven't used in months. I found that out when I copied my plugins folder to a Win10 laptop. I had .avsi's in there that referenced other folders that were not on the Win10 machine, and I got a ton of errors from other filters even though the script I ran didn't call those .avsi's. I had to go into every one of those .avsi's and change the folder names to match the new PC before I could run Avisynth without errors on that machine.

mt_masktools_26 shouldn't be there, not even if you change its name. Make another subfolder somewhere for old or replaced plugins. Unwanted files in the plugins will slow startup.

stevevid 12-23-2018 02:42 AM

I found a copy of the avi created with this script in September. So, this script used to work.

Ok, what about an experiment where I move all of the items in the Plugins folder to a temporary folder so I can bring them back one at a time to get a sense of what is tripping up the script? Sanlyn, I'm basing this approach on what you said about unwanted files. I don't know if only avs/avsi files could be causing a problem or if an updated dll could cause a problem.

I've done an initial test. ContrastMask requires MaskTools2 so I moved MaskTools2 back into the plugins folder. Now I get an error that function gaussianblur is missing. Here's where things fall apart for me. There's no gaussianblur plugin. So I guess it is buried inside another plugin. This means I probably will have to ask multiple questions on where hidden functions are located. Is this a viable approach? Are you willing to answer short questions of what plugin should be loaded to obtain a particular function?

Would uninstalling and reinstalling AviSynth 2.6 be a better alternative so I get the base set of plugins that come with AviSynth? I could then load additional required plugins into another folder and use LoadPlugin. I already do this for TIVTC which is in a folder of plugins from Lordsmurf. It would be much nicer though to have as many plugins as possible in the main plugins folder to eliminate the need for multiple loadplugin statements. Using loadplugin statements can get tedious because it may not be clear which plugin is required such as the issue with finding what plugin is required for gaussianblur.

Thanks,
Steve

sanlyn 12-23-2018 03:52 AM

Sorry to see you're still having problems. Yikes.

GaussianBlur is a function in the VariableBlur plugin, which is used by several other filters. If you don't have it, it was posted at http://www.digitalfaq.com/forum/atta...bleblur_070zip.

Quite often you can find some of these function names in Google. Go to Google and enter the search string "Avisynth gaussianblur" and see what you get. At the top of the list I get this page: http://avisynth.nl/index.php/VariableBlur/GaussianBlur.

Yes, if everything worked earlier then the Avisynth installation has undergone a change of some kind. I've had that happen. The Avisynth 2.6 versions' uninstaller is in the program group listing. It will remove registry entries and will probably remove the Avisynth.dll from SYSWOW64. But the Avisynth program folder and its plugins folder will remain on your hard drive. So I suggest that after running the uninstaller you should change the name of the old Avisynth program folder and save it so that you don't have to search for every plugin again. Then reinstall Avisynth. I've done it several times on various PC's.

[EDIT] Sorry for the delay in replies at times. We've just moved into a new house and are packing/repacking our SUV and carrying stuff back and forth. I'll be driving to another city DEC.24 all day for medical stuff and Christmas. But I'll have my godawful Dell laptop with me. BTW, my Win7 laptop screen blew out a couple of weeks ago. I had to buy a new display panel and learn to replace the damn thing. No way I can afford a new laptop.

stevevid 12-23-2018 07:15 AM

New house, cool. As far as your speed, I don't see a delay. I'm impressed you get around to everything so fast. I'm retired and seem to get to things like this slower than when I worked full time.

I do have variableblur. I just removed it and the other plugins for the test phase. I'll switch to reinstalling AviSynth and see where things go from there.

Thanks again and hope you have a great Christmas,
Steve

ELinder 12-23-2018 10:19 AM

Sorry to butt in on the conversation, but since you've been also talking about QTGMC, I have a question. I've got Virtualdub2 running in a Windows 10 Virtual machine and I was trying to find if QTGMC is available in VD2. I've gone thru lots of threads on Doom9 and see lots of people talking about it, but can't find if anyone has actually done it. I gave up on trying to run VapourSynth on my Mac and frankly Avisynth gives me a headache every time I sit down to try to figure out scripting.

stevevid 12-23-2018 12:00 PM

Doom9 has one or more threads that discuss VirtualDub2. Film9 uses VirtualDub2 and is a simplified front-end GUI for the extensive script discussed for the last nine years in thread https://forum.doom9.org/showthread.php?t=144271. The script and Film9 are primarily for digitized film, but it does work on some VHS tapes. Film9 is discussed on VideoHelp in thread https://forum.videohelp.com/threads/...m%29-and-video. Maybe somebody in one of these threads knows if QTGMC can be used in VirtualDub2.

ELinder 12-23-2018 12:50 PM

I had completely forgotten about the VideoHelp site, thanks.

My problem with reading the Doom9 site is the discussins all too frequently devolve into scripting and .dll calls, etc. The last time I did anything like that was ages ago when I gave up on building my own PCs, hunting down errant driver conflicts, and fighting with QEMM and MemMaker. After Windows NT I went all Mac and haven't looked back until now when I installed Win10 in a virtual machine for these VHS retoration projects.

Erich

sanlyn 12-23-2018 02:13 PM

QTGMC requires Avisynth and its variants. Avisynth scripts can be run in VD2.
original post:https://forum.doom9.org/showthread.php?t=156028
v3.358s update & requirements, features, settings, not for the faint of heart: http://avisynth.nl/index.php/QTGMC


All times are GMT -5. The time now is 11:05 PM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.