VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 48
  1. I have some 3:2 pulldown material which is animated. I'm using AnimeIVTC with the following script, but I believe that there is "chroma ghosting" I can't figure out how to deal with it. This is the script I'm using and here's an example of the ghosting:

    AnimeIVTC(mode=1, killcomb=3)

    https://forum.videohelp.com/images/imgfiles/hOAhQJN.png

    I believe that this script here might help: http://forum.doom9.org/showthread.php?p=1582950#post1582950

    When I try and use it, I get an error in vdub saying that there's no function for "average" for srestore.avsi. Also, here's an example without "killcomb": https://forum.videohelp.com/images/imgfiles/ISrVtkc.png
    Quote Quote  
  2. Originally Posted by ROBO731 View Post


    When I try and use it, I get an error in vdub saying that there's no function for "average" for srestore.avsi.

    Whenever you can't find something in avisynth , use search terms like "whatever avisynth doom9" or "whatever avisynth mediawiki"

    The 1st hit for srestore on Google tells you where to find srestore and it's dependencies
    http://avisynth.nl/index.php/Srestore

    If you scroll down on that page under "requires filters", there are hot links to where to find average

    If you're lazy:
    http://forum.doom9.org/showthread.php?p=1129919#post1129919
    Quote Quote  
  3. Oh, sorry, I didn't realize that average was a dll I needed. The script works now, but it actually seems to have made it worse. While browsing external avs filters I came across this: http://forum.doom9.org/showthread.php?t=77074|

    However it doesn't contribute any improvement, luckily once the combing is removed by "killcomb" it becomes significantly less noticeable at full speed. It doesn't seem like any chroma filters or scripts are helping. Is it not chroma ghosting/bleeding?
    Last edited by ROBO731; 3rd Nov 2013 at 11:41.
    Quote Quote  
  4. The problem you're having is an interlaced YV12 video is being treated as progressive YV12 (Virtualdub is a big offender in this). That causes the colors of the two fields to blend together. Look for any colorspace conversions in your script and add "interlaced=true". Or the problem could be in your source, in which there's not a lot you can do about it. Upload a sample of your source.
    Quote Quote  
  5. I see, there's colorspace conversions in this line:

    mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12

    I'm not sure how to add the "interlaced=true" though, can you add it to the line for me?
    Quote Quote  
  6. You would change it like this:

    Code:
    mask = mask.ConvertToRGB32(interlaced=true).GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12(interlaced=true)
    But that is building a mask, so it may not be related to your problem. Post a sample of your source (not re-encoded) and the full script.
    Quote Quote  
  7. Unfortunately it didn't help. Here's a sample: https://forum.videohelp.com/attachments/20998-1383513995/sample.vob

    Here's the script, but the function in it doesn't really help as you will be able to see:

    Code:
    mpeg2source("D:\VTS_04_1_001_17.d2v")
    
    assumetff()
    AnimeIVTC(mode=1, killcomb=1)
    
    Function FixChromaBleeding (clip input) {
    
      # prepare to work on the V channel and reduce to speed up and filter noise
      area = input.tweak(sat=4.0).VtoY.ReduceBy2
    
      # select and normalize both extremes of the scale
      red = area.Levels(255,1.0,255,255,0)
      blue = area.Levels(0,1.0,0,0,255)
    
      # merge both masks
      mask = MergeLuma(red, blue, 0.5).Levels(250,1.0,250,255,0)
    
      # expand to cover beyond the bleeding areas and shift to compensate the resizing
      #mask = mask.ConvertToRGB32.GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12
      mask = mask.ConvertToRGB32(interlaced=true).GeneralConvolution(0,"0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0").ConvertToYV12(interlaced=true)
      
      # back to full size and binarize (also a trick to expand)
      mask = mask.BilinearResize(Width(input),Height(input)).Levels(10,1.0,10,0,255)
    
      # prepare a version of the image that has its chroma shifted and less saturated
      input_c = input.ChromaShift(C=-4).tweak(sat=0.8)
    
      # combine both images using the mask
      return input.overlay(input_c,mask=mask,mode="blend",opacity=1)
    }
    I was originally trying to take care of this with decomb, but it working differently for me than it was for a different person. Maybe you can try the script below and see if that works:

    Code:
    assumetff()
    telecide()
    decimate()
    Last edited by ROBO731; 3rd Nov 2013 at 18:02.
    Quote Quote  
  8. That chroma blending/chroma ghosting is in the original source

    For something like this, you can take advantage of the fact that the animation rate is low, around 12FPS

    So you can use srestore for the blend detection logic and decimate it . So you're not losing anything important (no unique frames) by throwing away those chroma blended frames and duplicate frames . You can add the duplicate frame back if you want (you would have to do that if your final format goal was something like DVD)

    Before anyone asks why not use Srestore for both blend and decimation operations, the reason is srestore doesn't work with certain frame rates because of it's pattern matching and will yield a script clip error

    Ignore the errors in the first few and last few frames - it's from the way the clip was cut

    Code:
    MPEG2Source()
    AssumeTFF()
    QTGMC(preset="faster", sharpness=0.6) #or use your bobber of choice
    SRestore(omode=4, speed=3)
    TDecimate(mode=7, rate=11.988)
    #ChangeFPS(24000,1001) #if you want to duplicate frames back to 23.976fps
    Image Attached Files
    Quote Quote  
  9. I see, thanks, but when I use the script and open it in vdub, I still get weird frames like this one: https://forum.videohelp.com/images/imgfiles/Yp198Xv.png
    Quote Quote  
  10. Are you seeking linearly ? You cannot seek all over the place with filters like srestore or many temporal filters . You have to go from several frames before (maybe a dozen or so) , frame by frame to the frame of interest . Non linear seeks often will give you mixed up frames with temporal filters
    Quote Quote  
  11. Yeah even when I go from 20 or so frames before, I still see it. Could it be a problem with my avisynth? I was originally using an MT version, then to switch back I just replaced the dll with one from regular 2.5.8.
    Quote Quote  
  12. Does it still occur when you go from the very beginning ?

    MT is definitely known to cause similar problems ; For this example I used vanilla 2.6 alpha 5 , but 2.5.8 should work as well
    Quote Quote  
  13. You removed the sample?
    Quote Quote  
  14. Yeah even from the start it still happens.

    Sorry, try this link for the sample: https://forum.videohelp.com/attachments/20998-1383513995/sample.vob
    Last edited by ROBO731; 3rd Nov 2013 at 18:03.
    Quote Quote  
  15. Here is a mirror of the original sample


    @ROBO731 - please don't remove samples so quickly; I noticed you did that on the other forum as well. Other people might have valuable insight or better solutions , but if you remove them so quickly they can't help out. Also, it can serve to help other people to learn how to treat similar issues

    It might have to do with different dependency .dll versions. Some people get slightly different results using srestore when using different versions like masktools . I think I'm using the ones listed directly on that page but I'll double check
    Image Attached Files
    Quote Quote  
  16. Originally Posted by poisondeathray View Post
    Here is a mirror of the original sample


    @ROBO731 - please don't remove samples so quickly; I noticed you did that on the other forum as well. Other people might have valuable insight or better solutions , but if you remove them so quickly they can't help out. Also, it can serve to help other people to learn how to treat similar issues
    Sorry, I use Mega for personal storage as well so I try to keep it clean, I'll leave the sample up for a while this time.
    Quote Quote  
  17. OK I don't even have that corresponding bad frame you posted pre-srestore , so I think that error occurs before srestore . It's probably occurring at the QTGMC stage . Comment out everything after QTGMC and examine at the frames
    Quote Quote  
  18. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Also, you should consider BETTER file-sharing sites than the Megaupload Resurrection

    Even on the day that I leave the Presto-based Opera behind, I will keep avoiding any site that requires tens of megabytes to be written on my HDD before it gives me permission to download anything else
    Quote Quote  
  19. ^yes, who knows how long "megaupload 2" will last ??? I'd hesitate to use it as personal storage


    Also sometimes QTGMC can make blends worse, as it's a temporal deinterlacer . I've posted some examples where that occurs . The original , original author didee even recommends using other deinterlacers for deblending work (IMO most of the time it's ok, but you should always look for problems)

    If you try yadifmod(order=1, mode=1 , edeint=nnedi3(field=3)) instead of the QTGMC line, do you see the same errors ? (again, go way way back about 30 frames then go frame by frame to examine)
    Quote Quote  
  20. I couldn't get anything good out of TIVTC, which surprised me. The damn thing claims to be mostly film where most of it is hard telecined. Very odd. Anyway, I think I got it to work OK with:

    Yadif(Mode=1)
    Srestore(Frate=23.976)

    QTGMC didn't work well on this one. But pdr's suggestion of:

    yadifmod(order=1, mode=1 , edeint=nnedi3(field=3))

    works better than the plain:

    Yadif(Mode=1)

    No aliasing created the way Yadif does.
    Quote Quote  
  21. Okay, commenting out all of the lines after QTGMC made it look even worse. Using just the yadifmod line from pdr also produces errors. Adding the Srestore line produces errors as well.
    Quote Quote  
  22. Be more specific when you say "produces errors" or "makes it look worse" . WTF does that mean ?

    Did you mean "chroma ghosting" ? Because that's supposed to be in there after the bob-deinterlacer (since it's in the orginal source)

    If you use

    MPEG2Source()
    AssumeTFF()
    SeparateFields()

    Take a look and you will see problems in individual fields . That is the underlying problem jagabo was describing. IT's due to improper interlaced handling of YV12<=>RGB conversion

    That' s in your original source

    Click image for larger version

