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. |
13th December 2010, 00:19 | #1 | Link |
Registered User
Join Date: Nov 2010
Posts: 33
|
MeGui x264 encode only using 20% of CPU
hello, i just got an i7 950 and i am only getting about 17% usage in one instance but i have ran 5 at once to get it up to ~90%. i would like to know what i can do to get my encodes using MeGui and x264 to get my usage at least 50% per instance. i do have CoreAVC installed, with a nvidia 460, but i am pritty sure it is NOT being used for the decoding and since it was mentioned as one of the possible fixes for a bottleneck in decoding i will mention it. below is the media info of the source, then my avs script for MeGui, and then the MeGui x264 profile settings. now i have tried setting threads to 0(auto) 4, 8, and 16 but it doesn't change a thing.
Code:
General Complete name : D:\Encoding Work\test_video.264 Format : AVC Format/Info : Advanced Video Codec File size : 3.67 GiB Video Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 23.976 fps Resolution : 8 bits Colorimetry : 4:2:0 Scan type : Progressive Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177 Transfer characteristics : BT.709-5, BT.1361 Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177 Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MaskTools.dll") global MeGUI_darx = 16 global MeGUI_dary = 9 LoadPlugin("C:\Program Files (x86)\megui\tools\dgavcindex\DGAVCDecode.dll") AVCSource("D:\Encoding Work\Test.dga") super = MSuper(pel=2, sharp=1) backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4) backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4) forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4) forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4) MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) crop( 2, 2, -2, -2) LanczosResize(1920,1080) # Lanczos (Sharp) Code:
program --preset slow --tune animation --crf 19.0 --chroma-qp-offset 2 --level 4.1 --bframes 3 --ref 4 --slices 4 --aud --nal-hrd vbr --b-pyramid strict --keyint 24 --min-keyint 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --weightp 0 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --output "output" "input" also in another thread it was suggested that i use a multithreaded version of AVISynth but i had no idea what he was talking about and how would that help, if at all? Last edited by Cman21; 13th December 2010 at 00:22. |
13th December 2010, 00:36 | #2 | Link |
Registered User
Join Date: Dec 2005
Posts: 1,460
|
How about you don't crosspost and ask your questions in the other thread?
|
13th December 2010, 00:42 | #3 | Link |
Registered User
Join Date: Nov 2010
Posts: 33
|
ya i moved it to the GUI section due to no knowledge of MeGui, and this is a better location anyway as here people would actually know about the Gui im using and could actually offer advice without having to completely relearn all of this stuff another way. though i am still looking into everything he has suggested im just finding it to be more complicated to integrate without completely restarting than i would like it to be.
|
13th December 2010, 01:05 | #4 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
|
|
13th December 2010, 01:56 | #5 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
the problem is not the gui.
the problem could be the decoder and/or avisynth/avs script (since it's not multithreaded).
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
13th December 2010, 02:07 | #8 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
megui doesnt supply multithreaded avisynth, coz megui doesnt supply avisynth at all. you can install a multithreaded avisynth version BEFORE installing megui AND use the MT modes (see MT avisynth docs) to increase the multithreaded processing efficiency of the avisynth script.
that has to be done manually by editing the script. you can get some references for AVS MT here: http://avisynth.org/mediawiki/MT and, obviously, on the avisynth forum. also have a look here: http://forum.doom9.org/showthread.php?t=153808 (expecially THIS post)
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! Last edited by Sharktooth; 13th December 2010 at 02:12. |
13th December 2010, 02:15 | #9 | Link |
Registered User
Join Date: Nov 2010
Posts: 33
|
ok running this .bat with that aviscript which should be using the x64 and multithreaded avisynth filters gives me a CPU usage of , ya..., ~20% but it is running with a higher fps than before. so the x64 is helping in that area but now im starting to think this might not be a issue with either the programs but maybe my OS or something else limiting me.
Code:
cls @echo off echo. SET ENCODER=C:\Program Files (x86)\MeGui\tools\x264\x264.exe SET SOURCE=D:\Encoding Work\test.avs SET TARGET=D:\Encoding Work\test_1080p.264 SET PASS1="%SOURCE%" --preset slow --tune animation --crf 19.0--level 4.1 --output "%TARGET%" "%ENCODER%" %PASS1% Code:
# Set DAR in encoder to 16 : 9. The following line is for automatic signalling global MeGUI_darx = 16 global MeGUI_dary = 9 LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins64\DirectshowSource.dll") DirectShowSource("D:\Encoding Work\test.mkv") LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins64\mvtools2.dll") super = MSuper(pel=2, sharp=1) backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4) backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4) forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4) forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4) MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) crop( 2, 2, -2, -2) LanczosResize(1920,1080) # Lanczos (Sharp) |
13th December 2010, 02:17 | #10 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
have you installed the MT-masktools?
also, directshowsource will use the default directshow avc decoder you have installed in your system. could you please tell me what it is?
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
13th December 2010, 02:24 | #11 | Link |
Registered User
Join Date: Nov 2010
Posts: 33
|
from SEt's Avisynth 2.5.8 MT compiled for *X86_64*, Latest Build 4/16/2010 is where i got everything i used on this last run. i do like the ~30% increase in performance, in fps, but it is still only 20% of my CPU and i HATE waiting 18 hours on this encode while it only uses 20% of my cpu. oh COOL it is using CoreAVC 2.0 now with CUDA on my 460.
EDIT: im starting to think that it is not x264 but something in windows maybe? is there any way to see how many threads a process has to see if i am actually getting all 12 threads that i should be getting? Last edited by Cman21; 13th December 2010 at 03:11. |
14th December 2010, 02:28 | #12 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
task manager. click on processes then select view menu -> select columns -> select threads -> OK button.
look at the x264 process. also it could be CUDA decoding is not fast enough to feed the input frames to avisynth, so the encoder gets bottlenecked. try with a multithreaded decoder like ffms-mt or libavcodec-mt (included in the latest ffdshow-mt builds)
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
16th December 2010, 00:07 | #13 | Link |
Registered User
Join Date: Nov 2010
Posts: 33
|
ok i looked at that and saw that there where 25 threads involved with x264, which i assume is want i want to see, and i also took a closer look at which cores where being use and i noticed that the first core was around 90% with 3 other cores around 5-10%, with 8 total cores with hyperthreading. could it be that im jut not actually using all my cores for this encode? i do know however when i run a simple encode without the filtering listed above and simply resized the video it ran at full 100%. this is actually starting to annoy me and if i cant figure this out i guess i will just have to deal with it and try to run multiple encodes at the same time to improve cpu utilization.
|
15th July 2014, 19:43 | #15 | Link | |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
|
Quote:
Avisynth is by default single threaded, you need to tell it to use more because x264 is waiting on Avisynth most of the time. One core is busy with Avisynth while the rest are used by x264 and are mostly idle waiting for Avisynth. I also strongly suggest you use Avisynth 2.6 MT instead of 2.5.8. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|