Log in

View Full Version : Script for QTGMC 3.357 - one error after the other


galliano
23rd March 2018, 08:36
Hi Guys,

I intended to deinterlace and upscale a bit my video(s) and after reading about the QTGMC I started this project…I thought the whole thing would run pretty smooth, but I truly underestimated the task. I hope that somebody here can help me :)

This is my scenario:

The input video source are several scenes recorded with a mini-DV camcorder and edited with Sony Vegas 5. The video format is: 720x576i, 25 fps, aspect ratio 16:9

My goal is an x264 output processed via MeGui, deinterlaced, upsized to 1280x720, AC3 Audio, in MKV container.

I have followed the instructions in qtgmc wiki, and http://www.bubblevision.com/underwater-video/Vegas-YouTube-Vimeo.htm, but all I get one error after the other :(

First I rendered (Render as) to aa.avi via Debugmode Frameserver, Format RGB24

Then I loaded this short script into MeGui:

LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\mvtools2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\masktools2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\nnedi3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\RgTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\PlanarTools.dll")
Import("C:\Program Files\AviSynth 2.6\Plugins\QTGMC.avsi")
Import("C:\Program Files\AviSynth 2.6\Plugins\SMDegrain_v3.1.2.93s.avsi")
AviSource("E:\aa.avi")
ConvertToYV12(interlaced=true, matrix="PC.709")
AssumeBFF
QTGMC(Preset="slow")
Lanczos3Resize(1280,720)

...a disaster! Basically, for all the first lines I got the error messages below, so I “commented” [#] all the lines one by one. And the last error message, well that was basically it…QTGMC is not running at all :(

unable to load "C:\Program Files\AviSynth 2.5\plugins\masktools2.dll", error=0xc1
Plugin: C:\Program Files\AviSynth 2.5\plugins\needi3.dll is not an AviSynth 2.6 plugin
Plugin: C:\Program Files\AviSynth 2.5\plugins\Rgtools.dll is not an AviSynth 2.6 plugin
Plugin: C:\Program Files\AviSynth 2.5\plugins\PlanarTools.dll is not an AviSynth 2.6 plugin
Script Error: there is no function named "mt_makediff" - QTGMC.avsi, line 918 & line 473

Additional information:

If I load the Debugmode Frameserver aa.avi with
AVISource()
Info()

I get: ColorSpace RGB24

If I load any original DV clip with
AVISource()
Info()
I get: ColorSpace RGB24

I am Running WIN XP SP3, the masktools ZIP file contains many versions for different OS. I tried all the versions, in the x86 folders, no success.

I downloaded QTGMC and all the core plugins & scripts from here
http://avisynth.nl/index.php/QTGMC

and 2 Optional Plugins and Scripts
- PlanarTools
- AnimeIVTC

AviSynth is from here https://sourceforge.net/projects/avisynth2/ (https://sourceforge.net/projects/avisynth2/) (v2.6.0.)


What the hell am I doing wrong? Am I missing something in my script or some AviSynth plugin or am I dealing with a bug? I would be glad if somebody could drive me through this, I hope to have given useful information for a diagnosis and therapy

Thanks in advance for any advice :)

Sharc
23rd March 2018, 10:51
First off, completely uninstall your Avisynth 2.5 and Avisynth 2.6. installations. You seem to have both on your HD
Then do a clean reinstallation of Avisynth 2.6 and add the plugins with the correct version (for 2.6)

fAy01
23rd March 2018, 11:18
https://github.com/pinterf/AviSynthPlus/releases
https://github.com/pinterf?tab=repositories
Use this build and find avs+ plugins using the search on doom9/github/google, you should be good unless megui refuses to work with avs+.

StainlessS
23rd March 2018, 18:04
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\mvtools2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\masktools2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\nnedi3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\RgTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.6\Plugins\PlanarTools.dll")
Import("C:\Program Files\AviSynth 2.6\Plugins\QTGMC.avsi")
Import("C:\Program Files\AviSynth 2.6\Plugins\SMDegrain_v3.1.2.93s.avsi")

