VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    I would like to know if I can improve the performance/speed of VirtualDub and AviSynth scripts.

    A typical script I use is something like this:

    Code:
    LoadPlugin("...\MeGUI 2050 x86 - 2011-08-30\tools\dgindex\DGDecode.dll") 
    LoadPlugin("...\MeGUI 2050 x86 - 2011-08-30\tools\avisynth_plugin\ColorMatrix.dll")
    LoadPlugin("...\MeGUI 2050 x86 - 2011-08-30\tools\avisynth_plugin\TIVTC.dll")
    mpeg2source("E:\Clips\Movie.d2v", cpu=4, info=3)
    ColorMatrix(hints=true, interlaced=true, threads=0)
    Bifrost(scenelumathresh=2, interlaced=true)
    TFM(order=1, slow=2, pp=5, clip2=TDeint(mode=2, blim=100, mtnmode=3, type=3))
    TDecimate(hybrid=1)
    Crop(8, 0, -8, -0)
    Spline36Resize(640, 480)
    I'm using VirtualDub 1.8.8 and Avisynth 2.58 for my scripts to convert to huffYUV avi.

    Is there any way to speed up the conversion process? For instance, a change in the script, multithreading, etc.

    I don't think It's my PC that's slowing it down, I have a quad-core with hyperthreading, 16GB RAM, and the hard drives I use for editing are in RAID 0 with a sustained throughput of over 250 MB/s, so I think there must be something else.

    On the other hand, is this simply as fast as the script will run?
    Quote Quote  
  2. Originally Posted by ziggy1971 View Post
    is this simply as fast as the script will run?
    How fast is it running? Mpeg2Source(CPU=4) is pretty slow. Is that a DVD source? An HD source? I don't know about BiFrost() but the rest of the filters are pretty fast. You can try switching to the multithreaded build of AviSynth and using SetMtMode(). What kind of CPU usage are you seeing?
    Quote Quote  
  3. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    I typically get around 50-60 fps and the source is NTSC MPEG-2 video clips. BiFrost() is used to remove some of the rainbowing in the video. My CPU usage rarely goes above 20%, usually sits around 15-17% usage.

    Does it matter which order the filters are in the list? Should I remove the "CPU=4" part of the Mpeg2Source(CPU=4) line? Really, I don't know what it's for anyway, still a noobie here.

    Just so U know, I have a Core i7 2600K and think that it should be much quicker than it is.
    Quote Quote  
  4. Running single threaded on a random NTSC m2v file (i5 2500K, quad core, no HT) I was getting about the same speed as you -- 70 fps. Eliminating TFM() and TDecimate() got the speed up to about 120 fps. Further eliminating CPU=4 got the speed up to 200 fps.

    Running with 4 threads the full script ran about 80 fps. Eliminating TFM() and TDecimate() ran about 220 fps. Further eliminating CPU=4 ran about 440 fps.

    Multithreaded script:

    Code:
    SetMtMode(5,4)
    Mpeg2Source("VTS_01_2.demuxed.d2v", CPU=4, Info=3)
    SetMtMode(2)
    ColorMatrix(hints=true, interlaced=true, threads=0)
    Bifrost(scenelumathresh=2, interlaced=true)
    TFM(order=1, slow=2, pp=5, clip2=TDeint(mode=2, blim=100, mtnmode=3, type=3))
    TDecimate(hybrid=1)
    Crop(8, 0, -8, -0)
    Spline36Resize(640, 480)
    I tried playing around with the number of threads but didn't see much difference with the full script. I guess you're stuck.
    Quote Quote  
  5. Member
    Join Date
    Jan 2007
    Location
    Canada
    Search Comp PM
    Thanx for the script and trying it out yourself for comparison.

    Changing the SetMTMode() variables does make a difference, however on small clips (up to 5 mins.) it's hardly even noticeable. I'm certain that it will improve things on much longer video takes.

    Also, I'm using the integrated graphics on the 2600K, (don't have my new video card yet), so I guess some of the resources are split between encoding and display, for now. Should be interesting when I get the video card and start to OC the system.

    jagabo, are you OCing and at what speed? What video card do you have (if any)?
    Quote Quote  
  6. Originally Posted by ziggy1971 View Post
    are you OCing and at what speed? What video card do you have (if any)?
    I have run the CPU at 4 GHz but I don't routinely overclock. I'm using the built in HD 3000 graphics.
    Quote Quote  



Similar Threads

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