Hi, I have an old animated film that I'm cleaning up and stabilizing to give it a more modern look.
As is often the case with animation, it's mostly animated in 12fps and sometimes 8fps.
I'd like to replace similar frames with others so they're 100% identical. Because of their analog nature (film), they have slight variations.
Do you have any tips for detecting all the "similar frames" and replacing them with a single one please ?![]()
+ Reply to Thread
Results 1 to 5 of 5
-
-
First thing you should do is clean your source to remove noise&co.
Then, if you want to do this manually, something like https://www.vapoursynth.com/doc/functions/video/freezeframes.html or ReplaceFramesSimple could be used.
One could also write a small script to replace frames that only differ less than x with the previous frame.
=> should be easily doable with Avisynth or Vapoursynth
I even wrote a Vapoursynth function for this a while ago:
(see: addDup)Code:def addDup(clip: vs.VideoNode, thresh: float = 0.3, debug: bool = False) -> vs.VideoNode: """ Detects frames with low temporal difference compared to their predecessor and duplicates the previous frame if the difference is below the given threshold. Optionally adds debug metadata. Parameters: clip (vs.VideoNode): Input video clip. thresh (float): PlaneStatsDiff threshold for duplication. debug (bool): If True, adds debug props to output frames. Returns: vs.VideoNode: Modified clip with duplicates inserted when differences are below threshold. """ ...
The function is small and documented, so understanding the idea behind it should be easy.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
There is also an AviSynth plugin for this purpose: http://avisynth.nl/index.php/Dup
-
Ah, totally forgot about that.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
You can also try Filldrops which will replace a duplicate by an interpolate frame. But the frame must be tagged as Duplicate.
Filldrops.avsi
Code:function filldrops (clip c) { vf=c.mvanalyse(truemotion=true,pel=2,isb=false,delta=1,idx=1) vb=c.mvanalyse(truemotion=true,pel=2,isb=true,delta=1,idx=1) global filldrops_d = c.mvflowinter(vb,vf,time=50,idx=1) global filldrops_c = c c.scriptclip("""ydifferencefromprevious()==0? filldrops_d : filldrops_c""") }Last edited by Hunk91; 8th Dec 2025 at 15:23.
Similar Threads
-
Duplicate frame removing
By Maximilian Goof in forum Newbie / General discussionsReplies: 3Last Post: 4th Dec 2024, 13:26 -
Does removing every 2nd duplicate frame worsens visual quality?
By nji9nji9 in forum EditingReplies: 3Last Post: 25th Apr 2023, 18:44 -
QTGMC shimmer when deinterlacing a duplicate frame
By PRAGMA in forum RestorationReplies: 8Last Post: 16th Apr 2023, 09:13 -
Old silent movie with weird duplicate frame pattern.
By dopethrone in forum Newbie / General discussionsReplies: 19Last Post: 6th Apr 2023, 20:37 -
Replace current video frame by duplicate of previous/next with "hot keys"
By semel1 in forum Newbie / General discussionsReplies: 2Last Post: 1st Feb 2021, 13:05


Quote