Also, plugins and Avsi's are auto loaded if in the Plugins directory, so all of above is unnecessary (only needed if located elsewhere).

Both previous posts are good advice.

If further problems, the try Groucho2004

AvsMeter -AvsInfo -log

with plugins in plugins directory and post log.

Groucho2004
23rd March 2018, 18:30
If further problems, the try Groucho2004

AvsMeter -AvsInfo -log

with plugins in plugins directory and post log.
I just want to point out that there is the "-c" switch for AVSMeter which enables the user to specify a custom plugin directory:
"avsmeter -avsinfo -c -log".

StainlessS
23rd March 2018, 18:38
I musta missed that, AvsMeter just keeps gettin' besterer and besterer. :)

galliano
24th March 2018, 08:28
First of all thanks for taking care of my case guys :)

I uninstalled avisynth v. 2.5 and and 2.6, made a registry cleaning with CC, reinstalled everything, the error messages remain.


# unable to load "C:\Program Files\AviSynth 2.6.0\plugins\masktools2.dll", error=0xc1
# Plugin: C:\Program Files\AviSynth 2.6.0\plugins\needi3.dll is not an AviSynth 2.5 plugin
# Plugin: C:\Program Files\AviSynth 2.6.0\plugins\Rgtools.dll is not an AviSynth 2.5 plugin
# Plugin: C:\Program Files\AviSynth 2.6.0\plugins\PlanarTools.dll is not an AviSynth 2.5 plugin
# Script Error: there is no function named "mt_makediff" - QTGMC.avsi, line 918 & line 473

When starting the script for the first time after reinstall a Window message popped up "mvtools2 is not a valid windows image".

The mvtools I copied is the version mvtools-v2.5.11.22 from here:

http://avisynth.nl/index.php/MVTools

I am thinking, did I unpack the plugin correct in the directory? The ZIP file contains a "sources" folder...do I have to copy this too? If yes where? Sorry, I am a beginner with AviSynth.

Seen the error messages above I start to think...is MeGui maybe the problem? Then why is the error message saying is not an AviSynth 2.5 plugin?

I also looked at the AviSynth+ suggestion, but I did not figure out how to donwload the plugins from the repository and install them, when I download the file I get a xxx-master-zip with files I don't know how to handle :(

About the AvsMeter -AvsInfo -log...how do I do that? I just open the command prompt in the plugin directory and run the command?

burfadel
24th March 2018, 09:44
Probably partly to do with running XP. Programs have to be compiled with XP support, which generally isn't done as it is potentially disadvantageous to people running a more modern OS. Remember XP is based on Windows 2000, which is 18 years old. You also need the supporting runtimes, and run in 32-bit mode since Windows XP is 32 bit (sans XP 64-bit which wasn't widely supported).

When all this is in place, it's quite possible you simply won't have the memory to run the script depending on what other functions you use and the performance may be poor.

galliano
24th March 2018, 10:24
It' s just that I have this video edited in XP...wanted this done in XP before I kick the old OS out and movee to a new OS. The only alternative would be to render the whole in huffyuv, then Change OS, then reencode. But this would already lead to a quality loss :(

Sharc
24th March 2018, 10:31
Try in MeGUI, Menu Settings, Tab Main Configuration:
Unselect "Always use the included Avisynth".

Could you successfully run simpler scripts before with your setup?

Sharc
24th March 2018, 10:40
It' s just that I have this video edited in XP...wanted this done in XP before I kick the old OS out and movee to a new OS. The only alternative would be to render the whole in huffyuv, then Change OS, then reencode. But this would already lead to a quality loss :(
You can change the OS. It does not matter under which OS you have processed your video before. No need for huffyuv etc.

Is your MeGUI perhaps outdated?

Groucho2004
24th March 2018, 12:34
About the AvsMeter -AvsInfo -log...how do I do that? I just open the command prompt in the plugin directory and run the command?
Download AVSMeter (link in my signature). Copy it to a directory of your choice, open a command prompt and run it from that directory. A dialog will appear to ask you where to save the log file.

