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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd August 2012, 06:07   #1  |  Link
wsh
BananaBanana
 
Join Date: Aug 2012
Posts: 4
QTGMC and SetMTmode Problem please Help me out

Hello guys
I just started to learn encoding with avisynth, it is very confusing and frustrating but result is very much rewarding.
I'm from Korea so please pardon my inadequate English.
I will just go straight toward my problems.

Source
Non-anime
DVD
NTSC
Interlaced (100% in dgindex, however megui analyse tells me that this source is mostly interlaced, where bring me the big question mark. )
Bottom field first


Computer spec
Intel I5-2500
8 gigabyte of memory
GTX 5600ti Nvidia
Win 7 64 bit (although using 32bit avisynth 2.6 and replaced with 2.6 MT *by sett)

Script
------------------------------------------------------------------
SetMemoryMax (800) ###<-- first start with 1024
SetMtMode(5,12) ###<-- i'm not sure max threads of I5-2500 CPU but when i used 12 threads initial CPU usage was nearly 100%

LoadPlugin("C:\Program Files (x86)\MeGUI_2153_x86\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\VTS_01_1.d2v")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\FastDegrain.avs")

setmtmode(2)
QTGMC( Preset="slower", SourceMatch=3, Lossless=2, Sharpness=0.3, TR2=3,
\NoiseProcess=2, GrainRestore=0.4, NoiseRestore=0.2, Sigma=2,
\NoiseDeint="Generate", StabilizeNoise=true, EdiThreads=6) ######<---edithreads=6 is that correct?

fastdegrain(blksize=16)

lsfmod(defaults="slow")

yahr()
--------------------------------------------------------------------

encoded with megui(10bit version of x264) CFR 19 deblocking(-1,-1)

I don't get any errors but there are several problems.

Beginning part of encoding shows no problem
Processing rate of 13 fps and CPU usage @ 95~100%, estimate time remaining was 5hrs

After 20 mins passed
Processing rate of 8 fps and Cpu usage @ 70~80%

After 1hr passed
Processing rate of 2fps and CPU usage @ 50% , now estimate time remaining is 15hrs...

fps is keep dropping ....

Here are my main questions..

1) Can any one give me an advise how to properly use MtSetMode in this script?

2) Did I choose right de-interlacer? In other words how can I know that my source is pure interlace not blended nor hybrid, since megui said it is mostly interlaced

3) Does QTGMC works fine with Blended or Hybrid source? (Preview images shows that QTGMC is much better than using Yadif, TIVTC or Tdient)

4) Did I do too much denoising and sharpening? (wasn't satisfied with QTGMC degrain, but i'm losing detail with fastdegrain and lsfmod)

Thanks for reading my long and boring question, any help would be greatly appreciated.

============================================================================
PS : This is somewhat irrelevant to previous questions but..
Is this an efficient script?

setmemorymax(1024)
setmtmode(5,12)

LoadPlugin("C:\Program Files (x86)\MeGUI_2153_x86\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\aiai.d2v")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\FastDegrain_mod16.avs")

SetMtmode(2)
Tcomb(mode=0,fthreshl=8,othreshl=8)
MergeChroma(Bifrost(interlaced=true,altclip=LUTDeRainbow()))
QTGMC( Preset="slower", SourceMatch=3, Lossless=2, Sharpness=0.3, TR2=3,
\NoiseProcess=2, GrainRestore=0.4, NoiseRestore=0.2, Sigma=2,
\NoiseDeint="Generate", StabilizeNoise=true, EdiThreads=6)
MergeChroma(awarpsharp2(depth=32))

MCTD(settings="high",shmode=5,strength=1000,enhance=true,dbF ="""FastDegrain(degrain=1,blksize=16).GradFun3(lsb=true, lsb_in=true)""")
SmoothTweak16(saturation=1.5,dither=0)
SmoothLevels16(16, 1.000, 235, 0, 255,limiter=2,smooth=100,Lmode=1,Ecurve=1,dither=100)
ditherpost()
lsfmod(defaults="slow")

Last edited by wsh; 23rd August 2012 at 19:09.
wsh is offline   Reply With Quote
Old 22nd August 2012, 08:08   #2  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
wsh!
Welcome to forum.
You use second parameter for SetMtMode(5,12), why not use for SetMtMode(2,12) before call main filtering part of script?
I find increase speedup for quad core when using SetMtMode(2,7) instead of SetMtMode(2,4) it is also work for new i7 Core I try SetMtMode(2,12) for copmlex preset QTGMC.
See also
http://forum.doom9.org/showthread.ph...47#post1579447
yup.
yup is offline   Reply With Quote
Old 22nd August 2012, 08:17   #3  |  Link
wsh
BananaBanana
 
