View Full Version : Multi-thread avisynth and MeGUI?
Jumbie
3rd October 2006, 03:20
Hi guys.
Trying MeGUI for the first time today by running a couple of short encodes on some test 1 minute DV clips and was wondering if I have the syntax correct in avisynth because, while I have some very basic experience with avisynth I've just downloaded tsp's wonderful multi-threaded version.
http://forum.doom9.org/showthread.php?t=94996
Not trying anything fancy as you can see below. Just a simple deinterlace.
SetMTMode(2,2)
DirectShowSource("C:\Documents and Settings\*****\Desktop\test.06-10-02_20-12.00.avi",fps=29.97000002997,audio=false)
ConvertToYV12()
LeakKernelDeint(order=0,sharp=true)
#crop
#resize
#denoise
I'm using Sharktooth's modified x264 as well as his profiles (encoding in HQ-Slower with the number of threads set to 2 instead of the apparent default of 1).
My processor is a Core Duo (Yonah) and was figuring that all the speed I could get out of it the better. Just not sure I'm doing it correctly.
Thanks for any feedback/advice.
check
3rd October 2006, 11:38
What sort of CPU usage do you get with --threads 2?
Jumbie
3rd October 2006, 11:42
If memory serves me correctly, I think it was 85% but I'll run an encode later cause I was kind of sleepy when doing it and not positive on that.
I'll compare using 1 thread with 2. I'd done an encode with the default HQ-Slower profile but didn't check the processor load. Then after I tried the same one after changing it to 2 threads and it seemed faster to me.
Jumbie
3rd October 2006, 12:18
Hmmn, just used the default HQ-Slower profile and the 1st past had my CPU at anywhere from 80-90% load encoding the DV clip at about real-time (approximately 29 FPS).
The second pass was around 5.9 FPS and was anywhere from 93-99% CPU load.
This is with Winamp playing in the background and a torrent downloading as well; both of which would be using some CPU.
Looks like it's not necessary to change the threads to 2.
Note: This is using my above avisynth script with SetMTMode(2,2). Don't know if that makes any difference.
check
3rd October 2006, 13:46
The MT mode in the avs script would likely matter little as the script not very CPU intensive.
Your setup is fine, but be aware there is a compression cost when using more than one thread. Chances are this will be unnoticeable, but more than two threads is not recommended.
Jumbie
3rd October 2006, 13:50
Thanks check. I know the script is not very complicated. I was just doing it as a quick test before trying something more intensive like denoising or limitedsharpenfaster.
Will keep in mind what you said about the compression cost. Was not aware of this and, to be honest, not 100% sure what you mean. Are you saying that the video will simply not be as compressible resulting in either:
1. Larger resulting video, or
2. Decreased quality for target file size?
Thanks again.
check
3rd October 2006, 14:14
1. will occur in CQ modes
2. will occur in target bitrate modes
If you have CPU intensive script, consider using --thread-input instead of, or as well as --threads 2. Using --thread-input instead of --threads 2 generally won't work as efficiently, but there will be no compression loss.
Jumbie
3rd October 2006, 14:30
1. will occur in CQ modes
2. will occur in target bitrate modes
Okay. Gotcha. I don't use CQ so not a problem but I'd trade longer encodes for better quality any day. It's not like I have tons of stuff to do.
If you have CPU intensive script, consider using --thread-input instead of, or as well as --threads 2. Using --thread-input instead of --threads 2 generally won't work as efficiently, but there will be no compression loss.
Well no compression loss sounds great but I have to admit that I'm not sure what you mean by using "thread input". Is this something to do with MeGUI, the x264 profile or multi-threaded avisynth?
I'm thinking the last one but, like I said, I just downloaded it and am not overly familiar. I did read the entire thread on the forum but some of it was over my head. Do you mind providing me with an example?
Last question, I promise. I'm sure this is probably getting a bit tedious for you to be "holding my hand" through all of these steps. It's definitely appreciated though.
check
3rd October 2006, 14:40
thread input moves the avisynth into its own thread. I'm reasonably sure it's on by default in MeGUI. You can check by clicking "show commandline" in the MeGUI codec config.
MeGUI questions are always welcome - as long as they aren't in the wiki! :P
Sharktooth
3rd October 2006, 15:02
Yes, it's enabled by default coz it also enables prefetching.
Jumbie
3rd October 2006, 17:18
Thanks guys for the response. Just getting my feel for x264 and MeGUI as my only experience with MP4s previously was via Nero Recode.
@Sharktooth: thanks for your work in development and for your profiles.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.