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
#1
Hello



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



Frames:

1:1:1:2:2:2:3:3:3:4:4:4



Remove each duplicated number in order to get:

1:2:3:4



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).
Reply
#2
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
Reply
#3
Hi again,

The sample is linked below:

https://files.catbox.moe/d2sdtj.mp4

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:

https://files.catbox.moe/8asrul.mp4

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!
Reply
#4
Looking at "d2sdtj.mp4", I see no duplicate frames at all in the 85 frames.
Looking at the time codes
# timecode format v2
  0
  41.7
  83.4111111111111
  125.122222222222
  166.833333333333
  208.533333333333
  250.244444444444
  291.955555555556
  333.666666666667
  375.366666666667
  417.077777777778
  458.788888888889
  500.5
  542.2
  583.911111111111
  625.622222222222
  667.333333333333
  709.033333333333
  750.744444444444
  792.455555555556
  834.166666666667
  875.866666666667
  917.577777777778
  959.288888888889
  1001
  1042.7
  1084.41111111111
  1126.12222222222
  1167.83333333333
  1209.53333333333
  1251.24444444444
  1292.95555555556
  1334.66666666667
  1376.36666666667
  1418.07777777778
  1459.78888888889
  1501.5
  1543.2
  1584.91111111111
  1626.62222222222
  1668.33333333333
  1710.03333333333
  1751.74444444444
  1793.45555555556
  1835.16666666667
  1876.86666666667
  1918.57777777778
  1960.28888888889
  2002
  2043.7
  2085.41111111111
  2127.12222222222
  2168.83333333333
  2210.53333333333
  2252.24444444444
  2293.95555555556
  2335.66666666667
  2377.36666666667
  2419.07777777778
  2460.78888888889
  2502.5
  2544.2
  2585.91111111111
  2627.62222222222
  2669.33333333333
  2711.03333333333
  2752.74444444444
  2794.45555555556
  2836.16666666667
  2877.86666666667
  2919.57777777778
  2961.28888888889
  3003
  3044.7
  3086.41111111111
  3128.12222222222
  3169.83333333333
  3211.53333333333
  3253.24444444444
  3294.95555555556
  3336.66666666667
  3378.36666666667
  3420.07777777778
  3461.78888888889
  3503.5
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
Reply
#5
Hi,

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
Reply
#6
If it's a fixed pattern, you could also use 'SelectEvery', which will be way faster than using sRestore.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)