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. |
![]() |
#61 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
Source Filter means, a way to open your video file.
For example, va=DirectShowSource("music video.mpg") You don't actually need all of his script. For example, I believe the purpose of the SmoothFilter line was just to make the video look better. The main line to remove dot crawl could just be a quiver command. I don't know what he meant by EmuFFT. Perhaps you can work on another project until you get a reply in some days. |
![]() |
![]() |
![]() |
#62 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,393
|
How do you make a fishing net? -- Take ninety-thousand holes, and knot them together.
![]() Code:
# Required plugins: # ----------------- # dgdecode.dll # TIVTC.dll # mt_masktools.dll # removegrain.dll # repair.dll # frfun7.dll mpeg2source("G:\Video\_Work\_dotcrawl\dot_crawled.d2v") borders = bicubicresize(width()/2,height()/2).bicubicresize(width()+8,height()) stackhorizontal(borders.crop(0,0,4,0),last,borders.crop(width()+4,0,0,0)) o=last ox=o.width() oy=o.height() drr = o.separatefields().vinverse2().weave() both = stackhorizontal(drr,o) IVTC = both.tfm(pp=0,clip2=stackhorizontal(drr,drr)).tdecimate() raw = IVTC.crop(ox,0,ox,oy) clean1 = IVTC.crop(0,0,ox,oy) D1 = mt_makediff(raw,clean1) D8 = D1.bicubicresize(ox/2-72,oy).blur(1,0).bicubicresize(ox,oy,1,0) D9 = mt_lutxy(D1,D8,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") clean1a = clean1.mt_adddiff(D9,U=2,V=2) clean1b = clean1a.frfun7(1.01,8,1) allD = mt_makediff(raw,clean1b).greyscale() shrpD = mt_makediff(clean1b,clean1b.removegrain(20)) DD = shrpD.repair(allD,13,0).mt_lutxy(shrpD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") clean1c = clean1b.mt_lutxy(clean1a,"x 3 + y < x 2 + x y < x 1 + x 3 - y > x 2 - x y > x 1 - x ? ? ? ?",U=2,V=2) \.mt_adddiff(DD.sbr(),U=2,V=2) raw = raw.crop(4,0,-4,0,true) clean1c = clean1c.crop(4,0,-4,0,true) interleave(raw,clean1c) # interleave "only-IVTC" with result of full filterchain, for frame comparison # clean1c # just result return(last) #--- end of script ---# ####################################################### #--- Helper functions below ---# function Vinverse2(clip clp, float "sstr", int "amnt", int "uv") { uv = default(uv,3) sstr = default(sstr,2.7) amnt = default(amnt,255) uv2 = (uv==2) ? 1 : uv STR = string(sstr) AMN = string(amnt) vblur = clp.sbrV() vblurD = mt_MakeDiff(clp,vblur,U=uv2,V=uv2) Vshrp = mt_LutXY(vblur,vblur.mt_convolution("1","1 2 1"),expr="x x y - "+STR+" * +",U=uv2,V=uv2) VshrpD = mt_MakeDiff(Vshrp,vblur,U=uv2,V=uv2) VlimD = mt_LutXY(VshrpD,VblurD,expr="x 128 - y 128 - * 0 < x 128 - abs y 128 - abs < x y ? 128 - 0.25 * 128 + x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2) mt_AddDiff(Vblur,VlimD,U=uv,V=uv) (amnt>254) ? last : (amnt==0) ? clp : mt_LutXY(clp,last,expr="x "+AMN+" + y < x "+AMN+" + x "+AMN+" - y > x "+AMN+" - y ? ?",U=uv,V=uv) return(last) } function sbr(clip o) { rg11=o.removegrain(11) rg11D=mt_makediff(o,rg11) rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") o.mt_makediff(rg11DD,U=2,V=2) } function sbrV(clip o) { rg11=o.mt_convolution("1","1 2 1") rg11D=mt_makediff(o,rg11) rg11DD=mt_makediff(rg11D,rg11D.mt_convolution("1","1 2 1")).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") o.mt_makediff(rg11DD,U=2,V=2) } ![]() ![]() ![]() ![]() ![]() ![]() Sorry, for the screenshots I forgot to crop the 4 pixels left/right that are added in the script.
__________________
- 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!) |
![]() |
![]() |
![]() |
#65 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,636
|
sirt:
Now all you need is some derainbowing and you'll be good to go! ![]() Didée: The results look great. I tried it with a few different samples (anime and film) and this script seems to do a excellent job on all of them. I'm truly amazed at what Avisynth can accomplish under the hands of a skilled operator. Thanks Didée! I have a few questions, if you don't mind? What are some of the key parameters that dictate the strength of the dot crawl detection and or removal? Also, what does one have to do in order to be able to process progressive/interlaced NTSC and PAL? Removing TFM and TDecimate seems too easy. ![]() Last edited by Reel.Deel; 24th July 2012 at 04:27. |
![]() |
![]() |
![]() |
#66 | Link |
x264 fan
Join Date: Feb 2011
Location: In the trap
Posts: 458
|
Reel.Deel
Yes, In fact I've filtered that separetly in an adaptative way according to the scenes of the video. Didée Fantastic ! It's quite good. Thanks for your time and efforts spent on this. I would like to thank everybody that helped me on this subject. One question more remains pending...here Didée iVTCed my source and based his work on raw and clean1. But let's say I would like to apply the code on an AVI source as Input that has been ivtced, which means I would also use the script after iVTC like there, how could you do ? I've reflected about this but I'm lost, it looks like I will have to modify too many things. Do you have a suggestion ? |
![]() |
![]() |
![]() |
#68 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
It was a link a image host
http://www.imagebam.com/image/303a44202846639 |
![]() |
![]() |
![]() |
#69 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,393
|
@Ghitulescu
Don't know how it looks on your side, but for me at least, ImageBam surely shows the full images. Just in case - those pics zipped. @sirt If a video already has been IVTC'ed, then everything is different. Remember Quote:
__________________
- 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!) |
|
![]() |
![]() |
![]() |
#70 | Link | |
x264 fan
Join Date: Feb 2011
Location: In the trap
Posts: 458
|
Quote:
I know it is somewhat twisted but I am also corecting patterns manually and I don't want to use an automatic tfm as you did. |
|
![]() |
![]() |
![]() |
#71 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,393
|
Whatever. If IVTC has been done already, then you left the field of certainty, and are in the swamp of vague possibilities.
Try FRFun7 on its own, this alone often snaps surprisingly nice onto dotcrawl. But, it always will also soften the picture ... propably it is indicated to shoot back with "shift-values-two-notches-back", or contrasharpen, or both together. You can teach how to swing the racket, but not how to get the feeling for the ball.
__________________
- 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!) |
![]() |
![]() |
![]() |
#73 | Link |
Registered User
Join Date: Jan 2006
Posts: 1,862
|
In your case, maybe you don't need automated IVTC at all. There could be one constant pattern throughout the whole video, so you can use that pattern and there will never be a mistake.
If the pattern changes, it's likely at scene changes when it was edited. A check could be made at those points. |
![]() |
![]() |
![]() |
#74 | Link | |
x264 fan
Join Date: Feb 2011
Location: In the trap
Posts: 458
|
Quote:
|
|
![]() |
![]() |
![]() |
#75 | Link | ||
Registered User
Join Date: Mar 2009
Location: Germany
Posts: 5,769
|
Quote:
![]() It happens to all images posted on imagebam.com. Quote:
__________________
Born in the USB (not USA) |
||
![]() |
![]() |
![]() |
#77 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,636
|
Hello, I have some examples of dot crawl in NTSC interlaced footage. QTGMC does a good job at removing most of it, but it still leaves subtle hints of the existing dot crawl. Using Didée's solution before QTGMC helps almost completely eliminate the remaining dot crawl. Here is the change I made to dot crawl script to make it work (at least I think) with the interlaced footage.
Code:
........ drr = o.separatefields().vinverse2().weave() both = stackhorizontal(drr,o) IVTC = both # Removed TFM and TDecimate. raw = IVTC.crop(ox,0,ox,oy) clean1 = IVTC.crop(0,0,ox,oy) ........ The rest of the script is the same and its followed by QTGMC(preset="slower",EdiMode="NNEDI3", EdiThreads=2) |
![]() |
![]() |
![]() |
#79 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,636
|
So doing a little bit more testing I found out that simply just removing TFM and TDecimate does not work.
It seems as Vinverse2() does a partial vertical pixel shift. Processing the interlaced content as individual frames produced better results. Here's the comparison. Code:
........ o=last.separatefields() ox=o.width() oy=o.height() drr = o.vinverse2() # Removed separatefields and weave both = stackhorizontal(drr,o) IVTC = both # Removed TFM and TDecimate. ........ The rest of the script is the same and it's followed by QTGMC(preset="slower",EdiMode="NNEDI3", EdiThreads=2) |
![]() |
![]() |
![]() |
#80 | Link |
x264 fan
Join Date: Feb 2011
Location: In the trap
Posts: 458
|
Even though Dot crawl + QTGMC solve much more things such as the baloons, I don't think using QTGMC is a good idea given that it is a deinterlacer. It echoes badly on man's shirt for example and on the bricks of the wall behind.
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|