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 16th March 2018, 19:04   #521  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Selur View Post
I also have the color problems with SD sources,... :/
make sure all plugins and the used scripts (like SMDegrain that needed with tv_range=true(Default)) are uptodate
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 16th March 2018, 19:22   #522  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Selur View Post
(UTC)[/code]
Script I used it pretty straight forward:
[code]SetMemoryMax(1536)
SetMTMode(6,16) # changing MT mode
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\LoadDll.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\DGDecodeNV.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\TIVTC.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\AddGrainC.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\dfttest.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\EEDI2.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\eedi3.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\FFT3DFilter.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\mt_masktools-26.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\nnedi.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\nnedi2.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\SSE2Tools.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\TDeint.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\VerticalCleanerSSE2.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\PlanarTools.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\nnedi3.dll")
LoadPlugin("G:\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadCPlugin("G:\Hybrid\32bit\AVISYN~1\yadif.dll")
LoadDll("G:\Hybrid\32bit\AVISYN~1\fftw3.dll")
LoadDll("G:\Hybrid\32bit\AVISYN~1\LIBFFT~1.DLL")
Import("G:\Hybrid\32bit\avisynthPlugins\QTGMC.avsi")
Import("G:\Hybrid\32bit\avisynthPlugins\SMDegrain.avsi")
Import("G:\Hybrid\32bit\avisynthPlugins\AnimeIVTC.avsi")
see the red one above, it's seems very old from it's name, I leave a note in OP for what masktools that needed

edit: and I just test this with mpc

Code:
SetMemoryMax(1536)
SetMTMode(6,16) # changing MT mode
ColorBars(width=640, height=480).converttoyv12()
RequestLinear(rlim=60,clim=60)
# deinterlacing
SetMTMode(2) # changing MT mode
AssumeTFF()
QTGMC(Preset="Placebo", ediThreads=2)
SelectEven()
distributor()
return last
it work but crash later (after reach 4 minutes)

but I didn't expected more with something didn't update for years (avs MT), and with these Threads in 32 process!

edit2:

Code:
SetMemoryMax(1536)
SetMTMode(6,4) # changing MT mode
ColorBars(width=640, height=480).converttoyv12()
RequestLinear(rlim=60,clim=60)
# deinterlacing
SetMTMode(2) # changing MT mode
AssumeTFF()
QTGMC(Preset="Placebo", ediThreads=1)
SelectEven()
distributor()
seems this work with no crash
__________________
See My Avisynth Stuff

Last edited by real.finder; 16th March 2018 at 19:35.
real.finder is offline   Reply With Quote
Old 16th March 2018, 19:38   #523  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Thanks! I totally forgot about that version.
-> That fixed it.
Seeing that SD content with Placebo eats around 1.2GB RAM, the mvtools2 crashs might be due to some memory limit when using HD content.

I also checked my other tool versions.

# MVTools2 (2.7.26 or above)
got: 2.7.26.0
# MaskTools2 (v2.2.7 or above)
got: 2.2.14.0
# NNEDI3 (0.9.4.6 or above)
had: 0.9.4.0, got now: v0.9.4.48 (didn't change color)
# RgTools
got: 0.96.7 from https://github.com/pinterf/RgTools/releases/tag/0.96 but dll reports 0.96.0
# SMDegrain (3.1.2.91s or above) unless you set tv_range=false
got: v3.1.2d from http://www.mediafire.com/file/9kd7d6...n+v.3.1.2d.zip
# AnimeIVTC (2.20 or above) if you work with YUY2 source
got: v2.20 2017-02-09 mod
# NNEDI2, NNEDI, EEDI3, EEDI2, TDeInt - if selected directly or via a source-match preset
got: NNEDI2 v1.6.0.0
got: NNEDI v1.3.0.0
got: EEDI2 v0.9.2.0
got: TDeint v1.1.0.0
# yadifmod2 - for Preset="Ultra Fast" or if selected directly
got: v0.0.4 from https://github.com/chikuzen/yadifmod.../0.0.4%2F0.0.0
# FFT3DFilter - if selected for noise processing
got v2.4.0.0
# dfttest (1.9.4 or above) - if selected for noise processing
got: v1.9.4.0
# KNLMeansCL - if selected for noise processing
got: v1.1.1
# AddGrainC - if NoiseDeint="Generate" selected for noise bypass
got: v1.7.1.0
# chikuzen PlanarTools - if you work with YUY2 source (not necessarily required but may improve speed)
got: v0.3.0

=> Is there a newer SMDegrain version than 3.1.2d? Where can I find it? I thought https://forum.videohelp.com/threads/...ising-Solution was the 'official' home of SMDegrain,..

Cu Selur

Ps.: HD content does work with Placebo and 32bit when limiting the threads to <=4.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 16th March 2018 at 19:52.
Selur is offline   Reply With Quote
Old 16th March 2018, 21:31   #524  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Selur View Post
=> Is there a newer SMDegrain version than 3.1.2d? Where can I find it? I thought https://forum.videohelp.com/threads/...ising-Solution was the 'official' home of SMDegrain,..

Cu Selur

Ps.: HD content does work with Placebo and 32bit when limiting the threads to <=4.
yes there are newer SMDegrain than 3.1.2d, see link in my signature

and for mt things, I just note you didn't use SetMTMode(1) with distributor(), and that will make it slower and maybe more ram needed

and for most tools and encoders (like x264) they don't even need distributor() in first place (they call it internally)

you can see my mod of mpp (mp_pipeline) too, if you still care about non plus avs (as avs mt)

but anyway I recommend last avs+, the mt mode in it is more stable and uptodate than avs mt, and it's recommend whether you use mt or not since it less ram usage and faster in most cases and has many new things, and there are 64 avs+ that can use more than 4G of ram without crash and it's faster than 32 in most cases
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 17th March 2018, 00:02   #525  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanx Real.Finder, your work is much appreciated, we loves you, thanx.
__________________
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 17th March 2018, 07:50   #526  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
SetMTMode(1) with distributor()
SetMTMode(1) usually causes crashs with most filters so I tend to stick with 2+ or higher.
What filters/scripts to you use SetMTMode(1) with?

I gave up on AVS+ a while ago and switched to Vapoursynth instead. I only use Avisynth mainly for some old filters and update and test it for the Hybrid users.

Cu Selur

Ps.: Thanks for the link.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 17th March 2018 at 08:07.
Selur is offline   Reply With Quote
Old 17th March 2018, 23:55   #527  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Selur View Post
SetMTMode(1) usually causes crashs with most filters so I tend to stick with 2+ or higher.
What filters/scripts to you use SetMTMode(1) with?

I gave up on AVS+ a while ago and switched to Vapoursynth instead. I only use Avisynth mainly for some old filters and update and test it for the Hybrid users.

Cu Selur

Ps.: Thanks for the link.
I dont use avs mt. in fact I was use it before inside mpp but without distributor inside mpp block. and since it wasn't supported in mpp so it was do nothing and the speed that I got was from mpp itself since it kinda do some mt work aside from multiprocessing

but anyway, mostly internal core filters work with the mode 1, you can see what work with MT_NICE_FILTER in avs+ since they almost same
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 18th March 2018, 09:05   #528  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by real.finder View Post
I dont use avs mt. in fact I was use it before inside mpp but without distributor inside mpp block. and since it wasn't supported in mpp so it was do nothing and the speed that I got was from mpp itself since it kinda do some mt work aside from multiprocessing

but anyway, mostly internal core filters work with the mode 1, you can see what work with MT_NICE_FILTER in avs+ since they almost same
The versions I am maintaining from mvtools, masktools, rgtools, fft3dfilter are all self-registering themselves with the proper MT mode for Avisynth+. Masktools2, and rgtools are MT_NICE_FILTER the others are MT_MULTI_INSTANCE mostly. These settings which the filters internally report to avs+ are only overwritten when one specifies force=true in SetFilterMtMode.
pinterf is offline   Reply With Quote
Old 18th March 2018, 22:34   #529  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
The versions I am maintaining from mvtools, masktools, rgtools, fft3dfilter are all self-registering themselves with the proper MT mode for Avisynth+. Masktools2, and rgtools are MT_NICE_FILTER the others are MT_MULTI_INSTANCE mostly. These settings which the filters internally report to avs+ are only overwritten when one specifies force=true in SetFilterMtMode.
yeah I already know that, anyway seems you missed some posts cuz Selur take about the mode 1 in old avs 2.6 mt by SEt
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 1st May 2018, 16:39   #530  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
I'm having issues with QTGMC. First, my script:

Code:
SetMemoryMax(1000)
SetMTMode(5, 0)
Import("C:\Program Files (x86)\AviSynth\plugins\QTGMC.avsi")
Import("C:\Program Files (x86)\AviSynth\plugins\SMDegrain_v3.1.2.93s.avsi")
Import("C:\Program Files (x86)\AviSynth\plugins\LimitedSharpenFaster.avs")
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\masktools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\RgTools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\nnedi3.dll")
v=LWLibavVideoSource("J:\01-Miami.mkv") #or DSS2 or LSmashVideoSource
a=NicAC3Source("J:\01-Miami.ac3")
AudioDub(v,a)
ConvertToYV12(interlaced=true)
Trim(140,47315)
AssumeTFF()
Spline64Resize(640,480)
AddBorders(188, 0, 188, 0, color=$000000)
SetMTMode(mode=2)
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=2)
Spline64Resize(1280,720)
I am using it to convert VHS video into 720p video. If I take the above script and attempt to use VirtualDub or MeGUI, the encoding process will work for an indiscriminate amount of time, then crash. The only way I can get this to work is to use MeGUI's 'Add Pre-rendering job' option. Unfortunately, this slows the encoding down from ~30 fps to ~5.

I have tried this on two different computers (both Windows 10) and using DSS2 and LWLibavVideoSource/LSmashVideoSource with no luck. Any idea what might be causing the crashes and why the pre-rendering job option is the only way it works? Thanks.
abyss616 is offline   Reply With Quote
Old 1st May 2018, 16:52   #531  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by abyss616 View Post
I'm having issues with QTGMC. First, my script:

...

I am using it to convert VHS video into 720p video. If I take the above script and attempt to use VirtualDub or MeGUI, the encoding process will work for an indiscriminate amount of time, then crash. The only way I can get this to work is to use MeGUI's 'Add Pre-rendering job' option. Unfortunately, this slows the encoding down from ~30 fps to ~5.

I have tried this on two different computers (both Windows 10) and using DSS2 and LWLibavVideoSource/LSmashVideoSource with no luck. Any idea what might be causing the crashes and why the pre-rendering job option is the only way it works? Thanks.
Many years ago when I first started playing with QTGMC I was not able to find reliable MT settings that could get all the way through an hour long program. I gave up on that. I either run multiple encodes in parallel or make an intermediate "file" splitting the source into 4 equal length pieces with 4 scripts and run those 4 scripts to intermediate lossless AVI files simultaneously and then do the encode from a 5th script that combines the 4 lossless AVI files.

Like this:
Code:
(AVIsource("F:\Temp\TAB_1.avi", audio = false, pixel_type = "YV12") + \
AVIsource("F:\Temp\TAB_2.avi", audio = false, pixel_type = "YV12") + \
AVIsource("F:\Temp\TAB_3.avi", audio = false, pixel_type = "YV12") + \
AVIsource("F:\Temp\TAB_4.avi", audio = false, pixel_type = "YV12"))
It works well enough that I haven't bothered to try to revisit multi-threading QTGMC again.
Stereodude is offline   Reply With Quote
Old 1st May 2018, 16:57   #532  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Quote:
Originally Posted by abyss616 View Post
Any idea what might be causing the crashes and why the pre-rendering job option is the only way it works?
I don't know, probably the settings SetMemoryMax and SetMTMode.
And the order is not the best, I would not put any resize before QTGMC and would do this ;

Code:
(...)
AudioDub(v,a)
AssumeTFF()
Trim(140,47315)
ConvertToYV12(interlaced=true)
SetMTMode(mode=2)
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=2)
Spline64Resize(960,720)
AddBorders(160, 0, 160, 0, color=$000000)
Music Fan is offline   Reply With Quote
Old 1st May 2018, 21:46   #533  |  Link
Logan9778
Registered User
 
