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.

 

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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 3rd February 2011, 18:35   #201  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,374
Quote:
Originally Posted by STC-Fan View Post
One other question - I have used QTGMC to output in standard PAL (25) and doubled (50) frame rates, but in the 50 FPS mode the output appears to be choppy, as compared with the smoother 50 FPS output produced by Yadif. I will try and upload some sample video later on to demonstrate this.
Do you have the correct field order? What settings did you use for yadif ?

Try AssumeTFF() preceding QTGMC() if the field order is TFF
poisondeathray is offline  
Old 3rd February 2011, 19:17   #202  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Thank you -Vit-.
I tried this
SetMTMode( 2,4 )
But with this CPU is at 20%. When I do SetMTMode( 2,32)
The CPU cap 100%. Is this possible or im a total noobie.
matfra is offline  
Old 3rd February 2011, 20:04   #203  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
@matfra: Yes you can increase that number, 4 was just an example. I increase that value until my CPU reaches about 97-99%. Going too high can slow things down again.

____

@ajp_anton: I have also been considering how to remove redundant motion analysis from more complex scripts. I would favor a method where different sub-scripts remained separate but were able to share any available data, as this would allow more flexibility (e.g. sharing settings). But there are no good language constructs for that (lots of globals, I suppose...). Merging monster scripts sounds unpleasant, although it might not be so bad in practice.

Last edited by -Vit-; 4th February 2011 at 06:00.
-Vit- is offline  
Old 4th February 2011, 08:28   #204  |  Link
Fullmetal Encoder
Registered User
 
Join Date: Jan 2011
Posts: 107
Quote:
Originally Posted by Didée View Post
The "most important" application IMHO is on SD content, anyway. When SD content is cheaply bob/deinterlaced and viewed on a big screen, then you'll see the downsides from bad deinterlacing in all glory, because the upscale makes everything more objectable.
Yes, I was beginning to reach this conclusion on my own. After all, most of the artifacts in a video should come from what we've done to the video (deinterlacing, resizing, manipulation to address compression artifacts) and shouldn't be in the source, especially since I'm dealing with a Blu-ray. At the encoding stage I'm going to targeting about 1GB per each 22m episode anyway so I should have plenty of bits to throw at x264. Since my last post I've been putting QTGMC through the ropes on some truly nasty SD material with which it's doing wonders. Incidentally, after playing with the settings, I've been able to achieve an average of over 27fps using the "Very Slow" preset on this DVD using this script:

Code:
SetMTMode(2,10)
SetMemoryMax(700)
Import("QTGMC3.0.avsi")
LoadCPlugin("\ffms2-mt-r430-avs64-2.15\ffms2.dll")
FFVideoSource("VTS_01_2 - 1 - MPEG2, 480i60.m2v")
Trim(4034, 7893)
QTGMC(Preset="Very Slow")
This is on a Core i7 860 with 8GB of RAM if anyone is interested.

-Vit-:
I am currently trying to learn how to use FFT3DFilter more effectively to remove artifacts. There are many, many options for FFT3DFilter which are not exposed or explicitly handled by QTGMC, at least as far as my reading of the documentation has revealed. The plugin seems to be called at only 1 line in the QTGMC script. Can I manually edit the script and input those options for testing purposes where FFT3DFilter is called? Or will that in some other way disrupt QTGMC's output? I would like to bend FFT3DFilter to my will as it is run by QTGMC instead of calling it in a separate, second pass after QTGMC has finished with the video. Also, am I correct in thinking that "plane=4" does not at this time allow for any processing in the chroma planes?
Fullmetal Encoder is offline  
Old 4th February 2011, 11:49   #205  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Quote:
Originally Posted by Fullmetal Encoder View Post
I am currently trying to learn how to use FFT3DFilter more effectively to remove artifacts. There are many, many options for FFT3DFilter which are not exposed or explicitly handled by QTGMC, at least as far as my reading of the documentation has revealed. The plugin seems to be called at only 1 line in the QTGMC script. Can I manually edit the script and input those options for testing purposes where FFT3DFilter is called? Or will that in some other way disrupt QTGMC's output? I would like to bend FFT3DFilter to my will as it is run by QTGMC instead of calling it in a separate, second pass after QTGMC has finished with the video. Also, am I correct in thinking that "plane=4" does not at this time allow for any processing in the chroma planes?
Yes, abuse the script as you wish. As you say there is only one line that calls FFT3DFilter and it's not going to affect any other features. Any noise you remove is going to be added back in unless you set the xxxRestore settings to 0 though.

