VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Hello,
    is there a way to remove doubles from following video (to make it play smooth)?

    https://www.youtube.com/watch?v=8Akb1t37T4E

    I cannot find any pattern so If I'm not mistaken there is only a hard way of finding and removing doubles: manually, correct?
    Last edited by adom; 23rd Aug 2014 at 02:48.
    Quote Quote  
  2. Although it can be done, it won't do you any good to remove the duplicate frames because for every duplicate frame there's also a missing unique frame. The video was made by an idiot.
    Quote Quote  
  3. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    Thanks
    Quote Quote  
  4. It can be done but it will be time consuming and the results won't be perfect. Here's a short example with the original on the top, fixed on the bottom. Note the weird distortion (from motion interpolation) at the right edge of the frame.
    Attached Files
    Quote Quote  
  5. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    ... and the results won't be perfect ...
    for me it looks perfect - could you tell how to make it ?
    Quote Quote  
  6. I manually searched for missing and duplicate frames then used an AviSynth script to remove the duplicates and motion interpolate replacement frames. Finally, I encoded the script with the x264 command line encoder. That short segment took me several minutes.

    I noticed that there was usually a skipped frame near the duplicate frames so I used a single ReplaceFramesMC() to replace the duplicate frame and the missing frame. For example, frame 25 was a duplicate of frame 24 and there was a missing frame just before frame 28.

    original video sequence, 5 consecutive frames:
    Code:
    24 25 26 27 28
    sequence found in the encoded video:
    Code:
    24 24 25 26 28
    So I used ReplaceFramesMC(25,3) to replace the three frames from 25 to 27 with motion interpolated from the two surrounding frames, 24 and 28:
    Code:
    24 25 26 27 28
    Red indicates the synthesized motion interpolated frames. It would be better to remove the duplicate frame 24 then insert only one interpolated frame between 26 and 28.
    Code:
    24 25 26 27 28
    But that's a little harder to do (because when you remove frames the numers of the rest of the frames change so it's harder to keep track of frame numbers).

    Code:
    import("ReplaceFramesMC.avs") 
    ffVideoSource("Vangelis - Beautiful Planet Earth [HD].mp4") 
    Crop(0,90,-0,-90)
    Trim(2723,2839)
    ReplaceFramesMC(3,2)
    ReplaceFramesMC(17,2)
    ReplaceFramesMC(21,2)
    ReplaceFramesMC(25,3)
    ReplaceFramesMC(29,5)
    ReplaceFramesMC(42,2)
    ReplaceFramesMC(46,2)
    ReplaceFramesMC(50,3)
    ReplaceFramesMC(54,3)
    ReplaceFramesMC(67,2)
    ReplaceFramesMC(71,2)
    ReplaceFramesMC(75,3)
    ReplaceFramesMC(79,3)
    ReplaceFramesMC(92,2)
    ReplaceFramesMC(96,3)
    ReplaceFramesMC(100,2)
    ReplaceFramesMC(113,2)
    You can find ReplaceFrameMC() in these forums. It requires MvTools. And AviSynth, of course. It will take you hours to go through the entire video. That's why I selected only a short segment. And this type of motion interpolation doesn't work well for complex motions.
    Last edited by jagabo; 23rd Aug 2014 at 11:00.
    Quote Quote  
  7. Member
    Join Date: Jan 2011
    Location: poland
    Search Comp PM
    I was aware I'd have to use avisynth but frankly speaking had no idea how to use it for such task.

    Seeing what you did here I'm just going to drop that project since it will take forever to run through the whole video and do the same thing.

    And your example with very detailed explanation was REALLY very helpful - Thank You.
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date: Oct 2001
    Location: Deep in the Heart of Texas
    Search Comp PM
    Hypothetically speaking, if working with frame #s gets things shifted, one can work back-to-front and the remaining (earlier) frame #s shouldn't get affected. Depending upon the app/plugin/filter, YMMV.

    Scott
    "When will the rhetorical questions end?!" - George Carlin
    Quote Quote