manolito
24th March 2018, 21:38
FWIW here is a complete oldfashioned AIO QTGMC package which works under Win XP and does not even require a CPU with SSE2 support:
https://files.videohelp.com/u/172211/QTGMC%20for%20Win%20XP%20No-SSE2.zip

Copy the files into your AviSynth\Plugins folder to make them autoload. Works with plain vanilla AVS 2.60. No high bit depth, no extended colour spaces. Just the basics, but it is stable.

If this package does not work for you then it's probably MeGui which is to blame. And it never hurts to install Ricktendo's latest VC++ redistribuatables AIO package from here:
http://repacks.net/forum/viewtopic.php?f=6&t=125

Cheers
manolito

galliano
25th March 2018, 11:39
Groucho2004,I did the homework..I couldn't believe what my eyes saw. "avisynth version too old. Update to avisynth 2,6 or avisynth+ :eek:

So I ran the version script Version() and got 2.6.0 as information.

The setting "Always use the included Avisynth" was already deactivated in MeGui. I activated and deactivated it again, but nothing changed.

Actually, I did not want to change the OS before finishing this. As far as I understood, Vegas 5 is not running under Win7 "out of the box". Additionally, on the same PC I am running Ubuntu and a WIN upgrade, usually, screws up the double boot parameters in grub, so I intended to avoid ending screwing around the complete system.

It must not necessarily be MeGui for me. Earlier I used Staxrip. but I saw that the last version is for Win7 or higher only.

Groucho2004
25th March 2018, 11:59
Groucho2004,I did the homework..I couldn't believe what my eyes saw. "avisynth version too old. Update to avisynth 2,6 or avisynth+ :eek:
You may be using an early Avisynth 2.6 Alpha which would explain that message. By the way, attachments to posts here can take quite a while to be approved, I suggest you use some external site for them.

galliano
25th March 2018, 12:31
You may be using an early Avisynth 2.6 Alpha which would explain that message.

I took it from here http://avisynth.nl/index.php/Main_Page

The link is leading to sourceforge and I thought the button "download the latest version avisynth_110525.exe would be fine.

Shall I use your universal installer? Which 2.6.0. version should I install?

Just the Avisynth 2.6.0 or rather Avisynth 2.6.0 ICL or Avisynth 2.6.0 MT (SEt)?

One screenshot is just showing the avsmeter message, avuisynth version is too old
The oder the avisynth version avisynth 2.60, build:May 25 2011 [19:58:41] - Ben Rudiak-Gould

Groucho2004
25th March 2018, 13:01
The link is leading to sourceforge and I thought the button "download the latest version avisynth_110525.exe would be fine.[/B]
Just as I thought, this version is way too old (2.6, Alpha3).

I recommend the following:
Uninstall the old Avisynth.
Additionally, do this:
- Delete "C:\Program Files\AviSynth" and subdirectories (just an example, your path to Avisynth may differ)
- Delete these registry keys:
"HKEY_CURRENT_USER\Software\Avisynth"
"HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth"

Install the standard 2.6 release Avisynth version:
https://sourceforge.net/projects/avisynth2/files/latest/download

Copy the plugins needed to the plugin directory. I recommend pinterf's plugins, they all run fine on WinXP.

You probably need runtime libraries, I recommend this All-In-One package:
http://repacks.net/forum/viewtopic.php?f=6&t=237

After that, run Avsmeter to check your install. Post the log!

galliano
25th March 2018, 15:19
I am now pretty sure, that there is something wrong with the avisynth_110525.exe installer. You know why? I had the idea of installing virtualbox with WIN7 in my Ubuntu environment for running the avisynth script from there. So on the "virgin" virtual machine there was no trace of any AviSynth installations.

1st when starting the installer, the proposed directory ist program files\AviSynth 2.5!
2ND AVSmeter tells the same AviSynth version is too old

I can't believe it!

StainlessS
25th March 2018, 17:34
2ND AVSmeter tells the same AviSynth version is too old
Because that is still the old version 2.6Alpha 3.

avisynth_110525.exe is 2.6 alpha 3, nothing but crashes because Alpha 4 onwards use plugin registering function AvisynthPluginInit3 (Alpha 3 and previous use AvisynthPluginInit2).

