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 4th May 2012, 11:27   #1201  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
Why static titles flicker after QTGMC? This is white text on solid black background, not even text over video.
There is no motion- they should stay exactly as they are, but this is not the case- they "jump" between fields a bit.

Last edited by kolak; 4th May 2012 at 19:49.
kolak is offline  
Old 6th May 2012, 13:18   #1202  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
That's quite hard to explain.

Short answer:
Try adding Rep1=4, Rep2=0 to your settings. This might fix your problem - it might rarely add a tiny bit of motion blur (hard to notice)

Long answer:
The core operation of TGMC is to blend 50% of the current frame with 25% each of the previous & next frames (motion-compensated). That removes all bob-shimmer and helps define the missing field lines. However, it also introduces motion-blur where the motion analysis is incorrect. So there is a repair step that only allows changes that affect thin horizontal areas - because bob-shimmer normally only affects thin horizontal areas. Occasionally there is shimmer that covers a wider area, especially on static detailed things such as text. That shimmer gets through because fixing shimmer in larger areas would potentially create motion blur elsewhere.

There are settings controlling the shimmer repair step: Rep0, Rep1 and Rep2. Rep0 improves the motion search clip only so that isn't so relevant here. Rep1 and Rep2 are alternative ways to repair the output, you set them to a value from 1 to 5 to control the repair strength (it's a bit more complicated but that's the basic idea). The higher you set the value the more shimmer is removed but with the possibility that some motion blur might creep through. Rep1 has a stronger effect than Rep2, but again might let more motion blur through. The defaults are Rep1=0, Rep2=4. I suggest you switch the 4 to the stronger Rep1 and see if that works.