Join Date: Mar 2017
Posts: 118
Well, I'm still just a noob at all this, but I have worked with about a dozen PAL videos now using QTGMC, and this multicore script has always worked well for me. At times it has run for MANY hours de-interlacing PAL video.

Code:
LoadPlugin("C:\DGDecNV2053\DGDecodeNV.dll")
SetWorkingDir("C:\Program Files (x86)\AviSynth\plugins")
SetMTMode(5,6)
DGSource("F:\Test Space\Disney Rarities\title00.dgi")
SetMTMode(2)
QTGMC(FPSDivisor=1,Preset="Placebo",Edithreads=4)
Crop(8,2,-8,-2)
SetMTMode(5,6) and Edithreads=4 are the numbers you want to play with to try to get it right with your machine.
Logan9778 is offline   Reply With Quote
Old 2nd May 2018, 16:29   #534  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Stereodude View Post
Many years ago when I first started playing with QTGMC I was not able to find reliable MT settings that could get all the way through an hour long program. I gave up on that. I either run multiple encodes in parallel or make an intermediate "file" splitting the source into 4 equal length pieces with 4 scripts and run those 4 scripts to intermediate lossless AVI files simultaneously and then do the encode from a 5th script that combines the 4 lossless AVI files.
I do the same, only without the intermediate files.
If you split an encode into "parts" by adding Trim() to copies of a script, so each copy encodes a different section of the video, you can append the encoded sections with MKVToolNix easily enough, as long as you add --stitchable to the x264 command line.
I don't aim for a particular file size or use 2 pass encoding though. If you do then you'd have to eventually encode the entire video as a whole.
hello_hello is offline   Reply With Quote
Old 2nd May 2018, 17:19   #535  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
I think the problem is that you are still using "old" MT implementation + 32 bit version of AviSynth. (2GiB memory limit)
QTGMC works fine in AviSynth+ MT x64.

