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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st December 2016, 16:15   #221  |  Link
odyssey
Registered User
 
Join Date: Dec 2003
Posts: 155
Quote:
Originally Posted by Groucho2004 View Post
  1. Consider using Avisynth+ instead of SEt's MT. At this stage it's quite stable and tests have shown good results multi-threading QTGMC().
Just got Avisynth+ up and running. I get about 24fps with this script, but apparently with some spare CPU left (not reaching 100%):

SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("DGDecode_mpeg2source", 3)
DGDecode_mpeg2source(...)
AssumeTFF()
ColorMatrix(hints=true, threads=0)
QTGMC(Preset="Slow")
Prefetch(4)

Is it possible to tweak better for performance?
odyssey is offline   Reply With Quote
Old 21st December 2016, 16:32   #222  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by odyssey View Post
Just got Avisynth+ up and running. I get about 24fps with this script, but apparently with some spare CPU left (not reaching 100%):

SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("DGDecode_mpeg2source", 3)
DGDecode_mpeg2source(...)
AssumeTFF()
ColorMatrix(hints=true, threads=0)
QTGMC(Preset="Slow")
Prefetch(4)

Is it possible to tweak better for performance?
Since you have a i7-6700K I'd try a prefetch value of 6 or 8. However, watch the memory consumption of the script. Also, set both "EdiThreads" and "DftThreads" to "1" in QTGMC().

Most importantly, higher CPU usage doesn't necessarily mean better performance and/or efficiency.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 23rd December 2016, 02:46   #223  |  Link
ndjamena
Registered User
 
Join Date: Sep 2012
Posts: 366
For whoever it may concern:

BUG (or at least an inconsistency)

Code:
EdiQual    = (EdiMode == "NNEDI3" && EdiQual > 2 ) ? 2 : EdiQual  # Smaller range for EdiQual in NNEDI3

Code:
(EdiMode == "EEDI3+NNEDI3") ? Input.EEDI3( field=-2, mdis=EdiMaxD, threads=EdiThreads, U=CEed,V=CEed, \
       sclip=Input.NNEDI3( field=-2, nsize=NNSize, nns=NNeurons, qual=EdiQual, threads=EdiThreads, U=CEed,V=CEed ) ) : \
The script fails to check the maximum EdiQual value for NNEDI3 when used with EEDI3.

Last edited by tebasuna51; 21st April 2017 at 12:45.
ndjamena is offline   Reply With Quote
Old 23rd December 2016, 08:16   #224  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,685
Quote:
Originally Posted by ndjamena View Post
For whoever it may concern:

BUG (or at least an inconsistency)

Code:
EdiQual    = (EdiMode == "NNEDI3" && EdiQual > 2 ) ? 2 : EdiQual  # Smaller range for EdiQual in NNEDI3

Code:
(EdiMode == "EEDI3+NNEDI3") ? Input.EEDI3( field=-2, mdis=EdiMaxD, threads=EdiThreads, U=CEed,V=CEed, \
	sclip=Input.NNEDI3( field=-2, nsize=NNSize, nns=NNeurons, qual=EdiQual, threads=EdiThreads, U=CEed,V=CEed ) ) : \
The script fails to check the maximum EdiQual value for NNEDI3 when used with EEDI3.
yes, it is, fix it in my edit
__________________
See My Avisynth Stuff

Last edited by tebasuna51; 21st April 2017 at 12:45.
real.finder is offline   Reply With Quote
Old 28th December 2016, 16:21   #225  |  Link
tsftd
Registered User
 
Join Date: Dec 2011
Posts: 6
OK, so having spent several hours messing around through Google and not being able to get it to work, hopefully someone here can help me.

I'm encoding VHS/Super8 rips of old home movies, and looking to properly deinterlace them, so I'd like to get QTGMC working. I'm using megui (dev updates), and not trying to use multithreading. I've used Megui for years, but haven't really messed around with external filters/plugins before.

