VideoHelp Forum




+ Reply to Thread
Results 1 to 15 of 15
  1. Hello,

    I have two problems encoding animation videos:

    - There are kinds of lines with dots that move in all directions.
    - A rainbow effect on the lines.

    I can not find a satisfactory solution, so I allow myself to ask you for help in order to know what could be done to best deal with these problems.
    I work under Avisynth.

    I attach a short extract.
    Thank you in advance for your help.

    Excuse my bad English, I am writing to you with a translator.
    Image Attached Files
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Did you try checkmate?
    http://www.avisynth.nl/index.php/Checkmate
    It would normally go before any de-interlace or field matching
    Quote Quote  
  3. Thank you for your help, I did not know checkmate. This plugin solved at least part of the problem, the moving points still remain but it seems that I manage to stabilize them with MAA2.

    That said, I read on your link that it is not recommended to use in scenes with a lot of movement, which means that on videos of several minutes, checkmate is not necessarily ideal?
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Filipon View Post
    Thank you for your help, I did not know checkmate. This plugin solved at least part of the problem, the moving points still remain but it seems that I manage to stabilize them with MAA2.

    That said, I read on your link that it is not recommended to use in scenes with a lot of movement, which means that on videos of several minutes, checkmate is not necessarily ideal?
    It's possible. Look at the syntax
    Code:
    checkmate (clip, int "thr", int "max", int "tthr2")
    Those three items may need to be lowered if you suspect it's causing a problem.
    The text refers to high motion scenes; it's not related
    to the length (running time) of a video

    Also see the example where they use MergeChroma to use less filter strength on the Luma (greyscale) channel

    The cnr2 filter may also be useful to reduce chroma noise:
    http://avisynth.nl/index.php/Cnr2
    Quote Quote  
  5. Using taco_dotcrawl. How does this look to you?

    https://web.archive.org/web/20110623070014/http://home.earthlink.net/~tacosalad/video/dotcrawl.html

    The video is telecined. So the procedure is:
    - remove the dotcrawl with the taco filter (using Vdub or importing the filter into Avisynth)
    - IVTC (Inverse Telecine to reproduce the original progressive 24fps)

    Here the Avisynth script:
    Code:
    LoadVirtualdubPlugin("...path to ....\AviSynth+\plugins\dotcrawl.vdf","taco_dotcrawl")
    ffms2("VTS_01_1.VOB")
    converttoRGB32().taco_dotcrawl().converttoYV12()
    TFM().TDecimate()
    Image Attached Files
    Last edited by Sharc; 26th Aug 2023 at 03:44. Reason: Link added
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Sharc View Post
    Using taco_dotcrawl.
    Brilliant - thanks for posting, never seen this old filter before
    Quote Quote  
  7. Thank you all for your help, it's nice!
    As soon as I have a free moment, I will test all this, hoping to obtain a satisfactory result.

    If this can help you better understand the extent of the problem, I take the liberty of attaching a second excerpt where the problem of swarming dots is even more obvious, especially between 4 and 6 seconds.
    Image Attached Files
    Quote Quote  
  8. Originally Posted by Filipon View Post
    Thank you all for your help, it's nice!
    As soon as I have a free moment, I will test all this, hoping to obtain a satisfactory result.

    If this can help you better understand the extent of the problem, I take the liberty of attaching a second excerpt where the problem of swarming dots is even more obvious, especially between 4 and 6 seconds.
    If you don't have a free moment to try the proposed solutions why do you just upload a new file? Assuming we have abundant time to keep ourselves busy doing the same again? Apologies for my sarcasm
    Quote Quote  
  9. CheckMate() in AviSynth. Plus IVTC, dehalo_alpha(), and Sharpen(),
    Image Attached Files
    Quote Quote  
  10. Originally Posted by Sharc View Post
    Originally Posted by Filipon View Post
    Thank you all for your help, it's nice!
    As soon as I have a free moment, I will test all this, hoping to obtain a satisfactory result.

    If this can help you better understand the extent of the problem, I take the liberty of attaching a second excerpt where the problem of swarming dots is even more obvious, especially between 4 and 6 seconds.
    If you don't have a free moment to try the proposed solutions why do you just upload a new file? Assuming we have abundant time to keep ourselves busy doing the same again? Apologies for my sarcasm
    Excuse me for considering video encoding as a passion and for not spending my life in front of a computer screen!
    Submitting an extract on the forum only takes a few seconds (yes, it's fast with DVD Shrink), while having to find the right settings in Avsynth takes more time, especially when you're not necessarily an expert in matter. You can imagine that if that were the case, I wouldn't be here asking for help!

    There is an expression in France which says that it is better to turn your tongue in your butcher seven times before speaking. I certainly should have applied it here and not been polite when responding to people who tried to help me...

    To answer your question, know that I do not force anyone to help me but it seems to me that we are here on a support forum, right? It therefore seemed logical to me to offer extracts in order to be able to help me but once again, I am not forcing anyone. If you don't want to help me, you can very well ignore my message!

    Thanks Jagabo for your help. The results you get are really convincing! I note all that to test on a complete episode!
    Quote Quote  
  11. Here's the script I used for that video:

    Code:
    Mpeg2Source("VTS_01_1.d2v", Info=3) 
    CheckMate(thr=10, max=20, tthr2=20) # dot crawl reduction
    TFM(d2v="VTS_01_1.d2v") # field match
    TDecimate() # decimate 29.97 fps to original film frames at 23.97 fps
    
    dehalo_alpha(rx=2.5, ry=1.0) # reduce oversharpening halos
    Sharpen(0.5, 0.0) # our own sharpen
    Crop(8,0,-8,-0) # remove ITU extra borders at the left and right
    CheckMate sometimes causes ghosting of moving edges. You can reduce the tthr2 value to somewhere between 0 and 20 to reduce the ghosting, if necessary.
    Quote Quote  
  12. I added some rainbow reduction:

    Code:
    Mpeg2Source("VTS_01_1.d2v", Info=3) 
    CheckMate(thr=10, max=20, tthr2=10) # dot crawl reduction
    TFM(d2v="VTS_01_1.d2v")  # field match
    TDecimate()  # decimate 29.97 fps to original film frames at 23.97 fps
    
    DeRainbow(30, 2) # reduce rainbows
    dehalo_alpha(rx=2.5, ry=1.0) # reduce oversharpening halos
    MergeChroma(Sharpen(0.5, 0.0), aWarpSharp2(depth=20)) # our own sharpen, different for luma and chroma
    Crop(8,0,-8,-0) # remove ITU extra borders at the left and right
    
    prefetch(8) # multithreading for AviSynth+
    There appears to be several filters called "DeRainbow". Here's the one I used:

    Code:
    ##############################################################################
    #
    #	DeRainbow(clip c, int "threshold", int "bfactor")
    #  
    #	Rainbows are caused by high frequency luma interfering with the chroma
    #	carrier.  So luma edges are where you will get rainbows (high frequency
    #	noise in the luma channels).  They are removed here by blurring the chroma.
    #	Only areas near edges are blurred.
    #
    #	threshold default 40
    #	Edge detection threshold. This basically controls what parts of the picture
    # 	will be processed.  Lower values will result in removal of rainbows in
    #	more and wider areas but potentially blurring of the chroma in those areas.
    #	Valid values are 0 to 255.  Typical values are probably 20 to 60.  Use the
    #	highest value you can and still get removal of rainbows in the areas you 
    #	want.
    #
    #	bfactor, default 4
    #	Blur factor.  Higher values more effectivly remove rainbows but may
    #	also result in noticably blurred colors and loss of saturation of small
    #	patches and edges.  Valid values are 1 and above. Typical values 
    #	are 4 to 8.  Use the lowest values that gives effective rainbow removal.
    #
    ##############################################################################
    
    
    function DeRainbow(clip c, int "threshold", int "bfactor")
    {
    	threshold = default(threshold, 40)
    	bfactor = default(bfactor, 4)
    
    	bwidth = (c.width/bfactor/8)*8
    	bwidth = max(bwidth, 16)
    
    	bheight = (c.height/bfactor/8)*8
    	bheight = max(bheight, 16)
    
    	umask = c.UtoY().mt_edge(mode="hprewitt", thy1=threshold, thy2=threshold)
    	vmask = c.VtoY().mt_edge(mode="hprewitt", thy1=threshold, thy2=threshold)
    	rmask = Overlay(umask, vmask, mode="add").mt_expand().mt_inpand().Blur(1.4).Blur(1.4).Spline36Resize(c.width,c.height)
    # return(rmask) # if you want to see the edge mask
    
    	cblur = c.BilinearResize(bwidth, bheight).KNLMeansCL(d=1, a=2, h=3, channels= "UV").Spline36Resize(c.width,c.height)
    # return(cblur) # if you want to see the blurred video
    	cblur = Overlay(c, cblur, mask=rmask)
    	MergeChroma(c, cblur)
    }
    
    ##############################################################################
    Processed sample attached:
    Image Attached Files
    Quote Quote  
  13. It's really impressive, thank you again Jagabo for this script.

    There appears to be several filters called "DeRainbow". Here's the one I used:
    Excuse me for my question but I am new to Avisynth scripting.
    If I understand correctly, I need to copy the code you gave me and save it as a ".avsi" file?

    If so, does "DeRainbow" require any particular plug-ins to work?
    Quote Quote  
  14. Originally Posted by Filipon View Post
    If I understand correctly, I need to copy the code you gave me and save it as a ".avsi" file?
    Yes, and put the AVSI file in AviSynth's plugins folder to have it autoload. Or you can copy/paste the code into the script you're working with.

    Originally Posted by Filipon View Post
    If so, does "DeRainbow" require any particular plug-ins to work?
    It uses MaskTools2 and KNLMeansCL. I think that's it.
    Quote Quote  
  15. I took the time today to test a little of everything that was proposed in this thread.
    The solution offered by Jagabo is the one that seems to have the most success on my videos.
    I wanted to thank everyone for your help and excuse me for coming back to you only now.
    Quote Quote  



Similar Threads

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