It is only dealing with luma noise at the moment - that's temporary and will change in a later version. It would require a number of changes throughout the script to bypass the chroma noise, but you could remove it by tweaking the FFT3DFilter line.

I toyed with adding more of the FFT3DFilter settings, but QTGMC was not originally supposed to be a denoiser and there are already an excess of settings. However, I now see the importance of treating "noise" correctly when recovering exact detail so I am likely to rework the noise related-settings.

Last edited by -Vit-; 4th February 2011 at 11:51.
-Vit- is offline  
Old 4th February 2011, 13:35   #206  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
I would like to thank you for this script. Its the more useful and managable script ever. I have a last question regarding the SetMTMode(2,4). I assume that QTGMC is working great with SetMTMode(2). I would like to apply a strong denoiser after it. Im looking for a good denoiser that can be run alors in SetMTMode(2). Do you have any suggestion ? Ill post you a script that im using. Can you suggest me something else that can be faster or better or maybe a other way to do it.
Thank you in advance.

AVISource("C:\Users\7\Documents\AvsPmod 2.0.5\VirtualDub-1.9.10\Dub\Templates\1.vdr.avi")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\AA.avs")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\MDegrain5.avs")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\SeeSaw.v0.3e.avs")
ConverttoYV12()
MT("""QTGMC(Preset="fast",EdiMode="nnedi3",tr0=0,tr1=1,tr2=0,rep0=4,rep1=0,rep2=4,sharpness=1.00)""",threads=4, overlap=8)
AssumeTFF()
SelectEven()
MT("""
HDRAGC(avg_lum=0,max_gain=3.0,min_gain=1.2,coef_gain=1.0,max_sat=9.0,min_sat=0.0,coef_sat=1.3,shift=0,shift_u=-10,shift_v=6,protect=0,passes=4,corrector=0.0,reducer=0.0,shadows=false,avg_window=1,response=100,debug=0,freezer=-1)
""",threads=4, overlap=8)
MT("""
source1 = last
sharp1 = source1.Removegrain(2,2).SeeSaw(sLimit=100).mergechroma(source1)
super1 = source1.MSuper(pel=2,sharp=2)
super2 = sharp1.MSuper(pel=2,sharp=2,levels=1)
bvec1 = super1.MAnalyse(isb=true, delta=1,blksize=16, overlap=8)
fvec1 = super1.MAnalyse(isb=false,delta=1,blksize=16, overlap=8)
bvec2 = super1.MAnalyse(isb=true, delta=2,blksize=16, overlap=8)
fvec2 = super1.MAnalyse(isb=false,delta=2,blksize=16, overlap=8)
source1.MDegrain2(super2,bvec1,fvec1,bvec2,fvec2,thSAD=300)
""",threads=4, overlap=8)
MT("""
source2 = last
sharp2 = source2.SeeSaw(sLimit=100).mergechroma(source2).AA()
super3 = source2.MSuper(pel=2,sharp=2)
super4 = sharp2.MSuper(pel=2,sharp=2,levels=1)
bvec3 = super3.MAnalyse(isb=true, delta=1,blksize=16, overlap=8)
fvec3 = super3.MAnalyse(isb=false,delta=1,blksize=16, overlap=8)
bvec4 = super3.MAnalyse(isb=true, delta=2,blksize=16, overlap=8)
fvec4 = super3.MAnalyse(isb=false,delta=2,blksize=16, overlap=8)
source2.MDegrain2(super4,bvec3,fvec3,bvec4,fvec4,thSAD=300)
""",threads=4, overlap=8)
matfra is offline  
Old 4th February 2011, 15:26   #207  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
- You say you are using SetMTMode, but the script you have posted is using MT(...). MT shouldn't be used with QTGMC or MVTools2.
- The settings TR0=0, TR1=1, TR2=0 will be very fast, but will potentially give a very poor motion analysis. What are you trying to achieve with those settings?
- I'll let others comment on alternative denoisers, but you could try setting "TR2=2 "or "TR2=3" in QTGMC. Or instead you could add "NoiseBypass=1, NoiseRestore=0". Or do both.
-Vit- is offline  
Old 4th February 2011, 18:25   #208  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
I know in this script I used MT(). This was my previous script. Im using SetMTMode now. Im terms of QTGMC settings, I was trying to use the fastest as possible, and apply denoising and sharpening after. Maybe you can suggest me other settings I could use instead of this.
QTGMC(Preset="fast",EdiMode="nnedi3",tr0=0,tr1=1,tr2=0,rep0=4,rep1=0,rep2=4,sharpness=1.00)
Also, what other denoising fonction I could use in SetMTMode 2 that is doing a good work. I tried to chain 2x MDegrain2.
Thank you
matfra is offline  
Old 4th February 2011, 23:29   #209  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
As far as the "inherent" denoising of the TGMC-method is concerned ... keep in mind that the repair-settings (rep1, and evenmore rep2) are counteracting with the denoising. They will mostly allow denoising of high-frequencies, but will mostly prohibit denoising of low spatial frequencies. Hence, if you actually want Q/TGMC to (strongly) denoise, set tr2=2 or 3, and set rep2=0.

