VideoHelp Forum
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Hi Friends,

    I have a clip here, and the credits look strange. Is this what would be characterized as "dot crawl"? Would checkmate fix this?


    http://files.videohelp.com/u/183506/beauty.demuxed.m2v


    Thanks!
    Quote Quote  
  2. Formerly 'vaporeon800' Brad's Avatar
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Search PM
    Yes it's dot crawl. Checkmate should mitigate it, but as with anything, be careful of unwanted side effects.
    Quote Quote  
  3. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    is dedot better? I have been playing with both, but not having that much luck. thanks!
    Quote Quote  
  4. Yes, those are dot crawl artifacts but the MPEG 2 encoding (or something) has screwed them up so they're no longer "clean". Try values around Checknate(thr=10, max=20, tthr2=20). Be sure to run Checkmate before IVTC or other filters. Note that 3d comb filters really only work well in still areas.
    Last edited by jagabo; 12th Oct 2013 at 17:51.
    Quote Quote  
  5. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Is it possible to apply a filter like checkmate to only part of a clip, but leave the rest untouched? I have been playing around for hours trying to do this with no luck :P

    Thanks for the help, Video Gods!
    Quote Quote  
  6. WhateverSource()
    part1=Trim(0,99) # first 100 frames
    part2=Trim(100,0) # rest of video

    part1=Checkmate(part1, ...)

    return(part1++part2)
    Quote Quote  
  7. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Hi!

    I tried this, but it's all messed up :P


    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    part1=Trim(0,2751) # first 2751 frames
    part2=Trim(2751,0) # rest of video


    part1=Checkmate(part1).TFM(part2).TDecimate(part2)
    part2=TFM(part2).TDecimate(part2)


    return(part1++part2)



    What I would like to do is apply checkmate, TFM & Tdecimate to the first 2752 frames or so. Afterwards I would like to apply just TFM & Tdecimate.


    Man, Avisynth is hard! Thanks you for all the help!!!
    Last edited by hizzy7; 12th Oct 2013 at 21:21.
    Quote Quote  
  8. Code:
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    part1=Trim(0,2751) # first 2751 frames
    part2=Trim(2751,0) # rest of video
    
    part1=Checkmate(part1).TFM().TDecimate()
    part2=TFM(part2).TDecimate()
    
    return(part1++part2)
    or:

    Code:
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    part1=Trim(0,2751) # first 2751 frames
    part2=Trim(2751,0) # rest of video
    
    Checkmate(part1)++part2
    TFM().TDecimate()
    or:

    Code:
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    Trim(0,2751).Checkmate()++Trim(2751,0)
    TFM().TDecimate()
    One thing to keep in mind, when you don't specify a named video "last" is used instead. So that last sequence is the equivalent to:

    Code:
    last = Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    last = Trim(last, 0,2751).Checkmate()++Trim(last,2751,0)
    last = TFM(last).TDecimate()
    The "." command pipes the output of the filter on the left directly to the filter on the right. So on that last line the output of TFM() is sent directly to TDecimate(). And on the line before the output of the first Trim() is sent directly to Checkmate().

    Oh, note that Trim() includes the first and last frames. So your two trims end up repeating frame 2751. So you want this instead:

    Code:
    part1=Trim(0,2751) # first 2752 frames
    part2=Trim(2752,0) # rest of video
    Last edited by jagabo; 12th Oct 2013 at 22:05.
    Quote Quote  
  9. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Wow! so many variants! I have a question - If i wanted to apply the following parameters to checkmate, where would they fit in the script below?:Checkmate(thr=10, max=20, tthr2=20),

    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")part1=Trim(0,2751) # first 2751 frames
    part2=Trim(2751,0) # rest of video


    part1=Checkmate(part1).TFM().TDecimate()
    part2=TFM(part2).TDecimate()


    return(part1++part2)

    Thanks, Jagabo!
    Last edited by hizzy7; 12th Oct 2013 at 22:15.
    Quote Quote  
  10. part1=Checkmate(part1, thr=10, max=20, tthr2=20)

    or

    part1=part1.
    Checkmate(thr=10, max=20, tthr2=20)

    There are many different ways you can format the syntax



    With those settings, there is still a bit of dot crawl left over. You can stack other filters to remove more, but dot crawl filters are VERY damaging at the settings required to remove most of the dot crawl - I think this is what vaporeon800 was getting at

    So assuming you just wanted to affect the yellow characters, one approach would be to use a mask e.g a hue mask affecting only a range of yellow . This way only the yellow characters are filtered by the dot crawl filters, the rest of the picture isn't damaged . But if the dot crawl artifacts affects other areas that you want to filter as well, this approach won't work very well . If this is something you want to try out , say so

    Quote Quote  
  11. Originally Posted by hizzy7 View Post
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")part1=Trim(0,2751) # first 2751 frames
    Since the framecount begins with zero, that's the first 2752 frames. Maybe that won't make much of a difference to you, if any. But this will:
    part2=Trim(2751,0) # rest of video
    By beginning part2 with the same frame as you left off in part1, you've increased the total framecount by one. A few trims like that during the video and the audio will become noticeably out of synch.
    Quote Quote  
  12. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Originally Posted by poisondeathray View Post
    part1=Checkmate(part1, thr=10, max=20, tthr2=20)

    or

    part1=part1.
    Checkmate(thr=10, max=20, tthr2=20)

    There are many different ways you can format the syntax



    With those settings, there is still a bit of dot crawl left over. You can stack other filters to remove more, but dot crawl filters are VERY damaging at the settings required to remove most of the dot crawl - I think this is what vaporeon800 was getting at

    So assuming you just wanted to affect the yellow characters, one approach would be to use a mask e.g a hue mask affecting only a range of yellow . This way only the yellow characters are filtered by the dot crawl filters, the rest of the picture isn't damaged . But if the dot crawl artifacts affects other areas that you want to filter as well, this approach won't work very well . If this is something you want to try out , say so



    It's the yellow characters that I want to fix. How would you go about applying the hue mask?


    Thank you!
    Quote Quote  
  13. If you look at the U channel you'll see that the yellow characters stand out from the rest of the picture. So this will serve as a basis for our alpha mask.

    Code:
    UtoY()
    Name:  UChan.png
