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

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th August 2020, 23:44   #41  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by Hacker?pcs View Post
I don't like interlacing, somewhere down the line it must be removed to be able to be viewable on non-TV devices and quality real-time de-interlacing isn't possible (or most people don't even care to be quality one) be it on YouTube, video players or whatever. In the future TVs may not be interlace-combatible at all and that makes the files I make doomed to bad deinterlacing on the fly, besides on all other devices too

Generally I hate it with a passion, it's a relic of the past that unfortunately we have to deal with it and it's a real joke that TV broadcasting continues to this day this idiocy and I'm real glad it stops with 4K, it took way long though
https://nofilmschool.com/2013/07/4k-...mut-frame-rate

TFF is the correct order, BFF produces back-and-forth frames as I've said on the first post and hello_hello says.

You can find a source sample from the capture card in the first post and also the encode with the QTGMC's settings I quote there, no need uploading 5-10 tries I've done throughout the thread
I didn't realize that you had links since you put them inside of a code block in your initial post. Next time, just copy the URL and the forum will make it live, or use the "Insert Link" feature.

I looked at the original and then looked at your initial attempt. I watched the original using VLC and watched it both with deinterlacing turned off as well as with VLC doing YADIF deinterlacing. I watched both clips several times and then looked at some snapshots.

VLC's deinterlaced output looks better than your QTGMC output every single time.

So, my recommendation still stands. If, in the future, there are no players or TVs which deinterlace (an extremely unlikely prediction, given the need to deal with legacy video) you can deinterlace then. In the meantime, you are wasting your time trying to deinterlace, and I stand by my original recommendation that you instead skip it. Your time would be much better spent denoising the source using MDegrain2 or something similar.
johnmeyer is offline   Reply With Quote
Old 11th August 2020, 00:04   #42  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
I definitely won't leave the result interlaced, it's a menace that in the future somebody will have to deal with it, either for editing, play on a PC, bad modern TV deinterlacing, etc

Yadif is inferior, the image just isn't good enough and the motion isn't that good even on 50fps mode

QTGMC Slower-Slower / yadifmod2(order=1, mode=1)



Note that on VLC yadifx2 (double framerate mode) on my sample doesn't recognize TFF and does BFF, ie back-and-forth frames and yadif on VLC is the original fps one which makes the motion choppy

Last edited by Hacker?pcs; 11th August 2020 at 00:40.
Hacker?pcs is offline   Reply With Quote
Old 11th August 2020, 00:23   #43  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
BWDIF Double rate bug just fixed https://github.com/Asd-g/AviSynth-BWDIF

Code:
AVISource("amarec(20200806-1406)_sample.avi")
ConvertToYV16
AssumeTFF
DFMDeRainbow(interlaced=true)
QTGMC(EdiExt=BWDIF(-2),ThSAD1=1500,MatchTR2=2,tr2=2)
https://www.solidfiles.com/v/AB8vB3wGNZX75

not perfect but again it will be better when BWDIF get edeint parameter
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 11th August 2020, 00:46   #44  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Hacker?pcs View Post
Note that on VLC yadifx2 (double framerate mode) on my sample doesn't recognize TFF and does BFF, ie back-and-forth frames and yadif on VLC is the original fps one which makes the motion choppy
that because .avi should be BFF (avi has no info for field order IIRC)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 11th August 2020, 05:33   #45  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by johnmeyer View Post
I looked at the original and then looked at your initial attempt. I watched the original using VLC and watched it both with deinterlacing turned off as well as with VLC doing YADIF deinterlacing. I watched both clips several times and then looked at some snapshots.

VLC's de-interlaced output looks better than your QTGMC output every single time.
VLC doesn't get the field order right.

I used MPC-HC and de-interlaced with fffdshow, because you can force TFF, but even with the field order correct I think Hacker?pcs's original sample looks better than Yadif. There's less aliasing, although SourceMatch caused a little more flickering.

Quote:
Originally Posted by johnmeyer View Post
Your time would be much better spent denoising the source using MDegrain2 or something similar
Do you mean de-noising as QTGMC does, only not de-interlacing at the same time to repair any shimmering and aliasing too? I don't understand.

Personally I don't mind QTGMC's default settings, but I imagine it might look too "smooth" for some people. It gets rid of the noise though, and kills mist of the flickering.
hello_hello is offline   Reply With Quote
Old 12th August 2020, 11:39   #46  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
Quote:
Originally Posted by real.finder View Post
BWDIF Double rate bug just fixed https://github.com/Asd-g/AviSynth-BWDIF

Code:
AVISource("amarec(20200806-1406)_sample.avi")
ConvertToYV16
AssumeTFF
DFMDeRainbow(interlaced=true)
QTGMC(EdiExt=BWDIF(-2),ThSAD1=1500,MatchTR2=2,tr2=2)
https://www.solidfiles.com/v/AB8vB3wGNZX75

not perfect but again it will be better when BWDIF get edeint parameter
This is a nice result, it has some interlacing artifacts on the second cut's letters but the logo flickering is almost gone, image is alright and motion is good.

Here are some tests, and a second sample with the small ball in the big picture motion that seems that Slower/Slower QTGMC doesn't handle well

Sample 2:
https://mega.nz/file/0ygF2ZCD#VYfabW...5CwkMzjPtWYmAQ

1) QTGMC(preset="Slower")
2) QTGMC(preset="Slower").QTGMC(Preset="Medium", InputType=1)
3) QTGMC(preset="Slower").QTGMC(Preset="Slower", InputType=1)
4) QTGMC(EdiExt=BWDIF(-2),ThSAD1=1500,MatchTR2=2,tr2=2)

