Log in

View Full Version : Fresh install.. encoding using VERY low CPU usage..


dothesmash
21st January 2011, 00:34
Hey all. Fresh install of Win 7 64 here on a new 2600k build. Installed Avisynth, ffdshow and have MeGUI up n running. Went to encode a BD rip in basic 2 pass HQ, and noticed I was only getting 30fps on first pass and it was using only 20% of the CPU and only 15 threads.

I noted MeGUI defaulted to using 64 bit x264, so I renamed the target and it used 32 bit to see if it would make a difference. None.

I know this topic has been brought up before, yet could not find a definitive solution. Feel it may be due to some setting, or a decoder being used by the gui?

Thoughts? Thanks in advance!

Sharktooth
22nd January 2011, 16:24
are you using avisynth MT and/or a multithreaded source filter?

dothesmash
23rd January 2011, 02:21
are you using avisynth MT and/or a multithreaded source filter?

Nope.

Sharktooth
23rd January 2011, 03:36
then you should... ;)

dothesmash
23rd January 2011, 04:34
lol.. will try that n post back when I get back home

Sharktooth
23rd January 2011, 14:54
ok. remember also ffms2 that comes with megui is not multithreaded. replace it with the multithreader version if you want more performance out of it.

dothesmash
23rd January 2011, 17:02
OK. I'm at a loss. Think I'm grabbing the right files, and putting them in correctly, but doesn't seem to do much good. MeGUI = not an installer, so installing avisynth mt and ffdshow, etc prior should be a moot point, correct?

I have attempted to follow the following threads to accomplish anything, but still remains the same:

http://forum.doom9.org/showthread.php?t=158456
http://forum.doom9.org/showthread.php?t=152800 and
http://forum.doom9.org/showthread.php?p=1464262#post1464262

not quite sure where I'm going wrong. :/

Sharktooth
24th January 2011, 04:08
post your .avs script

dothesmash
24th January 2011, 14:40
DirectShowSource("E:\EXTRACTED\MOVIE1\F1_T2_Video - .mkv", fps=23.976, audio=false, convertfps=true)
#deinterlace
#crop
#resize
#denoise


let me know

Sharktooth
24th January 2011, 15:27
ok, here's the problem: DirectShowSource.
Try using ffms2 instead.

dothesmash
24th January 2011, 17:01
k.. trying to load the edited script.. error is "there is no function named "ffms2""

Sharktooth
24th January 2011, 17:09
ffmpegsource() ... ensure to load the plugin though.

dothesmash
24th January 2011, 17:52
I'm tryin here lol. "ffmpegsource2 does not have a named argument "fps"

dothesmash
24th January 2011, 17:52
ffmpegsource without the "2" didn't work btw.. in case that matters.

*EDIT*
also at work, so can't play too much with this right now. Just giving you initial errors. Can check into it when I get home if I don't hear from you by then. Thanks in advance!

sneaker_ger
24th January 2011, 23:09
You have to use a numerator and a denominator, for example:
FFVideoSource("video.mkv", fpsnum=24000, fpsden=1001)

If you don't want to do VFR -> CFR or change framerate you can simply omit any fps parameters:
FFVideoSource("video.mkv")

dothesmash
25th January 2011, 00:08
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
FFVideoSource("E:\EXTRACTED\MOVIE\F1_T2_Video - .mkv")
#deinterlace
#crop
#resize
#denoise


This is the basic script.. loading it hung the app for about 2 minutes. then it loaded the preview. Doesn't seem to be using ffdshow and no gain in performance. Let me know if you'd like a remote session or somethin to check it out rather than try troubleshooting heh. Thanks again!!

sneaker_ger
25th January 2011, 02:09
FFVideoSource does not use ffdshow, that is correct. The 2 minutes hang comes from it indexing the whole file prior to the first playback.
Make sure you use the "-mt (http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms2-mt-r411.7z)" version of the plugin to make use of multiple threads.

Sharktooth
25th January 2011, 02:48
the megui development build comes with the -mt version