My AviSynth Script Creator template looks like:
Code:
SetMemoryMax(1024)
<input>
<crop>
<resize>
QTGMC( Preset="Slow" )
<denoise>
The outputted .avs file is:
Code:
SetMemoryMax(1024)
LoadPlugin("C:\Megui\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\encoding test\test2.avi")
#crop
#resize
QTGMC( Preset="Slow" )
#denoise
Please note that trying to manually load most of the DLLs results in an error -- eg,
Code:
'LoadPlugin("C:\Megui\tools\avs\plugins\SSE2Tools.dll")' gives:
AviSynth script error:
LoadPlugin: unable to load "C:\Megui\tools\avs\plugins\SSE2Tools.dll", Module not found.
Install missing library?
Preview AVS Script in the AviSynth Script Creator yields the error:
Code:
Avisynth script error:
Script error: there is no function named "Interleaved2Planar"
(QTGMC.avsi, line 350)
Trying to run the .avs script in megui yields the error:
Code:
The file C:\encoding test\test2.avi\test2.avs cannot be opened.
Please make sure it's a valid AviSynth script and that AviSynth is properly installed
Error message for your reference: Can't read the video stream
Instructions followed:

From the OP in this thread

From http://avisynth.nl/index.php/QTGMC

Troubleshooting from http://forum.doom9.org/showthread.ph...48#post1485948

Troubleshooting from http://forum.videohelp.com/threads/3...eird-artifacts

Troubleshooting from https://www.vegascreativesoftware.in...-84017/?page=3

etc...

Files in my plugin folder:
Code:
AddGrainC.dll
colors_rgb.avsi
dfttest.dll
DirectShowSource.dll
EEDI2.dll
eedi3.dll
FFT3DFilter.dll
fftw3.dll
libfftw3f-3.dll
masktools2.dll
mvtools2.dll
nnedi.dll
nnedi2.dll
nnedi3.dll
QTGMC.avsi
RemoveGrainSSE2.dll
RepairSSE2.dll
SSE2Tools.dll
SSE3Tools.dll
SSETools.dll
TCPDeliver.dll
TDeint.dll
VerticalCleanerSSE2.dll
yadif.dll
And yes, fftw3.dll and libfftw3f-3.dll are both in the SysWOW64 folder as well.

I am using the built-in avisynth (2.6); I have an external AviSynth with the same plugins in the folder, but the current MeGui doesn't appear to have an option to force usage of the external AviSynth.

And yes, MeGUI works fine if I remove the 'QTGMC( Preset="Slow" )'

Any help would be much appreciated, as I've pretty much exhausted my troubleshooting abilities and will have to settle for standard YADIF if someone here can't help me.
tsftd is offline   Reply With Quote
Old 28th December 2016, 16:51   #226  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 478
Quote:
Originally Posted by tsftd View Post
Please note that trying to manually load most of the DLLs results in an error -- eg,
Code:
'LoadPlugin("C:\Megui\tools\avs\plugins\SSE2Tools.dll")' gives:
AviSynth script error:
LoadPlugin: unable to load "C:\Megui\tools\avs\plugins\SSE2Tools.dll", Module not found.
Install missing library?
Are you sure they're not in avisynth_plugin?

Also you can replace removegrain and repair with rgtools.
kuchikirukia is offline   Reply With Quote
Old 28th December 2016, 17:10   #227  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,410
SSE2tools requires MSVCR71.dll from VS 2003 Dot Net I think. (EDIT not sure about the other versions of SSETools)
see here:- http://forum.doom9.org/showthread.ph...ll#post1781169

EDIT: And you only need one of the SSETools (I'de choose SSE2) in your plugs folder.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 28th December 2016 at 17:14.
StainlessS is offline   Reply With Quote
Old 28th December 2016, 17:35   #228  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by StainlessS View Post
SSE2tools requires MSVCR71.dll from VS 2003 Dot Net I think.
By the way, ricktendo's AIO also installs these DLLs (msv*70.dll, msv*71.dll).
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 28th December 2016, 18:42   #229  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,410
Quote:
Originally Posted by Groucho2004 View Post
By the way, ricktendo's AIO also installs these DLLs (msv*70.dll, msv*71.dll).
oooooOOO, thats new I think.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 28th December 2016, 18:44   #230  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by StainlessS View Post
oooooOOO, thats new I think.
Don't think so. These were included the first time I used it (last year?).
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 28th December 2016, 19:09   #231  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,410
Thank you G2K4, guess I can now get rid of my vs 2002 and vs 2003 suppositories
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 28th December 2016, 20:29   #232  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,439
But, but, but ... they are mostly obsolete since RGTools substitutes the whole "Repair" pack all together.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 28th December 2016, 22:44   #233  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LigH View Post
But, but, but ... they are mostly obsolete since RGTools substitutes the whole "Repair" pack all together.
Of course they are obsolete. People simply don't know that there are newer (and better) versions. Just look at the first post of this thread, it still promotes the use of these outdated plugins and the linked packages also contain them (I'm not blaming Vit, he has not been around for a while).