1)
https://mega.nz/file/p25V3B7I#2sWmhg...vseN325h5CDlGA
https://mega.nz/file/9yoDwDhS#LM-xfw...T0SGPY4Wx4JXAs

2)
https://mega.nz/file/0voFGJQZ#TndhRV...TiW5_DD_8XPsMM
https://mega.nz/file/gihz1TxA#uqXCKR...gkP0rjUVNZrqUQ

3)
https://mega.nz/file/Jyx1GDxb#yGLqdp...nZZtfjlqXwVoBM
https://mega.nz/file/tjwBCJSC#FhDTAc...FLvtT4bFd-8MaA

4)
https://mega.nz/file/MuxxAJJB#uLdObA...z7ZJZIedsHB5Pc
https://mega.nz/file/ov53gR6Z#hFDL7I...HMjwDDesyt6bnI


1 vs 2 vs 3 vs 4
Notes: QTGMC 1 has visible flickering, 2 and 3 progressively removes it. 4 BWDIF has practically no flickering but the logo is a bit "pixelated", lower quality than the others



Note: On QTGMC 1, Α and Δ letters are "jumpy", they are shaking visibly, on 2 and 3 this is progressively fixed. BWDIF 4 doesn't have jumpiness but there are interlacing artifacts



Note: On the second sample I provided on this post, the motion of the moving ball is of concern. On QTGMC 1 it's good enough but on 2 and a lot more on 3 it deteriorates in non-natural way. BWDIF is similar to QTGMC 1



I think the Slower-Medium QTGMC solution for a balance in logo flickering - Ball motion and no interlacing artifacts may be my final choice

Last edited by Hacker?pcs; 12th August 2020 at 11:44.
Hacker?pcs is offline   Reply With Quote
Old 12th August 2020, 16:48   #47  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by johnmeyer View Post
VLC's deinterlaced output looks better than your QTGMC output every single time.
No kidding, you must have some very special VLC build.
Cary Knoop is offline   Reply With Quote
Old 12th August 2020, 21:15   #48  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Hacker?pcs View Post
This is a nice result, it has some interlacing artifacts on the second cut's letters but the logo flickering is almost gone, image is alright and motion is good.
QTGMC(EdiExt=BWDIF(-2),ThSAD1=1500,MatchTR2=2,tr2=2).daa3mod(false)

it's better now

anyway I still wait https://github.com/Asd-g/AviSynth-BWDIF/issues/3
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 12th August 2020, 21:26   #49  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
You need to ask in vapoursynth repo and then it gets ported to avs xD

But it's funny how the life cycle for some plugins are: avs to vs to avs
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 12th August 2020, 21:30   #50  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by ChaosKing View Post
You need to ask in vapoursynth repo and then it gets ported to avs xD

But it's funny how the life cycle for some plugins are: avs to vs to avs
it's good idea but also bad since I am never used vs in my life so how can I tell if the update work? so since you use both then can you do it please?
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th August 2020, 00:56   #51  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
Quote:
Originally Posted by real.finder View Post
QTGMC(EdiExt=BWDIF(-2),ThSAD1=1500,MatchTR2=2,tr2=2).daa3mod(false)

it's better now

anyway I still wait https://github.com/Asd-g/AviSynth-BWDIF/issues/3
That's better, image quality a bit worse I think than QTGMC Slower-Medium but logo flickering is almost gone and ball movement quality on sample 2 is better, similar to QTGMC Slower

QTGMC Slower-Medium / BWDIF try 2 (quoted above)







If BWDIF gets the improvement you ask, will it get even better? Should I wait for it before I start encoding? :P
Hacker?pcs is offline   Reply With Quote
Old 13th August 2020, 01:23   #52  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Hacker?pcs View Post
That's better, image quality a bit worse I think than QTGMC Slower-Medium but logo flickering is almost gone and ball movement quality on sample 2 is better, similar to QTGMC Slower

QTGMC Slower-Medium / BWDIF try 2 (quoted above)







If BWDIF gets the improvement you ask, will it get even better? Should I wait for it before I start encoding? :P
if you have github ID then you can give like to the issue https://github.com/Asd-g/AviSynth-BWDIF/issues/3 so Asd know that I am not alone who want this