Join Date: Aug 2012
Posts: 4
Quote:
Originally Posted by yup View Post
wsh!
Welcome to forum.
You use second parameter for SetMtMode(5,12), why not use for SetMtMode(2,12) before call main filtering part of script?
I find increase speedup for quad core when using SetMtMode(2,7) instead of SetMtMode(2,4) it is also work for new i7 Core I try SetMtMode(2,12) for copmlex preset QTGMC.
See also
http://forum.doom9.org/showthread.ph...47#post1579447
yup.
wow Thank you Yup.
I will go try it out !
1.8*(real core #) is the optimal value for setmtmode() right?
again thank you.
wsh is offline   Reply With Quote
Old 22nd August 2012, 09:04   #4  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
As far as I remember, once you set the number of threads (y) at the beginning with setmtmode(x, y), you can't change that value, only the mt mode.

Some food for thought:
Assuming that more CPU usage results in higher performance is often wrong.

You can tune your (MT) script for maximum performance but you have to consider that this uses a lot of you CPU cycles which are taken away from the encoder. Also, the more threads you set, the more memory avisynth will need and the more likely it will crash half way through the encode.

So, just experiment with the number of threads and see which results in the fastest encoding chain.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 22nd August 2012 at 09:18.
Groucho2004 is offline   Reply With Quote
Old 22nd August 2012, 10:21   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by wsh View Post
2) Did I choose right de-interlacer? In other words how can I know that my source is pure interlace not blended nor hybrid, since megui said it is mostly interlaced
The only sure way to tell what you have is by using your eyes. If you still don't know, upload somewhere a 10 second clip taken from the source, one with steady movement.
manono is offline   Reply With Quote
Old 22nd August 2012, 17:23   #6  |  Link
wsh
BananaBanana
 
Join Date: Aug 2012
Posts: 4
Quote:
You can tune your (MT) script for maximum performance but you have to consider that this uses a lot of you CPU cycles which are taken away from the encoder. Also, the more threads you set, the more memory avisynth will need and the more likely it will crash half way through the encode.

So, just experiment with the number of threads and see which results in the fastest encoding chain.
Thank you so much that really helps me to understand how to use mt properly
So basically there is no absolute correct answer. I just have to try it with different values !

Quote:
The only sure way to tell what you have is by using your eyes. If you still don't know, upload somewhere a 10 second clip taken from the source, one with steady movement.
Thank you manono.
I think this movie is pure interlace.

I tried with setmtmode(5,7) and it worked!
Steady @ fps 9.87 not sure that is acceptable speed for my computer's spec but i'm happy
I will try one more time with (2,12) since i grained too much detail.. I got 2 play around bit
Thank you so much guys.
Any suggestion will be greatly appreciated!!!!

Last edited by wsh; 22nd August 2012 at 17:26.
wsh is offline   Reply With Quote
Old 22nd August 2012, 19:13   #7  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Groucho is correct. After the first SetMTMode(5,12) the 12 threads are set and cannot/will not be changed with a later SetMTMode call. So forget about experimenting with SetMTMode(2,xx) later in the script because it will do nothing. Choose the threads in the first SetMTMode(5,x) call and just use SetMTMode(2) later (as you did in the first post).

The number of threads to use for best performance and stability varies greatly depending on source, settings and system. I have used threads from 2 to 19 in different scenarios on the same machine. So you must experiment on your own machine and ignore any advice to use a specific thread value.

Usually you get good performance when CPU usage *just* reaches 100%, so tweak threads to find the lowest thread count that hits 100% (or close like 96%).

Running QTGMC and x264 together is demanding especially for complex settings, HD sources, or 10-bit x264. Sometimes it is a good idea to use two passes, QTGMC->Lossless, then Lossless->x264. MeGUI can do this by checking the "Pre-render Job". It will use ffmpeg to make the lossless file - you should make MeGUI's ffmpeg "Large Address Aware". This is the method taken from the QTGMC thread:
Quote:
- Download this tool to check/set your encoding application as "Large Address Aware". You must point the tool at the exe file of your encoder, e.g. vdub.exe. Be careful since some encoding GUIs call out to other exe files for the actual encoding, for example MeGUI uses x264.exe or ffmpeg.exe from inside its "tools" folder. Some common examples: VirtualDub (vdub.exe) is not large address aware, "ffmpeg.exe" is often not large address aware, "x264.exe" is already large address aware.
By using two passes (and a large address aware encoder), you can increase your SetMemoryMax a little for better stability and you also may be able to increase the thread count. For complex encoding two-pass can be faster, for simpler jobs one-pass may be better.
-Vit- is offline   Reply With Quote
Old 23rd August 2012, 16:16   #8  |  Link
wsh
BananaBanana
 
Join Date: Aug 2012
Posts: 4
Quote:
Originally Posted by -Vit- View Post
Running QTGMC and x264 together is demanding especially for complex settings, HD sources, or 10-bit x264. Sometimes it is a good idea to use two passes, QTGMC->Lossless, then Lossless->x264. MeGUI can do this by checking the "Pre-render Job". It will use ffmpeg to make the lossless file - you should make MeGUI's ffmpeg "Large Address Aware".
Thank you so much Vit, and it is an honor that famous Vit commented on my post!!!

I tried with several different SetMtmode options but encoding speed merely changed, so I decide not to use pre-rendering job.

encoding speed was @ 12fps so I was satisfied.

PS: problem fixed edited.

Last edited by wsh; 23rd August 2012 at 19:08.
wsh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.