dothesmash
25th January 2011, 04:07
OK. tried using ffms2-mt-r411. put both in the megui tools dir and avisynth dir.
Latest dev build crashed trying to update with a "could not load file or assembly" error, so I placed files in the original dir.
Loaded up the same avs script, let the index build.
Test encode actually decreased in performance about 6fps :(

dothesmash
25th January 2011, 04:09
actually going to stop with this for the night n spend time with the wife before she kills me. Grateful for any thoughts though. I don't want to have spent all this cash on a build and get nothin out of it ;)

dothesmash
25th January 2011, 23:47
K.. any other thoughts?

dothesmash
26th January 2011, 03:11
Strange thing. If I change the setting in the "Unrestricted 2 pass HQ" config from "2 pass" to "CQ" at 20, the CPU spikes between 90-99% and it's encoding about 16-18fps. Change it to 19 and it does the same at around 14fps or so.. Tested for about 3 min. Never used CQ before, but curious as to what the change could be.. ideas?

dothesmash
11th February 2011, 19:57
Just an update... Imaged the OS and went with 32 bit for now. May go back to 64 in the future. Am now using CQ 18, slow setting and from what I've read is better that 2 pass anyway. Hovers around 15fps and maxes out CPU. Quality looks mighty nice, but there is a jagged line mid screen.. this is probably a vid card issue. Have to investigate further.

This whole process is simply for backups and to watch from the HTPC and to compress enough to stream to other TV's and devices, so it seems this should be a decent solution.

Sharktooth
13th February 2011, 04:17
sorry, no ideas here. it's a very weird behaviour...

dothesmash
17th February 2011, 00:32
is that a decent speed (15fps) for conversion with a 2600k setup at cq 18? or should things be moving swifter?

Admittedly, it is much better than my DC AMD i had previously, but again, would just like to verify..

Sharktooth
17th February 2011, 01:31
it depends on the encoder settings and on the avisynth script.

dothesmash
17th February 2011, 16:51
avs script would just be this:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ffms2.dll")
FFVideoSource("H:\Movie\F1_T2_Video - .mkv")
#deinterlace
#crop
#resize
#denoise


Encoder settings are set to Constant Quality 18, slow.. and tune to film. all other settings are kept as is.

Sharktooth
18th February 2011, 03:21
supposing ffms2 is the mt version, the avisynth scripts is ok.
so, check the CPU usage while encoding, if its around 90/100% then it cant encode faster.

dothesmash
18th February 2011, 03:58
yup.. seems right. works for me vs a 18-20 hour encode.

Sharktooth
18th February 2011, 04:11
a couple of advices. if you're using slow settings and your encoding FPS are relatively low, you can use your GPU for decoding your source (if it's AVC for example) using DGNVTools (it requires a small donation to get a license).
that will free the CPU from the decoding task and will give x264 more CPU cycles for encoding. the result is you get more FPS.
also check the CPU temps, if it's getting too hot (70C or above) it's probably throttled down resulting in slower encoding.

kypec
18th February 2011, 09:51
also check the CPU temps, if it's getting too hot (70C or above) it's probably throttled down resulting in slower encoding.
What utility would you recommend for checking Intel CPU temperatures?

Sharktooth
18th February 2011, 14:23
real temp or core temp.

Tuik
19th February 2011, 18:56
ok, here's the problem: DirectShowSource.
Try using ffms2 instead.

What about DSS2()?

Sharktooth
20th February 2011, 04:09
dss2 is still directshow... hence, weird. you should avoid decoding thru directshow whenever is possible.

Tuik
21st February 2011, 02:18
dss2 is still directshow... hence, weird. you should avoid decoding thru directshow whenever is possible.

Hum, but i found that using DSS2() encodes faster than using FFVideoSource() with ffms2

Should ffms2 be faster?

Sharktooth
21st February 2011, 14:18
it all depends on the directshow decoder installed on your system. if it's hardware accelerated (like CoreAVC for example) it may help encoding by offloading the decoding part on the GPU.
however GPUs have limited hardware decoding capabilities. so out of specs streams wont decode or you speed will be limited by your GPU. in some cases ffms2(-mt) is better, in some other GPU accelerated decoders can help.
the rule of thumb is if you have a fast CPU, GPU accelerated decoders could slow down your encoding process.

Tuik
21st February 2011, 14:28
it all depends on the directshow decoder installed on your system. if it's hardware accelerated (like CoreAVC for example) it may help encoding by offloading the decoding part on the GPU.
however GPUs have limited hardware decoding capabilities. so out of specs streams wont decode or you speed will be limited by your GPU. in some cases ffms2(-mt) is better, in some other GPU accelerated decoders can help.
the rule of thumb is if you have a fast CPU, GPU accelerated decoders could slow down your encoding process.

The GPU is not an issue here because mine is an onboard one. The only thing is processing is the the CPU i7 950 8 threads. And both with FFVideoSource and DSS2 i only get about 40/50% of cpu usage. I tested on a full movie last night (1080p bluray to 720p xvid) and the difference was about 1 fps between dss2 and ffvideosource, dss2 was faster.

Sharktooth
21st February 2011, 14:32
what decoder have you installed for AVC?

Tuik
21st February 2011, 14:49
what decoder have you installed for AVC?

CoreAVC Pro

Sharktooth
21st February 2011, 15:43
CoreAVC is quite a performing decoder. However ffmpeg-mt should be at least on par.

Tuik
21st February 2011, 19:34
CoreAVC is quite a performing decoder. However ffmpeg-mt should be at least on par.

I've already tried ffmpeg-mt (with ffdshow, last rev.) and it show much lower results than CoreAVC, i'm doing something wrong?

Sharktooth
22nd February 2011, 17:32
i think not. eventually, on your system, ffmpeg-mt is slower than coreavc.

Tuik
22nd February 2011, 17:45
i think not. eventually, on your system, ffmpeg-mt is slower than coreavc.

hum, any hint why?

Sharktooth
22nd February 2011, 18:07
nope, sorry

Tuik
22nd February 2011, 18:19
no problem, i will do some more tests