VideoHelp Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. hi, I use sometimes that command in order to deinterlace some dvds.
    QTGMC(Preset="Slow").SelectEven()

    I'm currently using it with the nth dvd but this time it seems the cpu does not 100% loads.

    I've read the instructions here:
    http://avisynth.nl/index.php/QTGMC#Multi-Threaded_Usage
    but I didn't understand it very well...

    I tried to add the "EdiThreads Y", such us like this way:
    QTGMC(Preset="Slow", EdiThreads=8).SelectEven(),
    but it seems nothing change so much. tried with the 4 value too, is the same.

    So maybe there's another command to use in combination with EdiThreads, in order to optimize QTGMC for multithreading.
    Can you please help me?
    Quote Quote  
  2. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Use Prefetch, for example for CPU with 4 cores:

    Code:
    QTGMC(Preset="Slow").SelectEven()
    Prefetch(3)
    Quote Quote  
  3. Details might be helpful.
    What does your complete script look like?
    What resolution has your input?
    What cpu are you using?
    What cpu usage are you seeing?
    What Avisynth version are you using?

    Higher CPU usage doesn't necessarily mean higher processing speed.
    Changing the ediThreads doesn't really do much for me when processing SD content. (anything above 2 even slows down processing, but increases the cpu usage and thread count)
    I for example get ~35fps for QTGMC on NTSC 30fps content using Avisynth++ 64bit . (~50% cpu usage)

    Did you use AVSMeter you check CPU usage, Thread count, fps etc?
    If not, do that. Run it 3 times per setting to get the average usage)

    Cu Selur

    Ps.: as a side note: using Vapoursynth I get ~42-44fps on the same SD content with QTGMC and higher cpu usage.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Originally Posted by Selur View Post
    Details might be helpful.
    What does your complete script look like?
    What resolution has your input?
    What cpu are you using?
    What cpu usage are you seeing?
    What Avisynth version are you using?
    What does your complete script look like?

    complete script:
    Code:
    LoadPlugin("\MeGUI-2913-64\tools\ffms\ffms2.dll")
    FFVideoSource("\title_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1)
    QTGMC(Preset="Slow").SelectEven()
    crop(0, 74, -8, -74)
    FillBorders(0,1,1,0)
    bbmod(2,1,2,2,128,8)

    What resolution has your input?
    It's a PAL 4:3 dvd - 720x576


    What cpu are you using?
    AMD Ryzen 5 3500U - is a mobile apu 4 core, 8 threads


    What cpu usage are you seeing?
    Around 70%


    What Avisynth version are you using?
    it should be this: Avisynth+ 3.7.0


    trying to use that AVSMeter3090...
    Quote Quote  
  5. Like VoodooFX suggested try:
    You can try:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
    LoadPlugin("\MeGUI-2913-64\tools\ffms\ffms2.dll")
    FFVideoSource("\title_t00_track1_[eng].mkv", fpsnum=25, fpsden=1)
    QTGMC(Preset="Slow").SelectEven()
    crop(0, 74, -8, -74)
    FillBorders(0,1,1,0)
    bbmod(2,1,2,2,128,8)
    PreFetch(4)
    return last
    see: http://avisynth.nl/index.php/AviSynth+#Multithreading_.28MT.29_Notes

    Using AVSMeter you can additionally test whether using EdiThreads=2 will help or harm.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  6. just by adding the line
    PreFetch(3) or PreFetch(4)
    at the end of the script, let it works much better, the cpu load is now around 100%. thanks

    so, I no longer have to use that "EdiThreads=Y"?
    what does the prefetch command do in few words?
    it shuould be placed just after the QTGMC line or is the same wherever I put it?
    why the parameter "3" is good for a 4x2 core cpu? is it?
    Quote Quote  
  7. what the prefetch command do in few words?
    ->
    Prefetch (clip, int “threads”, int “frames”)


    clip =

    Input clip.


    int threads =

    Number of threads to use. If it is 0, it passes without doing anything.
    default: (number of logical cores in the system) +1


    int frames =

    Number of frames to prefetch. Again, if it is 0, it passes without doing anything.
    default: threads * 2
    source: http://avisynth.nl/index.php/SetFilterMTMode#Prefetch (I usually use prefetch with the number of physical cores)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. I have already read it, thx!
    anyway also using the command alone with no parameters

    Code:
    Prefetch
    it works good, I presume it used the default value:
    default: (number of logical cores in the system) +1
    that should be 9 in this case.

    so what is the best way to use it with a 4 physical cores and 8 threads cpu?
    Prefetch 3,4,7,8,9?
    Last edited by maudit; 6th Feb 2022 at 08:13.
    Quote Quote  
  9. There is no 'best' way, it always depends on the filters you use and your system.
    -> use AVSMeter to find the setting that best suits your setuo and script.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by maudit View Post
    just by adding the line
    PreFetch(3) or PreFetch(4)
    at the end of the script, let it works much better, the cpu load is now around 100%. thanks

    what does the prefetch command do in few words?
    it shuould be placed just after the QTGMC line or is the same wherever I put it?
    why the parameter "3" is good for a 4x2 core cpu? is it?
    Pefetch enables "MT." You can put it at the very end or you can put it after QTGMC, depends how you want that MT to work. Btw, not all filters are "Prefetch friendly".

    For optimal use you should leave some cores "free" for encoder and other programs.
    Quote Quote  
  11. Originally Posted by VoodooFX View Post
    For optimal use you should leave some cores "free" for encoder and other programs.
    I presume you are meaning "cores" as "physical core" (4-1), and not "cpu threads" (8-1).
    If yes it's ok, I got it. I'll use the Preftech(3) command next to QTGMC or at the spript end, now I see if there are differences or not.

    Thank you both Voodoo and Selur, very much for your quick help.

    I think I'm fine.
    Quote Quote  
  12. Originally Posted by VoodooFX View Post
    I meant virtual cores included.
    ok then, I'll use Prefetch(7) or Prefetch(6).
    thx
    Quote Quote  
  13. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    It all depends from many factors, if you get 100% CPU usage with Prefetch(3), then 3 is enough.
    Quote Quote  
  14. Originally Posted by VoodooFX View Post
    It all depends from many factors, if you get 100% CPU usage with Prefetch(3), then 3 is enough.
    I see, I just finish trying multiple times all the possible combinations:
    Prefetch(3), or 7 or default, in every possible way, at the script end, or next to QTGMC.

    is all almost the same, close to 100% cpu load and close to 2.0ghz.

    I'll use Prefetch(3) next to QTGMC.

    thanks
    Last edited by maudit; 6th Feb 2022 at 12:41.
    Quote Quote  
  15. Originally Posted by maudit View Post
    I'll use Prefect(3) next to QTGMC.
    How many threads gives optimal throughput will also depend on what encoder you are using. When using a CPU based encoder (which looks like what you are doing now) both the encoder and AviSynth will be using CPU time (and threads). But if you switch to using a GPU based encoder prefetch(3) will probably not be enough.
    Quote Quote  
  16. CPU "usage" alone is not necessarily a good metric; you can get CPU thread "thrashing" or wasted cycles. Higher CPU usage does not necessarily mean faster output. You want to look at CPU usage in combination with FPS

    Likely you can make that script slightly faster by applying a vertical mod4 crop before QTGMC (QTGMC is usually the bottleneck, and fewer pixels to process is generally faster)

    Code:
    FFVideoSource("\title_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1)
    crop(0, 72, -8, -72, true)
    QTGMC(Preset="Slow").SelectEven()
    crop(0, 2, 0, -2, true)
    FillBorders(0,1,1,0)
    bbmod(2,1,2,2,128,8)
    prefetch(4)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!