Go Back    Forum > Digital Video > Video Project Help > Restore, Filter, Improve Quality

Reply
 
LinkBack Thread Tools
  #1  
06-17-2024, 07:32 AM
aramkolt aramkolt is offline
Free Member
 
Join Date: Jul 2023
Posts: 388
Thanked 50 Times in 48 Posts
Just started messing with QTGMC via StaxRip and I'm noticing that the Staxrip-reported system load percentages are very low during the encode (usually between 1% and 4%) the whole time. The processor does jump about 10-12 degrees celcius during the encode versus sitting idle, so it appears to be doing something (though that could just be it upping the clock speed during the encode).

My understanding is that QTGMC is not GPU accelerated at all, so I don't think that the GPU really matters if the QTGMC processing is the bottleneck. In the system I'm testing, it has an Nvidia 1660Ti, though using GPU specific formats like NVENC H.264 vs processor based x264 doesn't really affect the overall encode time, I think because QTGMC is the bottleneck and not the actual encode to H.264.

For reference I'm getting about 0.33x processing times, which is to say that a 1 minute file would take about 3 minutes to process. Frames per second depend if the output is 29.97FPS (it'll processes at about 10FPS) vs 59.94PFS (it'll process at about 20FPS).

So my question is, what HARDWARE elements actually matter as far as encoding time reduction when it comes to QTGMC?
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-17-2024, 08:53 AM
Hushpower Hushpower is offline
Free Member
 
Join Date: Apr 2020
Location: Sandgroper country, Australia
Posts: 770
Thanked 138 Times in 131 Posts
The CPU, but more importantly, multithreading. All you need, at the VERY end of your script (dunno about Staxrip, can you add text to the script?) is this:

Prefetch(XX)

where XX is the number of logical processors you have in your CPU. Get that number from Task Manager>Performance>CPU, down the bottom. You may have to adjust it up and down to optimise (or stop crashing).

There's more info in the AVISynth wiki on Multithreading, although I understand that "Setfiltermode" is not required these days as most filters will use the max number of threads set by Prefetch.

FYI, with my i7-13700 and Prefetch set to 24, I get 450% encoding speed from an SD MPEG 2 source file to AVI (QTGMC set to "Fast" and no other options set).
Reply With Quote
  #3  
06-17-2024, 12:40 PM
aramkolt aramkolt is offline
Free Member
 
Join Date: Jul 2023
Posts: 388
Thanked 50 Times in 48 Posts
Definitely think you're onto something there. I did put Prefetch into StaxRip as a filter at the very end and tried a few different values. My Processor is a 9400K which is 6 cores and 6 threads. So I tried Prefetch(4) and Prefetch(6) and both ran at the same slow speeds as before.

Any other ideas on what could be causing that? I saw something on the wiki that all filters individually have to be configured for multithreading for it to work, , but I'm not sure how I'd go about doing that?
Reply With Quote
  #4  
06-17-2024, 01:09 PM
aramkolt aramkolt is offline
Free Member
 
Join Date: Jul 2023
Posts: 388
Thanked 50 Times in 48 Posts
Pulled this from the logs, anything seem off that's not making it really seem to do multithreading appropriately? I see that QTGMC has something called ediThreads which I'm not sure if that affects anything, but it defaults to 8 and I only have 6 threads on this system... I've tried that with fewer and I don't think it seems to do anything different, though I could be using bad combinations maybe?

--------------------------- AviSynth Script ---------------------------

AddAutoloadDir("C:\Users\aramk\OneDrive\Desktop\St axRip-v2.41.0-x64\Apps\FrameServer\AviSynth\plugins")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\AddGrainC\AddGrainC.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\Bwdif\BWDIF.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\DFTTest\dfttest.dll")
Import("C:\Users\aramk\OneDrive\Desktop\StaxRip-v2.41.0-x64\Apps\Plugins\AVS\Dither\dither.avsi")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\Dither\dither.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\EEDI2\EEDI2.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\EEDI3\eedi3.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\JPSDR\Plugins_JPSDR.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\masktools2\masktools2.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\mvtools2\mvtools2.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\NNEDI3CL\nnedi3cl.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\RgTools\RgTools.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\TDeint\TDeint.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\vinverse\vinverse.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\yadifmod2\yadifmod2.dll")
Import("C:\Users\aramk\OneDrive\Desktop\StaxRip-v2.41.0-x64\Apps\Plugins\AVS\Zs_RF_Shared\Zs_RF_Shared.avs i")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\FFT3DFilter\fft3dfilter.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\Dual\FFT3D Neo\neo-fft3d.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\AVS\TMM2\TMM2.dll")
LoadPlugin("C:\Users\aramk\OneDrive\Desktop\StaxRi p-v2.41.0-x64\Apps\Plugins\Dual\L-SMASH-Works\LSMASHSource.dll")
Import("C:\Users\aramk\OneDrive\Desktop\StaxRip-v2.41.0-x64\Apps\Plugins\AVS\QTGMC\QTGMC.avsi")
LSMASHVideoSource("C:\Users\aramk\OneDrive\Desktop \SC1ATK4.mov")
Crop(4, 0, -0, -8)
QTGMC(preset="Medium", InputType=0, sourceMatch=3, sharpness=0.2, tr2=2, ediThreads=8)
ConvertToYUV420()
Prefetch(6)
Reply With Quote
  #5  
06-17-2024, 01:34 PM
aramkolt aramkolt is offline
Free Member
 
Join Date: Jul 2023
Posts: 388
Thanked 50 Times in 48 Posts
One last update, I got rid of the "edithreads" in QTGMC and playing with the Prefetch value does change frames processed per second quite a bit, but it wasn't quite the jump I was expecting - It'll now process about 40FPS for 60FPS content with Prefetch set to "8" which is about double what I had before in terms of speed. It's also odd because this system only has 6 threads. Going below 8 uses less than 70% CPU and going above 8 uses 100% for a modest increase in speed which isn't worth stressing the processor for. I think the peak I saw with any combo was 50FPS.

Is 0.67x speed all I should expect out of the 9400K (9th Gen 6C/6T @2.9GHz), or do you think there's something else that I'm missing? GPU still shows only like 7% load and VE (not sure what that is) indicates something like 4% most of the time.
Reply With Quote
  #6  
06-17-2024, 08:47 PM
Hushpower Hushpower is offline
Free Member
 
Join Date: Apr 2020
Location: Sandgroper country, Australia
Posts: 770
Thanked 138 Times in 131 Posts
Well, I tell a lie. I get a speed increase (another ~25%) if I put in "Set Filter mode" at the start of the script:

SetFilterMTMode ("QTGMC", 2)

So what I read about filters incorporating multithreading wasn't right in this case. My basic script looks like this:

SetFilterMTMode ("QTGMC", 2)
AVISource("I:\Cine\Aerial 04\97 Pilots First bit.avi")
ConvertToYV12(interlaced=true)
AssumeTFF()
QTGMC(preset="Fast", EdiThreads=8)
Prefetch(24)

As for the GPU, both mine (the iGPU770 and the RTX-3060) are totally dormant when running that script.

I found edithreads doesn't make much difference.

Re your speed, it's hard to compare closely because of the many variables (decoding MOVs, denoising by QTGMC) but possibly that's all you're going to get.
Reply With Quote
  #7  
06-20-2024, 11:32 AM
Selur Selur is offline
Free Member
 
Join Date: Feb 2022
Posts: 91
Thanked 22 Times in 20 Posts
Quote:
My understanding is that QTGMC is not GPU accelerated at all,
Depending on the settings KNLMeansCL is used, which uses the gpu
Side note: There is nnedi3cl and eedi3cl for Avisynth too (no clue why nobody added support for these to QTGMC in Avisynth).

Cu Selur
Reply With Quote
The following users thank Selur for this useful post: HiFiVideotape (06-24-2024)
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to improve post-processing for VHS capture? anolegang Restore, Filter, Improve Quality 2 10-21-2020 05:22 PM
Archiving Laserdiscs without any player processing NJRoadfan Capture, Record, Transfer 5 06-15-2018 10:40 AM
How to improve Wi-Fi speed upstairs? M Berson Computers 1 08-03-2016 09:58 AM
Processing photos in Photoshop segen77 Photo Processing, Scanning & Printing 5 11-05-2009 08:08 PM

Thread Tools



 
All times are GMT -5. The time now is 05:08 PM