Here is v2.6 Final:- https://sourceforge.net/projects/avisynth2/files/AviSynth%202.6/AviSynth%202.6.0/

Here is v2.61:- [EDIT: ORIGINAL LINK REMOVED] Get Link from Here(1st post):- https://forum.doom9.org/showthread.php?t=173517

You can choose either (I would go with v2.61).

or Avisynth v2.6+:- https://github.com/pinterf/AviSynthPlus/releases

Dont worry about "Avisynth 2.5" directory name, it may use that name if directory already exists (and Alpha 3 probably always suggests it).

StainlessS
25th March 2018, 17:48
galliano,

There was a problem with previously posted link in above post for avs v2.61, the link does not paste properley in D9 forum and actually takes you to the wrong page for v2.6 alpha 3.
Get the link from the new EDITED link above or here (from the first post):-
avs v2.61:- https://forum.doom9.org/showthread.php?t=173517

the problem was this link (starting http etc removed so is not a valid link)

sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/AVS%202.6.1%20Alpha%201%20[20160517]/

where the "[20160517]/" at the end does get properley parsed and pasted into the doom 9 forum post.

EDIT: This problem would likely have been cause of some confusion even prior to galliano difficulties.

EDIT: Dont know if FireFox or D9 forum changes caused problem, but the link posted by Wilbert in the v2.61 thread seems not to be broken.

galliano
25th March 2018, 18:41
I now went to the sourceforge site again, this time into the file folder, downloaded the avisynth 260.exe and installed it. Avsmeter now outputs data (see file attachment). I had now the script run both under XP and under WIN 7 in virtualbox and the QTGMC error now is:

Under XP the QTGMC error remains the same as described before:
Script Error: there is no function named "mt_makediff" - QTGMC.avsi, line 918 & line 473

Under Win 7 in the virtualbox I get another error:
Script error: MDegrain1 does not have a named argument "lsb" (QTGMC-avsi, line 650).

By the way, the universal installer was not working with me: "the source directory <avs.src.dir> is not defined.

My browser is firefox.

Groucho2004
25th March 2018, 18:54
Under XP the QTGMC error remains the same as described before:
Script Error: there is no function named "mt_makediff" - QTGMC.avsi, line 918 & line 473

Under Win 7 in the virtualbox I get another error:
Script error: MDegrain1 does not have a named argument "lsb" (QTGMC-avsi, line 650).
I have a pretty good idea why you're getting these errors but to be sure, I need the avsinfo_x86.log file which I see you attached again to your post. The approval of attachments can take hours or even days which I believe I mentioned before.


By the way, the universal installer was not working with me: "the source directory <avs.src.dir> is not defined.
That's because you did not read the instructions.

Groucho2004
26th March 2018, 15:34
Avsmeter now outputs data (see file attachment).
Now that the attachment was approved I see that you used the "-c" switch and specified your Desktop directory ("C:\Documents and Settings\J&F\Desktop") as your plugin folder which clearly does not contain any Avisynth plugins.

Try again without the "-c" switch.

galliano
26th March 2018, 20:25
Groucho2004, for the installer...yes, I obviously did not read the instructions...pardon!

Well..generally speaking, the problem usually sits in front of the monitor! ;) Sorry for my poor knowledge. Here are the 2 log files, one out of the XP environment, one out of the VM with WIN 7. It would be great if we can solve the problem under XP., otherwise I will make a huffyuv footage and process it in the WIN 7 VM.

I keep uploading them here because I am not registered anywhere for file hosting/sharing, but never mind if it takes a little longer. So far, the forum moderators have been pretty fast with the release.

If I understand correct, your avsmeter is build like a traffic-light system? If so, a simple an great tool, congratulations! Under WIN 7 I only had few yellow signs, but it is still not working, an the error under xp...can you point me to a valid mvtools2 plugin maybe?

Cheers

Groucho2004
26th March 2018, 21:09
If I understand correct, your avsmeter is build like a traffic-light system?No.