You might wonder why TGMC doesn't just mask static areas and leave them untouched to avoid all this complexity. You can try it yourself:
Code:
qtgmc = QTGMC()
dw = DoubleWeave()
mask = mt_lutxy( dw, dw.SelectEvery(1,1), "x y - abs", U=1,V=1 ).mt_expand(U=1,V=1).mt_binarize(0, U=1,V=1)
mt_merge( dw, qtgmc, mask, luma=true )
That simple script leaves any pixel untouched if it and its 8 neighbors don't change over the nearby fields (could be made more robust by including chroma or more complex masking). It might fix your problem. However, any tiny change within your "static" text pixels, even a change by 1 luma then you'd need to add a threshold. You can change the 0 in the mt_binarize to 1 or 2 to allow slight dissimilarities. But that will start to cause problems in normal footage: occasional pixels will be identified as "static" and will be processed differently to their neighbors - artefacts would show up (in fact rare cases artefacts can show up even with the script as I've written it).

It's very easy to create discontinuities by naive masking during deinterlacing, different algorithms often don't match up perfectly. You see this in other deinterlacers: "this part is combed so do A, this part is not combed so do B". We see the discontinuity between A and B. Softened masks help but blur detail.

On a side note, the other problem with static detail in (Q)TGMC is that is loses too much vertical detail compared to other deinterlacers. Source match was specifically designed to greatly improve static detail. Sadly though it doesn't affect these minor shimmer issues.

Last edited by -Vit-; 6th May 2012 at 13:43.
-Vit- is offline  
Old 6th May 2012, 13:47   #1203  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Good explanation, Vit.

The following idea is years-old, it took only someone to actually ask about shimmer ....

While QTGMC might not be perfectly stable on static features, it is at least fairly stable. With this background, shouldn't the TMM principle be applicable? Take result of QTGMC. Compare temporal variance to local vertical min/max. If temporal variance is smaller than, say, 10%~20% of local min/max, use weave.
__________________
- 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 7th May 2012, 22:00   #1204  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
Thanks Vit- I think I understand it at least in some sense I'm absolutely fine with "other scenes", so I can affect them if needed for a trade of not having this text issue.
I think it appears more on thin, sharp text- once font is bigger/bolder/blurred it's less likely to happen. I also use fast or very fast preset (HD source)- does this have effect on Rep settings?

I will try and report

Last edited by kolak; 7th May 2012 at 22:04.
kolak is offline  
Old 8th May 2012, 11:10   #1205  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
Rep settings did not help.
Your script does help, but of course during fade to credits problem is still present
There is still small flickering happening in some cases (due this luma=0 probably), so I think best way is to process problematic frames separately.
kolak is offline  
Old 8th May 2012, 15:45   #1206  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
On my test material, slightly higher Rep settings worked. Below is a minor tweak to QTGMC that allows Rep0, Rep1 and Rep2 to go up to 7. Try Rep2 or Rep1 = 6 or 7. Risk of blur elsewhere as described above. However, I found those effects inoffensive in my sample.

QTGMC-3.33

There's a couple of other very minor tweaks in there that I never posted, including a fix for a Bob / TFF / BFF problem noted by ajp_anton some time back.

Last edited by -Vit-; 8th May 2012 at 15:51.
-Vit- is offline  
Old 8th May 2012, 16:53   #1207  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
Rep6 seams to fix it, but not on fades.
kolak is offline  
Old 8th May 2012, 17:14   #1208  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
It's possible that your fade is failing because the motion analysis is failing, in which case you would effectively get a NNEDI3 deinterlace, which will certainly shimmer. It's a long shot given that you just have static text over no background, but just in case you could try setting DCT=5, which is more robust to fades.

More likely it's just that larger areas are being affected by the TGMC algorithm due to the fade, so they're not getting through the repair step even at that higher setting.

Last edited by -Vit-; 8th May 2012 at 17:23.
-Vit- is offline  
Old 8th May 2012, 17:19   #1209  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
It's white text on black background fade and I'm using fast preset.
kolak is offline  
Old 8th May 2012, 17:27   #1210  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
I'm not sure why you're telling me that. Just try adding DCT=5 to the QTGMC settings. It will be slower, and I doubt it will work anyway, but might as well try it...
-Vit- is offline  
Old 8th May 2012, 17:32   #1211  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
Just to be clear, so you don't miss something and waste your time
Will try DCT=5.
kolak is offline  
Old 8th May 2012, 17:35   #1212  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 824
@-Vit-
Please upload QTGMC-3.33 to another filehoster.
hotfile.com is giving me some strange messages:
Copyright infringement, blah, deleted by uploader, blah, already downloading, blah blah....
Thanks
Edit: changed the IP on my router and now it works...
Sorry for the hazzle.

Last edited by Taurus; 8th May 2012 at 17:46.
Taurus is offline  
Old 10th May 2012, 00:42   #1213  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
QTGMC 3.33 direct link
SubJunk is offline  
Old 10th May 2012, 10:01   #1214  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: UK
Posts: 2,326
DCT=5 improved things quite a lot- there is only maybe 5% of the previous problems visible.
kolak is offline  
Old 10th May 2012, 11:18   #1215  |  Link
SubJunk
Registered User
 
Join Date: Jun 2010
Posts: 441
Quote:
Originally Posted by kolak View Post
DCT=5 improved things quite a lot- there is only maybe 5% of the previous problems visible.
Yep DCT=5 is essential for MVTools2, it stops the vectors from spazzing out at certain things, especially luma changes like flashlights, headlights, etc.
SubJunk is offline  
Old 10th May 2012, 11:54   #1216  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 989
-Vit-, I have some confusion about "Modded Plugins Package" and "new plugin pack using the updated Avisynth 2.6 interface".

I have seen that some file dates are newer in the first, even if the 2.6 should be the latest pack you released.

If I use AviSynth 2.6 *AND* I do MT, which one should I use?

2nd question: is there any reason why some modded plugin versions are older than the newer "official" release? I.e. the AddGrainC you provide is 1.5.1 while the one I found somewhere is 1.6.1.

P.S: As I suggested in the "color banding" thread, LVVM has added CUDA support. Could be nice to see it implemented.
__________________
@turment on Telegram
tormento is offline  
Old 10th May 2012, 22:44   #1217  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 252
Hello to all,

I come on this forum often and read a lot of very good stuff that helped me a lot, but i'm a noobie when it comes to more complex things and this is my first post here asking for a little specialists help.

I have many footage that i record using Fraps in resolution 960x540 @ 60 FPS in normal mode, not the forced RGB one ( half size on a 1080p screen )

I'm trying to get a very good result while upscaling the videos to 720p but i would need some help especially for the noise and sharpen reduction while using QTGMC if possible, if any of you have suggestions for the best way to upscale from 960x540 to 720p please.

Actually the part of the script regarding the upscale looked like this :
Quote:
spline64resize(1280,1080)
LoadPlugin("C:\Program Files (x86)\MeGUII\tools\avisynth_plugin\FFT3dGPU.dll")
LoadPlugin("C:\Program Files (x86)\MeGUII\tools\avisynth_plugin\gradfun2db.dll")
FFT3DGPU(sigma=1.25).gradfun2db
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\QTGMC-3.32.avsi")
QTGMC( Preset="fast", FPSDivisor=2, EdiThreads=4 )
spline64resize(1280,720)
Recently i started to use the MT version of Avisynth, so FFT3DGPU is over, doesn't work with MT, i spent hours reading various things and trying but to be honest the more i read the more I'm lost

My script was probably wrong used like this but i found this way months ago after testing various things and for now that's was the best results i could get, some things are not very good so I'd like to use more options from QTGMC to get the best possible result using only QTGMC for the upscale and keep the maximum details in the videos.

I use Megui once my script is done to encode the video in x264 ( same here, still trying to find the best optimized settings/ profile for fraps videos, i search and read the more i can but i don't understand everything sadly )

I hope someone can help a little a noobie like me, like i said I read a lot of things here but i'm totally lost with all this now.

Thx guys.
Yanak is offline  
Old 10th May 2012, 23:45   #1218  |  Link
-Vit-
Registered User
 
Join Date: Jul 2010
Posts: 448
kolak: Glad DCT=5 worked. Did you still need the higher Rep value or that extra script I posted to stabilize the sections outside the fade?
___

SubJunk: Thanks for the link. I agree DCT=5 can be useful when there are luma change problems, but I am less convinced in general - it can make some strange choices. I certainly wouldn't say it was essential for QTGMC.
___

cybersharky: I can't tell what your problem is without part of your source video.

___

Tormento: I reverted to an older (original) fftw3.dll because I had previously been using a renamed version the newer libfftw3f-3.dll instead, which is not appropriate given the interface/functionality may not be the same. The old version is used by fft3dfilter, the new one by dfttest. If you don't like using a file from 2004, then your can rename the newer one to copy over the older one - it seems safe enough, but if it makes your cat explode then it's not my problem.
I have been trying to use the latest "official" version of all the plugins. However, you're correct - someone did some new development on AddGrain and I forgot, I'll have a look. MVTools2 and dfttest are a small problem because they are now effectively maintained by cretindesalpes - and I'm not up to date with them. That's because I hope that cretindesalpes will create new-interface-2.6 versions - then I wouldn't have to compile my own versions at all. In any case, you can use either set of plugins, it's up to you. You can even mix them up safely on 2.6MT, for example to use cretindesalpes versions. I hope that we will be able to reduce this dll bloat soon. An official 2.6 beta with the new interface would help.

A new CUDA compiler will not help QTGMC because none of the plugins use CUDA.

___

Yanak: you question is quite general - in fact I'm not exactly sure what the focus of your question is. QTGMC is not a script for upscaling. There are better denoisers than QTGMC, and I don't know what you mean by "sharpen reduction". QTGMC is mainly for deinterlacing (is your footage even interlaced?).
I think you would be better to post a new thread, maybe even in the Newbies forum, because I don't think your answer is specifically to do with QTGMC.

Last edited by -Vit-; 10th May 2012 at 23:49.
-Vit- is offline  
Old 11th May 2012, 00:09   #1219  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 252
Thx for answering -Vit-

In fact i thought that using QTGMC could help having better results when we upscale with noise reduction, sharpen etc, but i guess i'm too noob to have understood correctly.

I will do like you suggested and try to find the newbies section of the forum and see if i can find something that suits my needs there.

Sorry for th dumb question and thanks for your quick answer.
Yanak is offline  
Old 11th May 2012, 05:51   #1220  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Yanak!
Try
Code:
SetmtMode(3,4)
AVISource("yoursorce.avi")
AssumeTFF()
SetmtMode(2,4)
Edibob=source.nnedi3(field=-2,threads=1).nnedi3_rpow2(2,nsize=4,cshift="Spline36Resize",fwidth=1280,fheight=720,threads=1)
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC( Preset="fast", FPSDivisor=2, Ediext=Edibob,EdiThreads=1 )
Resizing before QTGMC give better result, but slower. If You use upsizing after QTGMC you can get shimmer. Nnedi3 also better for upsizing than spline.
Script work with Set 2.6 last build.
yup.
yup 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 18:30.


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