Views: 906
Size:  46.5 KB

    But the U channel is half the size (each dimension) of the full picture so we need to upscale it. We also want to massage it so that the characters are white and the rest of the image black

    Code:
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    Click image for larger version

Name:	usharp.png
Views:	364
Size:	83.9 KB
ID:	20513

    But the dot crawl artifacts extend outside the characters. So we need to blur and expand the mask to cover an area slightly larger than the characters:

    Code:
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    Click image for larger version

Name:	UBlur.png
Views:	370
Size:	44.4 KB
ID:	20514

    Now we have a suitable alpha mask. The parts of the mask that are black will show the original image, the parts where the mask is white will show the filtered image, and the greys in between will be a blend of the original and filtered images.

    Let's make a highly filtered image that eliminates the dot crawl artifacts.

    Code:
    CheckMate(thr=10, max=20, tthr2=20) # removes lots of the dot crawl
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15) # removes more of the dot crawl
    aWarpSharp(depth=15) # sharpen the result a little
    Click image for larger version

Name:	filtered.jpg
Views:	516
Size:	24.2 KB
ID:	20515

    It's not very visible in this picture but the strong temporal filter causes blurring and ghosting of moving objects. So we want to use our mask so that only the yellow characters and the area immediately around them are filtered:

    Code:
    Overlay(src, last, 0, 0, mask)
    Click image for larger version

