This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

VS Duplicate Frame Removal incl Output fps modification

Is there a VS Plugin that allows for a one way Frame Duplicate Detection, Removal and then Encoding the new file or even better apply the filters onto only the NON-Duplicated Frames.

Let me elaborate



Remove each duplicated number in order to get:


And then apply filters only on the new output above.

The main use case is Anime Frame Interpolation where Performance ( in my case ) matters a lot. sRestore seems to remove the duplicates but it ends up encoding the video at the original input framerate, ( essentially it turns 1:2:3:4 -> 1:1:1:1:2:2:... ). FillDrops is great, really great, but the performance degradation is atrocious.

I do want to mention that I am no expert, maybe one of the above mentioned filters would work great and I could have very well just messed up the settings, the settings I've tried for sRestore are: Omode 6, Speed 25, Thresh 16, Mode 2/4 and have also played around with Decimate After but it doesn't do much for me. Changing the FRate could technically work but the main issue is that I have a decently large library in which the clips could be drawn every second on a different pacing, meaning that inputting a Frate of 12 when one second there could be 6 'real' frames and other seconds it could have 24 , thing which would not help.

One other thing is audio isn't an issue nor is Video Pacing, my main use case is Slow-Motion and I only care about removing the 'dead' or 'stuck' frames from my interpolation(s).
FillDrops is meant for single duplicate removal.
Nope, afaik. there is no such filter which does what you want. Especially if you have vfr content.
You would need to write a filter/script of your own to do what you want.

Got a sample to illustrate what your source looks like?

Cu Selur
Hi again,

The sample is linked below:

It is a very simple input where the frames were drawn on 4s meaning there's 3 duplicates for each original frame, of course since this is longer than one second the framerate or rather the duplication method could change depending on the second that we are referring to.

This is a link for my sRestore Attempt:

As you can see, there are 1 duplicate frames for each original frame ( at least that's what I have concluded from importing and then seeking through After Effects ). Also the container is still recognized as 4 seconds long despite there only really being some 2 seconds in total.

I believe that maybe a DDFI-Rife like implementation where each duplicate frame is removed through a VMAF / PSNR pass would be the best way to go by, this is of course excluding the whole interpolation part.

My current method of doing this right now is just manually seeking through After Effects and then removing each duplicate frame and then exporting the created clip inside a 1s container that has all of the NON-Duplicated frames inside of it, ( basically 1 second long and X fps container ). I know this is not ideal but it bypasses the requirement for VFR.

Thank you!
Looking at "d2sdtj.mp4", I see no duplicate frames at all in the 85 frames.
Looking at the time codes
# timecode format v2
frames also seem to be displayed ~41.7ms, that content seems to be cfr with 23.976.
(If your whole content is like that, first thing I would do is remux the content while dropping the time codes.)

8asrul.mp4 has only 35 frames and no duplicates there either.

Could it be that you configured your player to output 60fps, and you see the duplicates only because your player creates them?
Looking at the files in Vapoursynth I see no duplicates.

Cu Selur

Thank you for pointing that one out, you are entirely correct, looking at the Original Input footage now I can see that it is not a good input since it indeed has differences within each frame.

I have re-done the testing on a new input which I tripple checked to have duplicated frames in AE & VLC and this one for sure has to have 1 duplicated frame.

After doing sRestore on it seems to have removed the frames correctly, I will have to do further testing on clips that have more than one duplicated frames ( drawn on 3s and 4s ), I will get back to this in a few hours.

Thank you
If it's a fixed pattern, you could also use 'SelectEvery', which will be way faster than using sRestore.

Cu Selur

Forum Jump:

Users browsing this thread: 1 Guest(s)