I really need to speed up the QTGMC process by using multithreading. I've followed all the instructions here, and the instructions in the packages I downloaded, but for some reason it still doesn't work. Here is the script I've been trying:
I'm going to be using x264 to re-encode to a lower bitrate, but after loading the script in MeGUI, it gives me the error "Script error: there is no function named "SetMTMode" (line 4)." What am I doing wrong here?Code:LoadPlugin("C:\program files (x86)\DGMPGDec\DGDecode.dll") LoadCPlugin("C:\Program Files (x86)\Avisynth 2.5\plugins\yadif.dll") SetMemoryMax(1200) SetMTMode(3,8) video=MPEG2Source("S:\Video\Example.d2v") video=video.AssumeTFF() video=video.QTGMC(Preset="Slow", TR2=3, EdiThreads=1) Distributer() video=video.Lanczos4Resize(1280,720) return(video)
+ Reply to Thread
Results 1 to 12 of 12
my two cents:
1. you probably haven't installed the MT Version of Avisynth. -> http://forum.doom9.org/showthread.php?t=148782
2. you should call a SetMode(2) after the loading the source
3. you should move the distributor to the bottom
4. make sure your content is really interlaced, because if it's telecine using QTGMC would be wrong.
5. use a faster QTGMC preset, 'Preset="Slow", TR2=3, EdiThreads=1' looks like overkill to me,..
6. if you are downsizing use bicubic resize since, when downsizing it should not really make a difference to lanczos, and bicubic is faster
(7. if you downsize, FineSharp might be interesting)
here's a small example how I would probably
#loadPlugins personally I use way more subfolders an don't put everything directly in the plugins folder for autoloading LoadPlugin("C:\program files (x86)\DGMPGDec\DGDecode.dll") LoadCPlugin("C:\Program Files (x86)\Avisynth 2.5\plugins\yadif.dll") #load scripts; not necesarry for you since you probably autoload everything #initialize MT SetMemoryMax(1200) SetMTMode(3,8) #load source MPEG2Source("S:\Video\Example.d2v") #switch MT mode for filtering SetMTMode(2) AssumeTFF() QTGMC(Preset="Faster") SelectEven() BicubicResize(1280,720) #output the content distributor() # <- not always needed and recommend depending on the method the script is opened this will square the number of threads used return(last)
Thanks for your help!
If I set the SetMTMode to 3,8 earlier, I don't understand why I would change it to 2 later. As for distributor(), I'll test it with and without to check encoding speed.mode: There are 6 modes 1 to 6. Default value 2.
- Mode 1 is the fastest but only works with a few filter.
- Mode 2 should work with most filters but uses more memory.
- Mode 3 should work with some of the filters that doesn't work with mode 2 but is slower.
- Mode 4 is a combination of mode 2 and 3 and should work with even more filter but is both slower and uses more memory
- Mode 5 is slowest but should work with all filters that don't require linear frameserving (that is the frames come in order (frame 0,1,2 ... last).
- Mode 6 is a modified mode 5 that might be slightly faster.
This thread is a couple of years old but I'm interested in converting 1080i 29.97 framserved file with avisynth MT/QTGMC/MeGUI down to 720P or maybe even less with the highest quality possible, lowest bitrate possible. Based on some tests with other encoders, I can already see that I can be under 1Mb/s and retain the quality. I have an OC'd i7-2600k with 8GB memory. Any suggestions for a script? I don't care about encoding speed, but I do want the resultant H.264 file to be playable on most modern devices of the last few years.....
"Highest quality possible" and "lowest bitrate possible" are mutually exclusive. You're looking for a compromise somewhere in the middle. Only you can judge what is right for you.
Last edited by jagabo; 13th May 2014 at 20:48.
It's definitely interlaced, 60i footage straight from the camera. Ok, well I can certainly set the bitrate myself to whatever I want, that part is easy. As far as presets or settings for QTGMC, is there a typical setup for something similar to a talking head? Clean footage, filmed in a studio, proper lighting.. Just trying to get a starting point.. Should I just select one of the presets offered by QTGMC? From the documentation:
The "Preset" used selects sensible settings for a given encoding speed. Choose a preset from:
"Placebo", "Very Slow", "Slower", "Slow", "Medium", "Fast", "Faster", "Very Fast", "Super Fast", "Ultra Fast", "Draft"
The default preset is "Slower". Don't be obsessed with using slower settings, the differences can be small. In particular HD material benefits less from extreme settings (and will be slow)
For 1080i though, a faster speed preset might be necessary if you don't want each encode to run for days.
QTGMC's de-interlacing tends to remove a bit of noise during the process, but if a video is particularly noisy don't forget QTGMC has it's own noise removal. Once again, I tend to mostly use the default noise filter preset while just specifying an appropriate level of noise removal.
I tried the MT version of Avisynth, but I could never get it 100% stable with QTGMC. It was fine most of the time, but almost every time it wasn't fine, it decided not to be fine while I was away from the PC. After checking a few times and finding hours worth of encoding had been replaced with a "x264 needs to close" error message, or something similar, I went back to single threaded Avisynth.
My way of speeding the process up is to duplicate each script and add Trim to them so each script encodes around half the video. Then I encode them at the same time. It tends to keep the CPU pretty busy without the MT flakiness. If you try it, make sure you add --stitchable to the x264 commandline so you won't have any problem appending the encodes together.
I used to use QTGMC multi-threaded, but I don't remember it ever crashing. However, while I was processing Blackadder I noticed some of the black frames were getting a green tint to them. I stopped using Multithreading and haven't had a problem since. I just process 6 episodes of the same series at a time instead.