VideoHelp Forum




+ Reply to Thread
Results 1 to 20 of 20
  1. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    This video seems to have flicker only on the pink dress of the woman, nowhere else in the video. Do you know what would be the best Avisynth filter for this that would not affect the rest of the video? SMDegrain()?

    Also, for some reason the flicker is not as bad if when the video is captured composite rather than through S-video, but the former is much blurrier.

    Thank you.
    Image Attached Files
    Quote Quote  
  2. Use MaskHS() to create a mask of the pink areas. Then Overlay() a highly filtered version of the video over the original only where pink occurs, Overlay(unfiltered, filtered, mask=pinkmask). It will probably be difficult to separate the skin tones from the pink shirt.
    Quote Quote  
  3. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Thank you for the quick reply. Do you think SMDegrain is the best tool to use for filtering out the flicker? I've only tried the default settings and didn't see much improvement. I know that is not enough, but I also know that there are some filters that I could never get to work no matter the settings.
    Quote Quote  
  4. This video seems to have flicker only on the pink dress of the woman,...
    Here the flickering isn't just in the pink,... (it's in all channels)
    mClean with default values works better than SMDegrain with default values.
    you might also want to adjust the luma mapping,..

    Cu Selur

    Ps.: looking at the histogram, I'm not even sure that dress is meant to be pink,...
    Last edited by Selur; 9th Feb 2026 at 10:24.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  5. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Thank you! The dress comes up between red and yellow on the vectorscope, so you are right that it might be more of an orange.

    I tried playing around with mClean, but even though it says on the top that "Input must be 8-bit Planar type (YV12, YV16, YV24) or their equivalents in 10, 12, 14, or 16 bits", it does not seem to work with YV12 because it throws an error "CombinePlanes: source and target plane dimensions are different." It then points to line 140 of mClean.avsi. This is what line 139 and 140 is in that script:

    depth_calc = deband==0 ? nop() : CombinePlanes (clean2, filt_chroma_bits>8 ? ConvertBits(filt_chroma, 8) : filt_chroma, planes="YUV",
    \ source_planes="YUV", pixel_type="YV12")
    This error is skipped if i run mClean(deband=0), because (I think) on line 139 deband works only with YV12:

    depth_calc = deband==0 ? nop() : CombinePlanes (clean2, filt_chroma_bits>8 ? ConvertBits(filt_chroma, 8) : filt_chroma, planes="YUV",
    \ source_planes="YUV", pixel_type="YV12")
    This video was originally from U-Matic, convert to ProRes 422 which I then edited in Premiere and exported as Lagarith Lossless AVI to work with using Avisynth. Is it worth keeping the YV16 and skipping the debanding, or taking a loss from 4:2:2 to 4:2:0 with YV12 and making use of the debanding? Or should I just trust my eyes (which I do not trust)?
    Quote Quote  
  6. Crop your video down to 480 lines before mClean.


    Try something like:

    Code:
    ffVideoSource("flicker issue.mp4") 
    Crop(0,0,-0,-4)
    src = last
    
    BWDIF(1) # deinterlace
    src = last
    QTGMC(InputType=2)
    pinkmask = Blur(0.0, 1.0).MaskHS(StartHue=105, EndHue=130, MaxSat=35, MinSat=20).mt_expand().Blur(1.0).Blur(1.0).Blur(1.0).BilinearResize(width, height)
    Overlay(src, last, mask=pinkmask)
    Last edited by jagabo; 10th Feb 2026 at 11:41.
    Quote Quote  
  7. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    The video is already 720 x 480. But I export it from Premiere as Lagarith in YUY2. I then run ConvertToYV16(matrix="Rec709",interlaced=True) at the beginning of my script to preserve the 4:2:2. But I still get the error. It only resolves if I throw in a ConvertToYV12 before mClean.

    Here is the full script in case it helps. Thank you.

    video = AVISource("D:\episode39_send_to_avisynth.avi")

    last = video.ConvertToYV16(matrix="Rec709",interlaced=Tru e)


    ReplaceFramesMC2_AD(last, 472, 1)
    ReplaceFramesMC2_AD(last, 16384, 1)


    AssumeBFF().nnedi3(field=-2)


    SpotLess(RadT=2, ThSAD=5000, Blksz=16)


    FFT3DFilter(sigma=2, bt=5)

    FixChromaBleedingMod(strength=0.9)
    smoothuv2(radius=3,interlaced=0)

    ConvertToYV12(interlaced=false)
    mClean()


    AssumeBFF().SeparateFields().SelectEvery(4,0,3).We ave()

    AddgrainC(var=6)

    return last
    Quote Quote  
  8. Originally Posted by Winsordawson View Post
    The video is already 720 x 480.
    The sample you uploaded was 484 lines.
    Quote Quote  
  9. side note: If you share a sample of your source instead of some reencode the suggestions might differ,....
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  10. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by Winsordawson View Post
    The video is already 720 x 480.
    The sample you uploaded was 484 lines.
    Sorry about that--I left out the Crop function that I put in. Here is the script with notes on dimensions:
    video = AVISource("D:\episode39_send_to_avisynth.avi")

    last = video.ConvertToYV16(matrix="Rec709",interlaced=Tru e)

    #Video is 720 x 486 here

    ReplaceFramesMC2_AD(last, 472, 1)
    ReplaceFramesMC2_AD(last, 16384, 1)


    AssumeBFF().nnedi3(field=-2)

    #Video will now become 720 x 480
    Crop(0,0,0,-6)



    SpotLess(RadT=2, ThSAD=5000, Blksz=16)


    FFT3DFilter(sigma=2, bt=5)

    FixChromaBleedingMod(strength=0.9)
    smoothuv2(radius=3,interlaced=0)


    ConvertToYV12(interlaced=false) #When I comment out this line, get error about CombinePlanes
    mClean(deband=1)


    AssumeBFF().SeparateFields().SelectEvery(4,0,3).We ave()

    AddgrainC(var=6)

    return last
    Note that I can remove ConvertToYV16 if I set mClean(deband=0) but not mClean(deband=1).

    Also, I don't know if it matter but when I open Avisynth now after updating to latest version I get the following error message:

    neo-f3kdb.dll

    Above plugin names contain undesirable symbols. Rename them to only use alphanumeric or underscores, or make sure to use them in short name style only.
    Last edited by Winsordawson; 11th Feb 2026 at 08:45.
    Quote Quote  
  11. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Originally Posted by Selur View Post
    side note: If you share a sample of your source instead of some reencode the suggestions might differ,....
    Thank you. I attached a sample encoded in Lagarith.
    Image Attached Files
    Quote Quote  
  12. out of curiosity: where does the strange resolution do 720x486 come from?
    SpotLess(RadT=3) and mClean(rn=0) seem a decent job.
    Last edited by Selur; 11th Feb 2026 at 11:03.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  13. Some NTSC capture devices capture 720x486 to include the entire 704x485 of the active NTSC frame. The extra width is captured in case the signal is slightly off center. The extra height to get the entire half line at the top and half line at the bottom. This ensures you get things like the line 21 closed captions.
    Quote Quote  
  14. Ah, didn't know that was a thing.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  15. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Thank you--So I should just ignore the deband feature?
    Quote Quote  
  16. If you think it helps use it.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  17. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Thank you, but I cannot use the deband feature unless I convert to YV12. So my question was whether the conversion loss from 4:2:2 to 4:2:0 is worth it for the benefit of the deband feature? I have often read not to rely on what looks good on my monitor (at least that is what Sanlyn used to write).
    Quote Quote  
  18. The script I gave in post #6 worked pretty well on the sample in post #1 but not the sample in post #11. The MaskHS values need adjusting.

    Code:
    LWLibavVideoSource("sample.avi")  # YV16
    
    unfiltered = BWDIF(1) # deinterlace
    filtered = QTGMC(InputType=2)
    pinkmask = unfiltered.Blur(0.0, 1.0).MaskHS(StartHue=50, EndHue=100, MinSat=5, MaxSat=15).mt_expand().mt_expand().mt_inpand().Blur(1.0).Blur(1.0).Blur(1.0).BilinearResize(width, height)
    Overlay(unfiltered, filtered, mask=pinkmask)
    Quote Quote  
  19. Applying QTFMC(InputType=2) on the separated fields, deinterlacing with QTGMC and latter applying mClean and Spotless seems to work fine to remove the flickering.
    Since I was curious what CodeFormer would do with such a content: https://imgsli.com/NDQ5Mjkz

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  20. Member
    Join Date
    Aug 2010
    Location
    Gliese 581 g
    Search PM
    Thank you--QTGMC did very well with the shimmer and flickering.

    That's a very "interesting" improvement, so say the least. The face is clearer, but it's a different woman
    Quote Quote  



Similar Threads

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