Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th February 2015, 20:13 | #1 | Link |
Registered User
Join Date: Dec 2007
Posts: 20
|
Avisynth/ffmpeg cpu usage 30% or lower
I'm trying to figure out why avisynth/ffmpeg are not using more cpu time. According to task manager, I'm barely getting up to 30%. Memory is fine, about 20% in use. I'm using multithreaded avisynth, with what should be a fairly intense avisynth script that uses qtgmc:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll") SetMTMode(1,8) video=MPEG2Source("C:\Users\Mark\Documents\DVDFab9\Video\BBCDVD3672\arkinspace4.d2v",idct=5,cpu=0,info=3) audio=WAVsource("C:\Users\Mark\Documents\DVDFab9\Video\BBCDVD3672\arkinspace4.wav") AudioDub(video, audio) AssumeTFF() # SetMTMode(2) QTGMC(Preset="Placebo", SourceMatch=3, Lossless=2, EdiThreads=8) Interframe(NewNum=60,NewDen=1,Cores=8) SincResize(788, 576) Crop(10,0,768,576) I've tried a number of SetMTMode parameters without any further cpu usage. I've tried upping the cores/threads to 16, no more cpu usage. I've used ffmpeg with just copy for vcodec and acodec, but get the same result as far as fps encoded, which makes it seem that ffmpeg is not at fault. Or is ffmpeg possibly not using all of the cores/threads? Hardware wise I have an Intel Core i7 4790k, 16Gb Ram, and a Samsung 850 Pro SSD. This is a recent hw build. It seems like there is a bottleneck somewhere that is obviously not cpu limited, but I just don't understand it. Any ideas? |
20th February 2015, 10:00 | #4 | Link |
Registered User
Join Date: Oct 2014
Posts: 476
|
You don't need 64 edithreads.
Have you tried distributor()? I don't know if ffmpeg needs it. (I use megui) Also, do you need Interframe? QTGMC will usually be putting out 60fps. Last edited by kuchikirukia; 20th February 2015 at 10:33. |
20th February 2015, 16:13 | #5 | Link |
Registered User
Join Date: Jan 2014
Posts: 13
|
Some food for thought. Probably not the answer you're looking for but still helpful:
"Important: Always remember to judge the result by looking at the speed improvement not the cpu utilization." http://avisynth.nl/index.php/MT Good luck |
25th February 2015, 10:36 | #6 | Link |
Registered User
Join Date: Dec 2011
Posts: 354
|
This happens to me on this script. When I check a script on AVSMeter CPU usage is 75% and speed is 4.5 fps. But when using ffmpeg it is 25-28% and 1.8 fps.
So I'm dividing my script into 2 parts and encoding same time without using MT. Code:
#1st pass of the rip SetMTMode(3,3) DGDecode_mpeg2source("VTS_01_1.d2v", info=3) SetMTMode(2) qt=qtgmc(sourcematch=3,lossless=2).Selecteven() qt2=qtgmc(preset="very slow",sharpness=0.2).Selecteven() tf8=TFM(blockx=4,blocky=4,slow=2) tf256=TFM(blockx=256,blocky=256,clip2=qt) tf257=TFM(blockx=256,blocky=256,clip2=qt2) TFM() mask=FFImageSource("mask1.png").ConvertToYV12().loop(19000) rf(tf256,1429,1434) rf(tf8,2678,2775) rf(qt2,9144,9147), rf(tf8,9149,9149) rf(tf257,13003,13084) rf(qt,13041,13041) rf(qt,13044,13044) rf(qt,13046,13046) rf(tf8,40430,42393) rf(qt,40652,40652) rf(qt,41790,41790) rf(qt,41896,41896) rf(qt,42030,42031) rf(qt,42035,42036) rf(tf256,42394,43069) TDecimate(mode=1) crop(4,2,-2,0) nnedi3_rpow2(2,cshift="spline36resize") crop(6,0,-6,0) nonlinusm(z=3,pow=1.2,str=0.85,rad=0.6) vmtoonmod(thinning=36,strength=16,xstren=128) Last edited by bxyhxyh; 25th February 2015 at 10:41. |
25th February 2015, 10:54 | #7 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Edit - How are you feeding the script to ffmpeg? Last edited by Groucho2004; 25th February 2015 at 12:44. |
|
26th February 2015, 10:18 | #8 | Link | |
A deadly Taru!
Join Date: Jun 2008
Location: San d'Oria, Vana'diel
Posts: 22
|
Quote:
I think it's depends on the filter you used, In my case, it can use 100% of CPU when my script only calls QTGMC(), no distributor() is needed when piping avs to ffmpeg. But it will only use 25% when i call autoadjust(), i need to add distributor() at the end to make it use 100% CPU and performance gain. I'm runing avisynth and ffmpeg on Linux so this may not suite you.
__________________
Don'taru push me!! |
|
|
|