Then, even when going for "fast" settings, tr0 should always be "1" at least, but never "0". When you set tr0=0, then the whole Q/TGMC thingy starts making no sense anymore. The bare minimum for Q/TGMC to work as intended is tr0=1,tr1=1.

Regarding the last script posted ... seeing you're using SeeSaw+MDegrain, and even two instances of that, I'm not quite sure what is the main preference? The sharpening, or the denoising? In any case, if the SeeSaw-sharpening plays a significant role, then ... rather try to call it with "sootheT=0". Temporal soothing makes not much sense when you combine SeeSaw with mocomp-denoising.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline  
Old 5th February 2011, 07:49   #210  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Hi guys. I did lot of test with your suggestion. I manage to get a very nice output. But I can only run the script without MT. As soon I use MT command, there is strong Ghosting in the clip. I tried many setting but the Ghosting is always there with MT. I get only 4FPS without MT and about 24FPS with MT. Can you inspect my code and tell me if I do something Wrong.
Thank you

SetMTMode(5,0)
SetMemoryMax(400)
AVISource("C:\Users\7\Documents\AvsPmod 2.0.5\VirtualDub-1.9.10\Dub\Templates\1.vdr.avi")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\MDegrain5.avs")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\SeeSaw.v0.3e.avs")
ConverttoYV12()
SetMTMode(2,6)
QTGMC(SourceMatch=2,EdiMode="nnedi3",tr0=2,tr1=0,tr2=3,rep0=0,rep1=0,rep2=0,Sharpness=1.00,MatchEnhance=1.0,NoiseBypass=0, NoiseRemove=1.0, DetailRestore=0.0, NoiseRestore=0.0, Sigma=3, NoiseDeint="generate")
AssumeTFF()
SelectEven()
matfra is offline  
Old 5th February 2011, 10:23   #211  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,731
If you use SetMTMode(5,0), your whole script will utilize the same amount of threads as there are logical or physical CPUs detected. So if you want to use 6 threads, you have to use SetMTMode(5,6).
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is online now  
Old 5th February 2011, 15:22   #212  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
As you have switched off all the rep modes you will likely get unwanted motion effects (your 'ghosting').
-Vit- is offline  
Old 6th February 2011, 02:53   #213  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Line 522:
Code:
	MatchEdi      = EdiMode