Name:	378.png
Views:	436
Size:	134.3 KB
ID:	21001




    As for why you're getting completely different results.... I have no idea. Try re-installing avisynth from scratch and clear out your plugin folders. I doubt 2.6 vs. 2.5.8 is the cause
    Quote Quote  
  23. Originally Posted by manono View Post


    QTGMC didn't work well on this one. But pdr's suggestion of:


    That's weird, QTGMC worked ok for me this time at the bobbing stage... By that I mean it didn't introduce more bad blends

    Some more avisynth dll mysteries
    Quote Quote  
  24. Well the errors were kind of difficult to explain. Let me re-install avisynth from scratch, then if I still get the errors I'll post pictures.
    Quote Quote  
  25. You had the same issues with neuron2, correct ? You guys were getting different results from the same script/ same sample ?

    Clear out the plugins folder completely , and re-install avisynth , then add back the require plugins

    For masktools make sure you are using the correct version of the dll (there are 4 versions in the zip file, don't put them all in the plugins folders) . The ones labeled "25" are for avisynth 2.5.x . "26" are for avisynth 2.6.x
    Quote Quote  
  26. Originally Posted by poisondeathray View Post

    That's weird, QTGMC worked ok for me this time at the bobbing stage... By that I mean it didn't introduce more bad blends.
    Sorry, I should have been more clear. With this script:

    QTGMC("Faster")
    Srestore(Frate=23.976)


    I still had remaining chroma ghosting. With either Yadif or your YadifMod line followed by SRestore it was all gone. I was using that guy walking into the frame from the right to check.
    Last edited by manono; 3rd Nov 2013 at 17:21.
    Quote Quote  
  27. Yes, that 's what I started with. My preferred deinterlacer is QTGMC, my backup is yadifmod+nnedi3 . But there was still "ghosting" on a few frames with yadifmod/nnedi3.srestore or qtgmc.srestore (in this case I didn't see any worse blends with qtgmc) , so I used the modified script and framerate to get rid of them all .

    But looking at it more closely, there is a small section that is >12fps (when he is unrolling the newspaper), so you do lose one unique frame using that method . But there could very well be others in the larger video, so going with 23.976 is the safer thing to do and live with a few blends rather than lose a few unique frames
    Quote Quote  
  28. Okay, I've reinstalled avisynth and the only masktools dlls in my plugins folder are the regular and x64 versions for 2.5.x. With the script:

    Code:
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll")
    loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadifmod.dll")
    mpeg2source("D:\VTS_04_1_001_17.d2v")
    AssumeTFF()
    yadifmod(order=1, mode=1 , edeint=nnedi3(field=3))
    Srestore(Frate=23.976)
    #QTGMC(preset="faster", sharpness=0.6) #or use your bobber of choice
    #SRestore(omode=4, speed=3)
    #TDecimate(mode=7, rate=11.988)
    #ChangeFPS(24000,1001) #if you want to duplicate frames back to 23.976fps
    This is what I get on frame 49.
    Quote Quote  
  29. yeah, I can't reproduce that result. Very weird.

    I do notice your .d2v is has a different name than mine - you uploaded "sample.vob" the first time. Are you sure we are using the exact same video? I don't think so


    and x64 versions for 2.5.x.
    You should be using the x86 versions for 32bit avisynth
    Quote Quote  
  30. Yeah, I just renamed it when I uploaded it. Even with only the 32-bit masktools it's the same result.
    Quote Quote  



Similar Threads

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