and yes it will be better, since BWDIF now act like Bob(0.0, 1.0) for spatial predictions which is very low qualty, when it get edeint it can have the best of nnedi3 (the QTGMC default spatial predictions) and BWDIF itself in the Temporal predictions (which give you the less logo flickering)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th August 2020, 01:50   #53  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
Liked👍
But I guess this needs time to be implemented right? It's not simple to develop?
Hacker?pcs is offline   Reply With Quote
Old 13th August 2020, 02:42   #54  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Hacker?pcs View Post
Liked👍
But I guess this needs time to be implemented right? It's not simple to develop?
I am not a Developer but I think it depend on how the code easy or hard to read, adding edeint itself should not be that hard and not need so much time
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 13th August 2020, 23:02   #55  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
This is what I use and it dealt with the flickering and pixelation just fine, in case it helps:
Code:
QTGMC(tr2=3,preset="very slow",Lossless=1,sourcematch=2,sharpness=0.2,MatchEnhance=0.0,MatchPreset="Slow", MatchPreset2="Slow",border=false)
Dogway is offline   Reply With Quote
Old 14th August 2020, 20:47   #56  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
Quote:
Originally Posted by Dogway View Post
This is what I use and it dealt with the flickering and pixelation just fine, in case it helps:
Code:
QTGMC(tr2=3,preset="very slow",Lossless=1,sourcematch=2,sharpness=0.2,MatchEnhance=0.0,MatchPreset="Slow", MatchPreset2="Slow",border=false)
Flickering is severe with this unfortunately
Hacker?pcs is offline   Reply With Quote
Old 15th August 2020, 20:09   #57  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Maybe worth a try (also read the following post in the QTGMC thread):

Quote:
Originally Posted by kolak View Post
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.
Quote:
Originally Posted by -Vit- View Post
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:

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.
Reel.Deel is offline   Reply With Quote
Old 17th August 2020, 04:48   #58  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 985
Quote:
Originally Posted by Hacker?pcs View Post
About that, how damaging to the video running QTGMC a second time is, over the deinterlaced result of the first run? I mean am I sacrificing too much to fix the flickering?
Also, could I use the two times QTGMC technique as a default for every de-interlacing needed (be it VHS like this, TV, DVDs, whatever) or use it only if I encounter similar problems on the end result?
It will fix more than damage on every SD sourced VHS/TV/DVD, it kinda averages noise/flicker/shimmer temporally and sharpens the image.
"Medium" mode is least blurring in motion areas, I use "Slower" only if there is visible precision problems in stabilization, it looks like a view trough hot air, rarely happens on some scenes, so "Slower" is more precise stabilization but stronger blur in motion areas.
VoodooFX is offline   Reply With Quote
Old 17th August 2020, 05:18   #59  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
The flickering is in the fields, it's not a deinterlace issue.
If you separate the fields you see the red spot popping up in the logo one in every four events on both fields.

Masking (remove a bit of red coloration in a small area in the logo one in every four events) is the solution.

Last edited by Cary Knoop; 17th August 2020 at 05:26.
Cary Knoop is offline   Reply With Quote
Old 17th August 2020, 20:06   #60  |  Link
Hacker?pcs
Registered User
 
Join Date: Aug 2010
Posts: 40
Quote:
Originally Posted by real.finder View Post
if you have github ID then you can give like to the issue https://github.com/Asd-g/AviSynth-BWDIF/issues/3 so Asd know that I am not alone who want this

and yes it will be better, since BWDIF now act like Bob(0.0, 1.0) for spatial predictions which is very low qualty, when it get edeint it can have the best of nnedi3 (the QTGMC default spatial predictions) and BWDIF itself in the Temporal predictions (which give you the less logo flickering)
I can use VS on StaxRip, can you tell me how would you use the edeint parameter to check it out?

Quote:
Originally Posted by Reel.Deel View Post
Maybe worth a try (also read the following post in the QTGMC thread):
Rep1=4, Rep2=0 at 1x Slower doesn't do much difference from 1x Slower by itself, I think it may add a bit of flickering

Quote:
Originally Posted by VoodooFX View Post
It will fix more than damage on every SD sourced VHS/TV/DVD, it kinda averages noise/flicker/shimmer temporally and sharpens the image.
"Medium" mode is least blurring in motion areas, I use "Slower" only if there is visible precision problems in stabilization, it looks like a view trough hot air, rarely happens on some scenes, so "Slower" is more precise stabilization but stronger blur in motion areas.
You are talking about the setting for the second QTGMC pass over the deinterlaced input of QTGMC Slower right?
Quote:
Originally Posted by VoodooFX View Post
QTGMC(preset="Slower").QTGMC(Preset="Medium", InputType=1)

Last edited by Hacker?pcs; 18th August 2020 at 00:32.
Hacker?pcs 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 07:21.


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