#1  
01-24-2022, 10:17 AM
MediaHoarder MediaHoarder is offline
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)
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-25-2022, 05:53 AM
lordsmurf's Avatar
lordsmurf lordsmurf is online now
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,503
Thanked 2,449 Times in 2,081 Posts
Don't MT the 32-bit Avisynth. Problems, random glitches. Even MT, the 64bit much faster. Use it for this step.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: MediaHoarder (01-31-2022)
  #3  
01-25-2022, 10:19 AM
MediaHoarder MediaHoarder is offline
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.
Reply With Quote
  #4  
01-30-2022, 02:05 PM
themaster1 themaster1 is offline
Free Member
 
Join Date: Feb 2011
Location: France
Posts: 497
Thanked 99 Times in 83 Posts
Code:
SetMemoryMax(900)
SetMTMode(4,1)
avisource()
QTGMC( Preset="fast", EdiThreads=4)
Selecteven()
that's how i do
Reply With Quote
The following users thank themaster1 for this useful post: MediaHoarder (01-31-2022)
  #5  
01-31-2022, 11:09 PM
MediaHoarder MediaHoarder is offline
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.
Reply With Quote
  #6  
02-01-2022, 04:18 AM
themaster1 themaster1 is offline
Free Member
 
Join Date: Feb 2011
Location: France
Posts: 497
Thanked 99 Times in 83 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.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
QTGMC 3.364 file? jtech1 Restore, Filter, Improve Quality 4 01-18-2022 06:37 AM
Deinterlacing with QTGMC changes to 50p? chrisbati Restore, Filter, Improve Quality 3 04-03-2021 10:18 AM
QTGMC 10Bit Version? latreche34 Restore, Filter, Improve Quality 0 05-06-2020 03:19 AM
QTGMC How-to: Help deinterlacing with Avisynth Joekster Restore, Filter, Improve Quality 1 12-22-2011 04:27 PM

Thread Tools



 
All times are GMT -5. The time now is 09:13 PM