Last edited by Atak_Snajpera; 2nd May 2018 at 17:23.
Atak_Snajpera is offline   Reply With Quote
Old 2nd May 2018, 17:37   #536  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
Quote:
Originally Posted by Atak_Snajpera View Post
I think the problem is that you are still using "old" MT implementation + 32 bit version of AviSynth. (2GiB memory limit)
QTGMC works fine in AviSynth+ MT x64.
Mega +1 to this. This fixed all of my problems and I mostly work with HD footage that eats way at my ram and my time.
Gser is offline   Reply With Quote
Old 2nd May 2018, 17:58   #537  |  Link
abyss616
Registered User
 
Join Date: Dec 2008
Posts: 99
Quote:
Originally Posted by Music Fan View Post
I don't know, probably the settings SetMemoryMax and SetMTMode.
And the order is not the best, I would not put any resize before QTGMC and would do this ;

Code:
(...)
AudioDub(v,a)
AssumeTFF()
Trim(140,47315)
ConvertToYV12(interlaced=true)
SetMTMode(mode=2)
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=2)
Spline64Resize(960,720)
AddBorders(160, 0, 160, 0, color=$000000)
Thank you for this - just reordering the commands in the script sped up the encoding process by about 2 fps.

I'll give AVS+ a try and see what happens.
abyss616 is offline   Reply With Quote
Old 2nd May 2018, 18:39   #538  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by abyss616 View Post
Thank you for this - just reordering the commands in the script sped up the encoding process by about 2 fps.

I'll give AVS+ a try and see what happens.
For best performance limit Prefetch value to number of physical cores.
Atak_Snajpera is offline   Reply With Quote
Old 5th June 2018, 11:05   #539  |  Link
heartagram
Registered User
 
Join Date: May 2018
Posts: 9
can qtgmc deinterlace this?

can you give me a simple script to deinterlace this video?
Attached Images
 
heartagram is offline   Reply With Quote
Old 5th June 2018, 11:14   #540  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
No.

1. Analysing the interlacing attributes requires a video clip (preferably with steady horizontal motion) of at least a second duration, not just one single frame.
2. Attachments in this forum have to be approved by a moderator which takes time. Better use an external file hoster.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 5th June 2018 at 11:17.
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 11:23.


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