Under WIN 7 I only had few yellow signs, but it is still not working, an the error under xp...can you point me to a valid mvtools2 plugin maybe?Yellow signs???

Anyway, this (http://avisynth.nl/index.php/QTGMC) page has basically all info you need to get QTGMC() running including up-to-date download links.

hello_hello
27th March 2018, 12:46
Groucho2004, for the installer...yes, I obviously did not read the instructions...pardon!

Well..generally speaking, the problem usually sits in front of the monitor! ;) Sorry for my poor knowledge. Here are the 2 log files, one out of the XP environment, one out of the VM with WIN 7. It would be great if we can solve the problem under XP., otherwise I will make a huffyuv footage and process it in the WIN 7 VM.

You probably need to install the appropriate C++ runtime files. Have a look at the mvtools2 help file, or the mvtools2 Avisynth page. Mvtools2 works fine on XP.

The LSB error is likely due to MVTools2 not loading. QTGMC uses some functions from the SMDegrain and AnimeIVTC scripts, but that shouldn't be the problem if you're loading them. It's probably MVTools2 related..

Groucho2004
27th March 2018, 13:02
@galliano
The log files look OK except this error on XP:
[Plugin errors]
______________________________________________________________________________

Error loading "C:\Program Files\AviSynth\plugins\masktools2.dll":
The volume for a file has been externally altered so that the opened file is no longer valid.
I have never seen that error before. It comes from the OS but I don't know what caused it. Puzzled...

pinterf
27th March 2018, 13:17
This mvtools2.dll is the classic 2.5.11.22 version. lsb parameter exists since 2.6.0.x, you can find the successor of this mvtools branch here: https://github.com/pinterf/mvtools/releases

hello_hello
27th March 2018, 13:38
The setting "Always use the included Avisynth" was already deactivated in MeGui. I activated and deactivated it again, but nothing changed.

If MeGUI is refusing to use the "installed" Avisynth because it's too old, it'll be mentioned in the log file and if that's the case, the setting will have no effect.

If you're updating MeGUI from the "development" server, it'll probably be using a portable version of Avisynth+ (r2636).

Maybe it'd make sense to install Avisynth+ as then MeGUI's portable Avisynth and the installed Avisynth will be the same, and they'll both capable of multithreading. https://github.com/pinterf/AviSynthPlus/releases

galliano
27th March 2018, 19:33
Anyway, this page has basically all info you need to get QTGMC() running including up-to-date download links.


You are bringing me back to my first step...this is exactly what I did at the very beginning, before I asked you guys for help. I downloaded all the scripts and filters from the links of the page http://avisynth.nl/index.php/QTGMC

Today I downloaded masktools and mvtools2 again and...a new version of mvtools2 is available since 4 days, the 2.7.28.

ON WIN XP I installed the Visual C+ 2017 (VC_redist.x86.exe) as prescribed, I definitely missed that, shame on me!

On the VM WIN7, the script is now running.

Under WIN XP the only error message I get now is:

MSDegrain1 does not have an argument "lsb"
QTGMC.avsi, line 650

Attached the new avsmeter log

The previous version of the mvtools2 was the main killer maybe?

Groucho2004, with "traffic light signs" I meant that each output line of the log window shows the version n. either in yellow or green...never mind and sorry for the irrelevant comment.

Groucho2004
27th March 2018, 21:28
Groucho2004, with "traffic light signs" I meant that each output line of the log window shows the version n. either in yellow or greenIf a plugin has version info, the version is displayed in yellow. If the version info is missing, the time stamp is displayed in green. The colours are simply my personal preference.

Groucho2004
28th March 2018, 19:00
Today I downloaded masktools and mvtools2 again and...a new version of mvtools2 is available since 4 days, the 2.7.28.But the new version of MVTools is not in your plugin directory, AVSMeter log still shows 2.5.11.22.

That consequently leads to the error message you're getting:
MSDegrain1 does not have an argument "lsb"
QTGMC.avsi, line 650

Once you manage to copy that new MVTools2.dll to your plugin directory, things should work.