A sticky in the Avisynth usage forum with the current recommended plugins may be a good idea.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 29th December 2016, 05:20   #234  |  Link
tsftd
Registered User
 
Join Date: Dec 2011
Posts: 6
Solved! Thank everyone for their help, I never would have been able to do it without you!

All msvcr requirements are installed in system.

RemoveGrain & Repair replaced with RGTools

SSE & SSE3 removed (had added as several troubleshooting threads as linked said that they resolved issues for the posters)

Yes, all plugins are in "C:\Megui\tools\avs\plugins"

It has no trouble loading RGTools.dll or QTGMC.avsi, in the same folder.

The original issue is resolved, however now:
Code:
AviSynth script error:
mt_makediff: unsupported colorspace. masktools only support planar YUV colorspaces (YV12, YV16, YV24)
(QTGMC.avsi, line 776)
(QTGMC.avsi, line 386)
Any other ideas?

New config:
Code:
LoadPlugin("C:\Megui\tools\avs\plugins\RgTools.dll")
SetMemoryMax(1024)
<input>
<crop>
<resize>
QTGMC( Preset="Slow" )
<denoise>
Note:
Using Masktools2.dll from http://avisynth.nl/index.php/MaskTools2 (x86 version)
Also tried mt_masktools-25.dll and mt_masktools-26.dll (each time, removing other masktools versions and trying it with only the target in the plugin directory)

Edit:
<SOLVED> via inserting "ConvertToYV12(interlaced=true)" before calling QTGMC:
Code:
LoadPlugin("C:\Temp Programs\Megui\tools\avs\plugins\RgTools.dll")
SetMemoryMax(1024)
<input>
<crop>
<resize>
ConvertToYV12(interlaced=true)
QTGMC( Preset="Slow" )
<denoise>

Last edited by tsftd; 29th December 2016 at 05:44.
tsftd is offline   Reply With Quote
Old 29th December 2016, 10:23   #235  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,439
Oh, you wrote "VHS"; so we should have assumed that your source filter returned YUY2 instead of YV12? Well, yes, QTGMC may support YUY2, but with some quirks. And the latest versions just try to substitute the slower "packed pixel" format YUY2 with the faster "planar" format YV16, available in AviSynth 2.6 or AviSynth+.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 3rd January 2017, 03:47   #236  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
dfttest internal dither instead of ditherpost

I have made some tests and it appears to me that the internal dither of dfttest is significantly faster (~10%) than the construct currently used in version 3.34 with lsb and ditherpost.
Are there any side effects or why isn't it beeing used?
ErazorTT is offline   Reply With Quote
Old 3rd January 2017, 08:26   #237  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,685
Quote:
Originally Posted by ErazorTT View Post
I have made some tests and it appears to me that the internal dither of dfttest is significantly faster (~10%) than the construct currently used in version 3.34 with lsb and ditherpost.
Are there any side effects or why isn't it beeing used?
don't know which QTGMC you use but in my edit if you didn't set lsbd=true then it will work with internal dither
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 3rd January 2017, 08:36   #238  |  Link
ndjamena
Registered User
 
Join Date: Sep 2012
Posts: 366
Ideas:

1: Black and White mode.
There are a bunch of "ignore chroma" settings that all need to be set independently. It would be easier if you could just say it once and have the script itself apply all the necessary settings. Plus, there doesn't seem to be any way of disabling Chroma EDI completely. The lowest setting is "Bob" and for black and white, even that is overkill.

2: Search Presets. It should default to the same as the main preset, but search results can be shared across instances. If you don't write in the exact same settings for each instance of QTGMC the search settings are rejected and the script aborts. If you run something like srestore with an incredibly slow preset for final output and an incredibly fast preset for detection, the motion detection results can't be shared across the two instances without writing in a bunch of manual overrides.
ndjamena is offline   Reply With Quote
Old 4th January 2017, 17:08   #239  |  Link
ErazorTT
Registered User
 
