VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. 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:

    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)
    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?
    Quote Quote  
  2. 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
    Code:
    #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)
    Cu Selur
    Quote Quote  
  3. Originally Posted by Selur View Post
    1. you probably haven't installed the MT Version of Avisynth. -> http://forum.doom9.org/showthread.php?t=148782
    Weird. I had done this from that exact page earlier, but it wasn't working. Now it is. I'll take it.

    Originally Posted by Selur View Post
    2. you should call a SetMode(2) after the loading the source
    3. you should move the distributor to the bottom
    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.

    Originally Posted by Selur View Post
    4. make sure your content is really interlaced, because if it's telecine using QTGMC would be wrong.
    Yeah, some of the clips I'm dealing with are 3:2 pulldowns, so I check them before setting up scripts. However, some of them are very strangely encoded, where the order of progressive (P) and interlaced (I) frames is seemingly random, such as PPPIPPIIIIPI... DGIndexNV tells me that it is the standard 3:2 PPPIIPPPII... according to the field/frame order, but when actually seeing the still frame, it has that odd order. So for those I generally remove the pulldown THEN use a deinterlacer (usually Yadif, but now that I have MT QTGMC, I'll go with the higher quality) to make sure there's no interlacing artifacts.

    Originally Posted by Selur View Post
    5. use a faster QTGMC preset, 'Preset="Slow", TR2=3, EdiThreads=1' looks like overkill to me,..
    I'm trying the "faster" preset; getting 8.5fps with MT on my i7 950 @3.06Ghz.

    Originally Posted by Selur View Post
    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)
    I'll try the bicubic, but generally I find that lanczos does a better job even when downsizing. I tried the FineSharp script, but I didn't notice any difference in quality. Thanks though.

    Thanks for your help!
    Quote Quote  
  4. 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.
    see:
    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.
    source: http://avisynth.org/mediawiki/Internal_functions/Multithreading_functions

    Cu Selur
    Quote Quote  
  5. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    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.....
    Quote Quote  
  6. "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 19:48.
    Quote Quote  
  7. 1080i 29.97 framserved file with avisynth MT/QTGMC/MeGUI down to 720P
    just as a side note: make sure your content really is interlaced, using QTGMC on telecined content would be wrong
    Quote Quote  
  8. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    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)
    Quote Quote  
  9. Originally Posted by sdsumike619 View Post
    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)
    That's pretty much all I do for standard definition. As the default speed preset is "slower" I tend to de-interlace with QTGMC like this most of the time:

    QTGMC()

    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.

    QTGMC(EzDenoise=2.0)

    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.
    Quote Quote  
  10. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  11. Member
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    thanks for the input, i'm looking at a trial of TMPGEnc Video Mastering Works 5 as it also uses the x264 encoder
    Quote Quote  
  12. Originally Posted by ndjamena View Post
    I noticed some of the black frames were getting a green tint to them.
    I know Stab() has that problem. Probably caused by a rounding errror in DePan(). If you look at the chroma channels you'll see that they bounce up and down by a unit (with greyscale video they should be flat lines at a constant 128).
    Quote Quote  



Similar Threads