Name:	final.jpg
Views:	382
Size:	25.3 KB
ID:	20517

    Notice how the boat behind the right-most character is much clearer than in the highly filtered image.

    The full script:

    Code:
    Mpeg2Source("D:\Downloads\beauty.demuxed.d2v", Info=3) 
    CheckMate(thr=10, max=20, tthr2=20)
    TFM().TDecimate()
    src=last
    
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15)
    aWarpSharp(depth=15)
    
    Overlay(src, last, 0, 0, mask)
    Quote Quote  
  14. IF the rest of the title section is like the sample you posted, then that approach might be appropriate. But if there are other areas that need filtering, you might need other manipulations. Dot crawl usually occurs in areas that are bright and saturated where this is Y/C crosstalk . So if there were bright red letters, they would probably be affected by dot crawl as well (You can actually see some in the background neon sign) - those won't be affected because they would be EXcluded by the yellow hue mask

    Also there is another section before the yellow letters. I would filter that section without the mask, because other things are affected other than yellow

    There are many methods to generate masks. The simplest ways usually involve one isolatable characteristic to that distinguishes the region of interest from everything else . For example you might use a chroma key if you had a green screen shot. You might use edges in an edge mask. You might use luma values above a certain threshold value, or below a certain value, etc... In this case you have yellow, so you can use maskhs() with a hue range narrowing on yellow, +/- some masktools operators to tidy up the mask . It's included in the most recent avisynth 2.6 versions, but as a separate function in earlier ones . You could use a chroma key in other programs as well - the principle is the same

    When viewing and adjusting the mask, you can think of areas in white as transparent. You can think of it as a top layer that has filters applied "covering up" areas on a bottom layer. Those corresponding areas in white in the mask layer are "seen" from the top layer. 100% black are areas shown on the bottom layer. Intermediate transparency are greyscale values, so a mix of top and bottom layers. So you would adjust the starthue and endhue values while previewing the mask . If you didn't want abrupt transitions, you would feather the mask (essentially blur the edges) - this is more important for things like applying denoisers/degrainers where the sections don't look like they match as well. That greyscale area would be a transitions zone that smooths the blending of the top/bottom layer

    I added tcomb to checkmate with santiag (an antialiaser) for the dotcrawl . The settings used are very damaging to fine details because of temporal smoothing, and shouldn't be used without a mask. awarpsharp2 is to thin the edges and mergechroma(awarpsharp2) is to fix the color bleeding out of the characters

    For the masktools operators, mt_expand is to grow the mask, the vertical call is in the vertical direction. You need the mask to "cover up" larger than the letters over the color bleed areas


    Code:
    orig=MPEG2Source("beauty.demuxed.d2v", cpu=0)
    
    orig
    crop(14,56,-2,-64,true) #be careful mod4 rules for vertical interlaced crop (cropped before ivtc)
    cropped=last
    
    cropped
    assumetff()
    tfm()
    tdecimate()
    ivtced=last
    
    cropped
    tcomb(fthreshL=16, othreshL=20)
    checkmate
    tfm
    tdecimate
    santiag(3,3)
    awarpsharp2(depth=4)
    mergechroma(awarpsharp2(depth=10))
    filtered=last
    
    ivtced
    converttoyv24()
    maskhs(starthue=135, endhue=205, coring=false)
    mt_expand(thy=255).mt_expand(thy=255).mt_expand(thy=255, mode="vertical")
    binomialblur(1)
    mymask=last
    
    #mymask
    overlay(ivtced, filtered, mask=mymask)
    addborders(14,56,2,64)
    The original
    Click image for larger version

Name:	1044 original.png
Views:	307
Size:	312.0 KB
ID:	20518


    Filtered , no mask (notice the blurring of details in the background, the boats)
    Click image for larger version

Name:	1044 filtered no mask.png
Views:	297
Size:	287.4 KB
ID:	20519


    Mask
    Click image for larger version

Name:	1044 mask.png
Views:	307
Size:	9.8 KB
ID:	20520


    Filtered with mask (notice the missing background and boat details are intact)
    Click image for larger version

