01-24-2022, 10:17 AM
|
|
Free Member
|
|
Join Date: Jan 2021
Posts: 24
Thanked 0 Times in 0 Posts
|
|
Hello all, I have an issue with QTGMC I am trying to sort out.
After doing some preliminary capture work to get comfortable with the workflow I wanted to multi-thread all of my scripts to reduce run time.
I followed the instructions I could find on how to multi-thread Avisynth but did not really get the anticipated results.
Before multithreading I was getting about 2.4 frames per second, and after multithreading I was still getting 2.4 frames per second.
Best I can tell, QTGMC is the bottleneck here. Its not so much that I expect a massively faster process, but the fact that there appears to be zero difference in fps or CPU utilization makes me suspect that something is wrong with my scripting approach here. Any help greatly appreciated!
Code:
video = AviSource("B:\Videos\Captures\Raw Captures\Cronkike Remembers.avi")
audio = WAVSource ("B:\Videos\Captures\Cronkike Remembers.wav")
AudioDub (video, audio)
# change path statement below to match your suystem
#AviSource("C:\Users\Charles\Videos\Scripts\out2.avi")
SetFilterMTMode("DEFAULT_MT_MODE", 2)
AssumeTFF()
ColorYUV(gain_y=5)
Tweak(cont=1.10,sat = 1.05,dither=true,coring=false)
#Levels(16, 1.0, 255, 16, 250, dither=true, coring=false)
ConvertToYV12(interlaced=true)
QTGMC(Preset="Faster", Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1)
Stab()
Stab()
RemoveGrain(mode=2, modeU=2, modeV=2)
TemporalDegrain2(degrainTR=2)
LSFmod(strength=100, Smode=3, Smethod=2, kernel=11)
Crop(0,0,-16,-16).AddBorders(8,8,8,8)
Prefetch(4)
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
01-25-2022, 05:53 AM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 13,757
Thanked 2,486 Times in 2,114 Posts
|
|
Don't MT the 32-bit Avisynth. Problems, random glitches. Even MT, the 64bit much faster. Use it for this step.
|
The following users thank lordsmurf for this useful post:
MediaHoarder (01-31-2022)
|
01-25-2022, 10:19 AM
|
|
Free Member
|
|
Join Date: Jan 2021
Posts: 24
Thanked 0 Times in 0 Posts
|
|
Thanks lordsmurf. I checked and I do have both a 32 and a 64 bit version in my plugins folder.
I have a script running now, but once that is done I will swap over and see what happens.
|
01-30-2022, 02:05 PM
|
|
Free Member
|
|
Join Date: Feb 2011
Location: France
Posts: 520
Thanked 108 Times in 92 Posts
|
|
Code:
SetMemoryMax(900)
SetMTMode(4,1)
avisource()
QTGMC( Preset="fast", EdiThreads=4)
Selecteven()
that's how i do
|
The following users thank themaster1 for this useful post:
MediaHoarder (01-31-2022)
|
01-31-2022, 11:09 PM
|
|
Free Member
|
|
Join Date: Jan 2021
Posts: 24
Thanked 0 Times in 0 Posts
|
|
Big thanks to both for your suggestions. Here is what I did.
First, I made a backup of the plugins folders from the old install, just in case.
I uninstalled the Avisynth and downloaded Avisynth+ 3.7.1 from the github. (note to Windows users, there is a single installer for both 32 and 64 bit, this initially confused me since MacOS has separate installers and I saw no mention of a 64 bit installer for Windows).
Running the installer, I unchecked 32 bit entirely in the options menu for the time being to keep everything on the 64 bit version.
I then ran the script with the edit themaster1 indicated above. Full script was as follows
Code:
video = AviSource("B:\Videos\Captures\Cronkike Remembers Test2.avi")
audio = WAVSource ("B:\Videos\Captures\Cronkike Remembers Test.wav")
AudioDub (video, audio)
# change path statement below to match your suystem
#AviSource("C:\Users\Charles\Videos\Scripts\out2.avi")
SetFilterMTMode("DEFAULT_MT_MODE", 2)
AssumeTFF()
ColorYUV(gain_y=5)
Tweak(cont=1.10,sat = 1.05,dither=true,coring=false)
#Levels(16, 1.0, 255, 16, 250, dither=true, coring=false)
ConvertToYV12(interlaced=true)
QTGMC(Preset="Faster", Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1, EdiThreads=10)
Stab()
Stab()
RemoveGrain(mode=2, modeU=2, modeV=2)
TemporalDegrain2(degrainTR=2)
LSFmod(strength=100, Smode=3, Smethod=2, kernel=11)
Crop(0,0,-16,-16).AddBorders(8,8,8,8)
Prefetch(10)
Not sure what the "default" behavior is, but with EdiThreads and Prefetch set to 4, I was getting about 2.5 fps, which was similar to my base case with no attempt at MT whatsoever.
Setting both to 10 I had an fps of about 13, which is a significant improvement.
Setting both to 16 I had an fps of about 16, clearly some decreasing marginal returns are at play here.
|
02-01-2022, 04:18 AM
|
|
Free Member
|
|
Join Date: Feb 2011
Location: France
Posts: 520
Thanked 108 Times in 92 Posts
|
|
if the script is simple you can use all your threads, if it's complex (with denoising and seeking frames temporally) it's best to use a little less: say 16 threads cpu capable, use 14 or 15 with edithreads.
|
All times are GMT -5. The time now is 12:19 AM
|