galliano
30th March 2018, 04:58
Yessss, it seems you managed to get the whole running for me, thank you guys! :thanks:

Groucho2004's But the new version of MVTools is not in your plugin directory, AVSMeter log still shows 2.5.11.22."

surprised me as I was 100% sure to have unpacked the files into the directory avisynth\plugins. So I investigated what happened and discovered a weird behaviour during the unzip process. When I unzip the DePan.dll, DePanEstimate.dll and mvtools2.dll, I get a message with 5 lines, e.g.

The compression method in"x64\DePan.dll" is not supported
The compression method in"x64\DePanEstimate.dll" is not supported
etc.

At first I thought it was just a warning, but looking carefully into this I found out, that the files were not really unpacked: the WIN explorer was showing the file name and correct date, but the file was corrupted and the file size was zero. So I unpacked the files in another directory and copied them in a second step to the plugins directory. That worked.

One question about the deinterlaced output. Is it normal, that some teeth are remaining? (see attached screenshot)

This is my script so far:

AviSource("E:\aa.avi")
ConvertToYV12(interlaced=true, matrix="PC.709")
AssumeBFF
QTGMC(Preset="slow")
Blackmanresize(1280, 720)

Alternatively, at line 4 I might use QTGMC(Preset="slow", FPSDivisor=2 ) to obtain a 25fps video

And one question about the resizing...in this tutorial http://www.bubblevision.com/underwater-video/Vegas-YouTube-Vimeo.htm#AviSynth the resizing is done in 2 steps:

1st resize the width
2rd run qtgmc
3rd resize the height

I am instead deinterlacing the footage at first and then resize completely in a second step. What makes more sense in your opinion?

So, summarizing my whole case it turns out that:

- I downloaded the wrong version of AviSynth because the direct link from the website http://avisynth.nl/index.php/Main_Page is linking to an alpha version of avisynth. I needed to look into the tab files at sourgeforge to find the official stable version 2.6.0.

- The plugins mvtools2.dll, DePan.dll DePanEstimate.dll originally did not unzip properly into the avisynth plugins folder. Workaround: unzip them somewhere else and pull them into the plugin folder.

- On my WIN XP, I needed to install Visual Studio 2017. There seems to be no need to install it in WIN 7.

hello_hello
30th March 2018, 08:20
And one question about the resizing...in this tutorial http://www.bubblevision.com/underwater-video/Vegas-YouTube-Vimeo.htm#AviSynth the resizing is done in 2 steps:

If you're downscaling HD it's a way to speed up the process a little, as QTGMC is quite slow. You can't resize the height of interlaced video but you can resize the width, so by resizing the width first, there's less video for QTGMC to de-interlace.
I've done it myself on occasion but I've never compared it to the "normal" way (de-interlace first, resize second) to see if it noticeably effects the quality. If you're downscaling by a fair amount I doubt it would.

If you're not downscaling by a fair amount there's no point resizing in two steps.

By the way, the info in your link says the default QTGMC preset is "medium". That's not correct. The default is "slower". You can confirm that this way:

QTGMC(showsettings=true)

Sharc
30th March 2018, 09:50
One question about the deinterlaced output. Is it normal, that some teeth are remaining? (see attached screenshot)
Not having seen your attachment: It it generally possible, yes, to get some residual combing or edges, but unlikely for QTGMC.
To get advice on such issues it is always recommended to upload a few seconds of the problematic source.

Edit: Ops, the attachment just got approved ....
Your attachment seems to be an upscaled version of your 1280x720 encoded picture. Upscaling introduces its own artefacts....

galliano
30th March 2018, 10:24
I mentioned this it my 1st posting, but this thread has become a bit long to read back the whole story ;) ...I am transforming a DV footage of 720x576i to 1280x720p. The QTGMC "speed" in my script is slow. Actually, if I look at the video in my second computer system Ubuntu x64 and there are almost no teeth, fantastic!...only the XP environment is showing some teeth. It has maybe something to do with the "older" XP video driver. So if this is the only reason, it's fine...I'm going to get rid of XP just after I 'm done with this deinterlace and upscale job ;)