Name:	1044 filtered with mask.png
Views:	343
Size:	266.2 KB
ID:	20521



    Edit: I see jagabo posted another solution as I was typing. There are many ways to isolate masks, and the general concept of masks is really the key message that you want to learn about here
    Last edited by poisondeathray; 13th Oct 2013 at 09:15.
    Quote Quote  
  15. I guess I should learn more about masktools.
    Quote Quote  
  16. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    This masks stuff is fascinating! I have been experimenting with both scripts. The improvement is incredible. I am trying to apply jagabo's script to this one, with no luck:

    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")part1=Trim(0,2751) # first 2751 framespart2=Trim(2751,0) # rest of videopart1=part1=Checkmate(part1, thr=10, max=20, tthr2=20)).TFM().TDecimate()part2=TFM(part2).TDecimate()ret urn(part1++part2)

    When I try to apply jagabo's solultion, I get the message "splice: video framerates doesn't match. What am I doing wrong now? OMG, this is so complex! You guys should be brain surgeons!!! Thanks!



    Edit: Does anyone know where I can find the santiag.dll? Thanks again!
    Last edited by hizzy7; 13th Oct 2013 at 09:57.
    Quote Quote  
  17. Originally Posted by jagabo View Post
    I guess I should learn more about masktools.

    I find masktools very confusing and the documentation unhelpful. I barely know the basics , and always looking for examples to learn from


    I get the message "splice: video framerates doesn't match.
    It's hard to read your script jumbled like that (please put it in code boxes) , but I'm guessing it has to do with IVTCed vs non IVTCed joining (23.976 vs. 29.97)

    Does anyone know where I can find the santiag.dll?
    It's not a .dll , it's a wrapper function based on nnedi3 (that is a dll nnedi3.dll)

    Santiag
    http://forum.doom9.org/showthread.php?p=1393006#post1393006

    Santiagmod
    http://forum.doom9.org/showthread.php?p=1419815#post1419815
    Quote Quote  
  18. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Even the code box thing eludes me. sigh. lol
    Quote Quote  
  19. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Code:
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v") 
    CheckMate(thr=10, max=20, tthr2=20)
    TFM().TDecimate()
    src=last
    
    
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    
    
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15)
    aWarpSharp(depth=15)
    
    
    Overlay(src, last, 0, 0, mask)

    At least I think i got the code box!!!!
    Quote Quote  
  20. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Ok, is it possible to add this:

    Code:
    Mpeg2Source("BEAUTY INVESTIGATOR.d2v")
    part1=Trim(0,2751) # first 2752 frames
    part2=Trim(2752,0) # rest of video
    
    
    part1=Checkmate(part1).TFM().TDecimate()
    part2=TFM(part2).TDecimate()
    
    
    return(part1++part2)
    to this:


    Code:
    Mpeg2Source("D:\Downloads\beauty.demuxed.d2v", Info=3) 
    CheckMate(thr=10, max=20, tthr2=20)
    TFM().TDecimate()
    src=last
    
    
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    
    
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15)
    aWarpSharp(depth=15)
    
    
    Overlay(src, last, 0, 0, mask)
    Also, poisondeathray, I am reading your script, but I don't see how the wrapper works. Is the santiag wrapper just a text file that I copy into my plugin folder? Thanks!!!!!
    Quote Quote  
  21. There are many ways to format that, here is one:



    Code:
    Mpeg2Source("D:\Downloads\beauty.demuxed.d2v", Info=3) 
    CheckMate(thr=10, max=20, tthr2=20)
    TFM().TDecimate()
    src=last
    
    
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    
    
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15)
    aWarpSharp(depth=15)
    
    
    Overlay(src, last, 0, 0, mask)
    
    filtered=last
    
    
    
    
    Mpeg2Source("D:\Downloads\beauty.demuxed.d2v", Info=3) 
    TFM().TDecimate()
    ivtced=last
    
    filtered.trim(0,2751) ++ ivtced.trim(2752,0)
    Also, poisondeathray, I am reading your script, but I don't see how the wrapper works. Is the santiag wrapper just a text file that I copy into my plugin folder? Thanks!!!!!
    Santiag() is just a function;

    Either copy & paste that text into your script, or use Import() for an .avs (copy & paste it into notepad, rename .txt to .avs), or rename it .avsi and put it in the plugins folder to autoload
    Quote Quote  
  22. You might find it easier to use ReplaceFramesSimple (part of RemapFrames.dll) rather than Trim. Especially when you have multiple sections. From its docs:

    Code:
    ReplaceFramesSimple(original, replacements, Mappings="[0 99] [500 699]")
    That will replace frames 0 to 99, and 500 to 699, of original, with equivalently numbered frames taken from replacements. You can add more sections within the quotes.

    By the way, the moving NT logo looks really bad with the filter sequence I gave earlier. It was meant to use only with the later yellow text.
    Quote Quote  
  23. Member
    Join Date
    Feb 2010
    Location
    canada
    Search PM
    Man, i wish someone could invent an avisynth with knobs and sliders... lol!
    Quote Quote  
  24. Here's an example using ReplaceFramesSimple.

    Code:
    Mpeg2Source("D:\Downloads\beauty.demuxed.d2v", Info=3)
    
    # first make a unfiltered version (except for TFM TDecimate)
    unfiltered = TFM().TDecimate()
    
    # then make a highly filtered version
    CheckMate(thr=10, max=20, tthr2=20)
    TFM()
    TDecimate()
    
    mask=UtoY().Invert().ColorYUV(off_y=-128).ColorYUV(gain_y=512).BilinearResize(width, height)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    mask=mask.Blur(1.0).ColorYUV(gain_y=50)
    
    TTempSmooth(maxr=6, strength=6, lthresh=200, cthresh=100, lmdiff=10, cmdiff=15)
    aWarpSharp(depth=15)
    
    Overlay(unfiltered, last, 0, 0, mask)
    
    # At this point you have two videos: "unfiltered" and the heavily filtered "last"
    # Assuming the sample is the same as the start of the full movie, use
    # only the heavily filter frames from 166 to 1751
    
    ReplaceFramesSimple(unfiltered, last, Mappings="[166 2751]")
    Quote Quote  
  25. Originally Posted by hizzy7 View Post
    Man, i wish someone could invent an avisynth with knobs and sliders... lol!

    The closest thing you'll get to a GUI for avisynth is avspmod, which has user programmable sliders, but no knobs . Some of the built in avisynth functions already have sliders for them in avspmod, others you have to adjust min/max values
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!