Join Date: Mar 2003
Location: Germany
Posts: 215
Quote:
Originally Posted by real.finder View Post
don't know which QTGMC you use but in my edit if you didn't set lsbd=true then it will work with internal dither
No, setting lsbd=true uses ditherpost, not dfttests internal dither. As can be seen looking at the source of version 3.34 (Line 501):
Code:
dnwindow =    (Denoiser == "dfttest") && (NoiseProcess != 0) && lsbd ? dnWindow.ditherpost(mode=6, U=ChromaNoise?3:2, V=ChromaNoise?3:2, slice=false) : dnWindow
One can see that in case lsbd is true, and thus dfttest outputs a 16bit clip, the clip is dithered using ditherpost and not by using dfttest's internal dither.

What I mean is replacing the following code (starting at line 496):
Code:
dnWindow = (NoiseProcess == 0)      ? NOP() : \
           (Denoiser == "dfttest")  ? noiseWindow.dfttest( Y=true, U=ChromaNoise, V=ChromaNoise, sigma=Sigma*4, tbsize=noiseTD, threads=DftThreads, lsb=lsbd ) : \
        (Denoiser == "KNLMeansCL")  ? KNLMeansCL( lsbd ? noiseWindow.Dither_convert_8_to_16() : noiseWindow, d=NoiseTR, h=Sigma, lsb_inout=lsbd, device_type="GPU") : \
                                      IsYV12(noiseWindow) ? noiseWindow.FFT3DFilter( plane=(ChromaNoise ? 4 : 0), sigma=Sigma, bt=noiseTD ) : \
                                      noiseWindow.ConvertToYUY2().FFT3DFilter( plane=(ChromaNoise ? 4 : 0), sigma=Sigma, bt=noiseTD ).ConvertToYV16()
dnwindow =    (Denoiser == "dfttest") && (NoiseProcess != 0) && lsbd ? dnWindow.ditherpost(mode=6, U=ChromaNoise?3:2, V=ChromaNoise?3:2, slice=false) : dnWindow
dnwindow = (Denoiser == "KNLMeansCL") && (NoiseProcess != 0) && lsbd ? dnWindow.ditherpost(mode=6, U=ChromaNoise?3:2, V=ChromaNoise?3:2, slice=false) : dnWindow
With this:
Code:
dnWindow = (NoiseProcess == 0)      ? NOP() : \
           (Denoiser == "dfttest")  ? noiseWindow.dfttest( Y=true, U=ChromaNoise, V=ChromaNoise, sigma=Sigma*4, tbsize=noiseTD, threads=DftThreads, dither=lsbd ) : \
        (Denoiser == "KNLMeansCL")  ? KNLMeansCL( lsbd ? noiseWindow.Dither_convert_8_to_16() : noiseWindow, d=NoiseTR, h=Sigma, lsb_inout=lsbd, device_type="GPU") : \
                                      IsYV12(noiseWindow) ? noiseWindow.FFT3DFilter( plane=(ChromaNoise ? 4 : 0), sigma=Sigma, bt=noiseTD ) : \
                                      noiseWindow.ConvertToYUY2().FFT3DFilter( plane=(ChromaNoise ? 4 : 0), sigma=Sigma, bt=noiseTD ).ConvertToYV16()
dnwindow =    (Denoiser == "dfttest") && (NoiseProcess != 0) && lsbd ? dnWindow : dnWindow #noop since dithering already done by dfttest internally
dnwindow = (Denoiser == "KNLMeansCL") && (NoiseProcess != 0) && lsbd ? dnWindow.ditherpost(mode=6, U=ChromaNoise?3:2, V=ChromaNoise?3:2, slice=false) : dnWindow
The dithering by dfttest is significantly faster for my system than by ditherpost.
ErazorTT is offline   Reply With Quote
Old 4th January 2017, 17:28   #240  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,439
Quote:
Originally Posted by ErazorTT View Post
No, setting lsbd=true uses ditherpost, not dfttests internal dither.
That was the point of "if you didn't set lsbd=true then it will work with internal dither". Negation.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Reply

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 00:32.


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