This destroys MatchEdi since it's not used before this.
ajp_anton is offline  
Old 6th February 2011, 03:42   #214  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Quote:
Originally Posted by ajp_anton View Post
Bug
Thanks, fixed - it just needed a 'default'. I've taken this opportunity to update the OP to version 3.01, which is a few tweaks and bug-fixes. The changelog:
Code:
# v3.01: Support for lossless modes on InputType=2,3 - improves detail retention
#        Enabling ShowNoise automatically switches on NoiseBypass
#        Bug fixes: "Draft" mode, noise extraction with InputType=1, MatchEdi setting
Only feature addition is support for lossless modes on InputType 2,3. Usual caveats about lossless modes and potential artefacts, but as these are repair modes that can lose detail it actually helps to use lossless (especially Lossless=2 and especially in conjunction with source-match).

Haven't had time to check on the reports of issues with switching off rep modes whilst using lossless.

Last edited by -Vit-; 6th February 2011 at 03:49.
-Vit- is offline  
Old 6th February 2011, 03:54   #215  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
Line 541:
Code:
[...] default( MatchEdi, ((mpNum1 < 9) ?  EdiMode : "Yadif") )
MatchEdi is always defined at this point (the old "line 522", now 527), so the mpNum1 thing is never checked.
ajp_anton is offline  
Old 6th February 2011, 08:58   #216  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
Ack... that's where the 'default' was... Note to self: never do insta-fixes

Well, it won't cause much harm. I'll fix it in the next revision.

Last edited by -Vit-; 6th February 2011 at 09:01.
-Vit- is offline  
Old 6th February 2011, 10:40   #217  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
Quote:
Originally Posted by Boulder View Post
If you use SetMTMode(5,0), your whole script will utilize the same amount of threads as there are logical or physical CPUs detected. So if you want to use 6 threads, you have to use SetMTMode(5,6).
Thank for replying -Vit-

What rep setting should I instead of rep0=0,rep1=0,rep2=0 to prevent the ghosting in multithread script.
Thanks
matfra is offline  
Old 6th February 2011, 11:23   #218  |  Link
matfra
Registered User
 
Join Date: Jul 2009
Posts: 111
I tried all kind of settings. I change the sourcematch to 1,2,3. I tried adding some rep. rep4=0,rep1=0,rep2=4. I even tried exagerated settings rep100=0,rep1=100,rep2=100. There is always some ghosting in the motion as soon its on MT. Any Idea what I can try
matfra is offline  
Old 6th February 2011, 12:09   #219  |  Link
dragon_warrior
Registered User
 
Join Date: May 2010
Posts: 123
Hi
I have a problem: the fps increases dramatically after I applied QTGMC with the clip loaded using DirectShowSource : 29.97 -> 2774.69
Anyway, if I replace DirectShowSource with AVCSource, it doubled, from 29.97 -> 59.94

Any suggestions?

*edit* DGAVCIndex says the frame structure is MBAFF, not TFF or BFF. What script can I put right before QTGMC(..)?

Last edited by dragon_warrior; 6th February 2011 at 14:44.
dragon_warrior is offline  
Old 6th February 2011, 15:14   #220  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,545
dragon_warrior:
If your source is AVC with MBAFF, then you might use DGAVCDecDI (now in version 2025) (15$) + DiAVC Decoder (now in version 1.2.2) (9,99$).
DiAVC 1.2.2 can handle MBAFF properly,
The sourcefilter call is like: DGSource("C:\source.dgi")

Or if you happen to have a recent nVidia Graphics card, then you may use DGDecNV (now in version 2038) (the same 15$ as above)

DGAVCIndex 1.0.9 (now depreciated) relies on an older libavcodec and can not decode MBAFF properly.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 8th February 2011 at 18:39.
Emulgator is offline  
Closed Thread

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 06:31.


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