VideoHelp Forum
+ Reply to Thread
Results 1 to 20 of 20
Thread
  1. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    I have a choppy xvid someone made from a video on demand - probably used a screen capture program set at 29.97 fps. I'd like to reencode it in, and while TDecimate (in Avisynth) improves it, there's still left-over dupes every couple seconds, causing a pause. I added TFM (which is probably unnecessary), and looked into the different TDecimate options but I havent hit on the right solution. Also tried Multidecimate with no luck.
    Image Attached Files
    Quote Quote  
  2. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The sample appears to have originally been film-based progressive with 3:2 pulldown but has been incorrectly deinterlaced. Try the Srestore() plugin to restore it to progressive 23.972 FPS.
    Last edited by sanlyn; 25th Mar 2014 at 11:03.
    Quote Quote  
  3. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    tried it already, but thanks
    Quote Quote  
  4. TDecimate(mode=2, rate=23.976) comes close. But there are still a few duplicate frames and skipped frames. You can probably get better results with a little fine tuning (maxndl, dupThresh, etc.).
    Last edited by jagabo; 2nd Mar 2013 at 23:10.
    Quote Quote  
  5. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    it was the fine tuning I needed help with. I'd try AnimeIVTC but the plugin package is dead.
    I thought there'd be an easier way to set TDecimate to delete the extra set of duplicates every couple seconds (at least that's what it looks like on the video which might not be apparent on the clip), but I tried some of the TDecimate settings without improvement.
    Quote Quote  
  6. Well, the source clip is missing frames so you will never get perfect results. For example, between frames 119 and 121 there is a duplicate frame. The real frame 120 is missing. The same happens between frames 124 and 126. This is why there are still duplicate frames after TDecimate. To hit the right frame rate those duplicate frames must be left in to make up for the missing frames. You could decimate to a lower frame rate to remove the duplicates but you'll still have jerks at the missing frames. You could try using ReplaceFramesMC() (aka, RX()) to reconstruct the missing frames. But you'll have to locate the duplicate frames by hand.

    Frames 96, 100, 156, 160 (after decimation) replaced with motion compensated frames.

    import("C:\Program Files (x86)\AviSynth 2.5\plugins\ReplaceFramesMC.avs")

    Code:
    AviSource("Short.avi") 
    TDecimate(mode=2, rate=23.976)
    ReplaceFramesMC(96,1)
    ReplaceFramesMC(100,1)
    ReplaceFramesMC(156,1)
    ReplaceFramesMC(160,1)
    Image Attached Files
    Last edited by jagabo; 3rd Mar 2013 at 09:09.
    Quote Quote  
  7. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    thanks. As it's an xivd, I'll just live with the TDecimate version.
    So this was suppose to be recorded from VOD (either from Amazon or Netflix), and usually people use screen capture programs. Can we say if the problem was caused by wrong capture setting?
    Quote Quote  
  8. Note I added a sample script and clip.

    Originally Posted by spiritgumm View Post
    So this was suppose to be recorded from VOD (either from Amazon or Netflix), and usually people use screen capture programs. Can we say if the problem was caused by wrong capture setting?
    There's no way of telling. Unless you want to pay to stream the clip yourself.
    Quote Quote  
  9. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    if I could find a reliable free screen capture program, I'd try it. In this case, the movie is no longer available on those sites. If we knew the problem was the wrong capture rate, I'd ask the guy with the xvid if he still had the VOD and would try a new setting.

    Jagabo, the clip looks great, but even if it were dvd video and not xvid, it's not worth it to write a script itemizing missing frames every every couple seconds for a 90 minute movie.
    Quote Quote  
  10. You can automatically fill in duplicates with motion interpolation using Mug Funky's "filldrops" or related filters

    I would actually leave it 29.97 , it is the smoothest to my eyes. The other option is to use some sort of decimation then filldrops, or filldrops then some decimation resulting in 23.976. . Test it the options on some longer sequences

    To tweak the results of detection, add show=true at the conditionalfilter line . 1.3 is usually a good value

    AVISource()
    Filldrops2()


    function filldrops2 (clip c)
    {
    even = c
    super_even=MSuper(even,pel=2)
    vfe=manalyse(super_even,truemotion=true,isb=false, delta=1)
    vbe=manalyse(super_even,truemotion=true,isb=true,d elta=1)
    filldrops_e = mflowinter(even,super_even,vbe,vfe,time=50)

    ConditionalFilter(even, filldrops_e, even, "YDifferenceFromPrevious()", "lessthan", "1.3")

    }
    Image Attached Files
    Quote Quote  
  11. Originally Posted by poisondeathray View Post
    You can automatically fill in duplicates with motion interpolation using Mug Funky's "filldrops" or related filters
    Interesting filter. Sample #1 has a speed up, slow down, jerkiness several times a second. It didn't really work in #3. It might be an acceptable automated compromise for the OP though.

    I'm trying to figure out exactly what the filter does. I think it replaces duplicate frames with motion interpolated frames from the two surrounding frames?
    Last edited by jagabo; 3rd Mar 2013 at 10:33.
    Quote Quote  
  12. Originally Posted by jagabo View Post
    Originally Posted by poisondeathray View Post
    You can automatically fill in duplicates with motion interpolation using Mug Funky's "filldrops" or related filters
    Interesting filter. Sample #1 has a speed up, slow down, jerkiness several times a second. It didn't really work in #3. It might be an acceptable automated compromise for the OP though.

    I'm trying to figure out exactly what the filter does. I think it replaces duplicate frames with motion interpolated frames from the two surrounding frames?

    It detects duplicate pairs, motion interpolates the 2nd frame with an "inbetween" frame

    His problem , however , is there are legitimate duplicates from telecine, and non legit duplicates (from dropped frames due to capture ) . This filter won't distinguish between which are legit which are not
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    It detects duplicate pairs, motion interpolates the 2nd frame with an "inbetween" frame
    Which explains why it doesn't work with some of the duplicates after decimating the OP's video -- on those the first of the duplicates is the one that needs to be interpolated, not the second.
    Quote Quote  
  14. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    posion, if you saw the whole video, you'd see its unacceptable.
    Seems like regular decimation should come first, followed by filldrops - assuming it's substituting a new field for a duplicate field.
    I thought the first clip was the best of the three, but I still see a pause near the start.
    Quote Quote  
  15. Yes, FillDrops2() is designed for use when you have captures with dropped frames -- where the capture device substituted a copy of the previous frame to fill in for the missing frame. In cases like that you have a sequence like:

    1233567...

    A second copy of frame 3 was substituted for the missing frame 4. When FillDrops2() sees the two copies of frame 3 it generates an in between frame between the first 3 and the following 5. Which comes close to what frame 4 would have looked like.

    123(4)567

    But after decimating your sample video you have some sequences like:

    1235567...

    In this case FillDrops2() replaces the second 5 with motions interpolated between 5 and 6. So you still have a jerk between frames 3 and 5, followed by "5.5" then 67...:

    1235(5.5)67...
    Quote Quote  
  16. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    huh.
    After nominal decimation, the duplicate frame occurs (from what I see) once every couple seconds. Seems like the solution should be at our fingertips.
    Quote Quote  
  17. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    poison, this filldrops concept should work with this, but it seems to stop working and go bonkers. I tried another clip, decimated it first, then ran that clip thru your script. It worked with the first pair if dupe frames, didnt quite catch the 2nd group, then started outputting very slow video.
    Quote Quote  
  18. Originally Posted by spiritgumm View Post
    poison, this filldrops concept should work with this, but it seems to stop working and go bonkers. I tried another clip, decimated it first, then ran that clip thru your script. It worked with the first pair if dupe frames, didnt quite catch the 2nd group, then started outputting very slow video.

    Are they duplicate pairs , or triplicates ? This will only detect duplicates

    Theoretically you shouldn't decimate it first because you are missing frames (unless the decimation was done manually). Script based decimation isn't always perfect here - If you throw out the wrong frame with the decimation before you fill in the missing frames, you will never get smooth motion

    None of these scripts will work perfectly, because you are missing frames, and have telecine (legitimate duplicates) . Since it can't distinguish between between the 2 types of duplicates , you either have to do it manually as jagabo suggested, or accept this "half measure"

    Filldrops and related filters are designed for video ie. 25 or 29.97 captures, where you have dropped frames that manifest as duplicates (and they are not supposed to have duplicates), not telecine

    Without a better description or sample, I'm guessing you might need to tweak the conditional filter value (you might get false positives - it might replace "good frames", thinking that 2 different frames are the same, or you might get missed duplicates - if the detection value isn't sensitive enough)
    Quote Quote  
  19. Originally Posted by spiritgumm View Post
    poison, this filldrops concept should work with this, but it seems to stop working and go bonkers. I tried another clip, decimated it first, then ran that clip thru your script. It worked with the first pair if dupe frames, didnt quite catch the 2nd group, then started outputting very slow video.
    I already explained why that happens. In short, filldrops assumes the second of the duplicate frames is the one that needs replacing. But in your video it's sometimes the first that needs replacing.
    Last edited by jagabo; 4th Mar 2013 at 16:37.
    Quote Quote  
  20. Member spiritgumm's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by spiritgumm View Post
    poison, this filldrops concept should work with this, but it seems to stop working and go bonkers. I tried another clip, decimated it first, then ran that clip thru your script. It worked with the first pair if dupe frames, didnt quite catch the 2nd group, then started outputting very slow video.
    I already explained why that happens. In short, filldrops assumes the second of the duplicate frames is the one that needs replacing. But in your video it's sometimes the first that needs replacing.
    I know, but I was just prompting the old boy to have a look at the Filldrops script. If it works half the time, that would be an improvement...but what about the crazy added frames later - a glitch in the script?
    Quote Quote  



Similar Threads

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