Log in

View Full Version : Delete every 2 frame every...


color
10th October 2018, 13:30
I got a movie that has 2 frames blended that I want to remove. But I don't know how to get it to work.

It seems like its

frame 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22

1. remove
2. remove
3. keep
4. keep
5. keep
6. keep
7. keep
8. keep
9. keep
10. keep
11. remove
12. remove
13. keep
14. keep
15. keep
16. keep
17. keep
18. keep
19. keep
20. keep
21. remove
22. remove

The first frame that needs to remove is "783", its text in the beginning so I don't know exactly the first frame that needs to be removed. Is it possible to take frame 10 and replace it with 11 and frame 13 to 12?

I am not allowed to post a short clip sadly, but I might be able to send on PM if its deleted after.

EDIT: I now see that one frame that is blended "235", so it might not be 2 frames every 10, but most of the time this seems to be it. I can send the file thru PM if someone can help me.

VS_Fan
10th October 2018, 14:05
SelectEvery(clip, 10, 3, 4, 5, 6, 7, 8, 9, 10)

or:

SelectEvery(clip, 10, 2, 3, 4, 5, 6, 7, 8, 9)

SelectEvery (http://avisynth.nl/index.php/SelectEvery)

color
10th October 2018, 14:15
It does not work. I did try "SelectEvery(clip, 10, 3, 4, 5, 6, 7, 8, 9, 10)" first but before I realised it might be the 3rd frame that is the first one that is needed, then I tried " SelectEvery(clip, 10, 1, 2, 5, 6, 7, 8, 9, 10)", it does work a bit in the movie. it seems it skips now and then (the blended frames).

It does work to skip every 2th frame like "#SelectEvery(2, 0).Cdeblend()", but It does not work with original framerate. I want to keep all that I can.

VS_Fan
10th October 2018, 14:23
EDIT: I now see that one frame that is blended "235", so it might not be 2 frames every 10, but most of the time this seems to be it. I can send the file thru PM if someone can help me.If you were to remove duplicated frames (2 in every 10), you could try:

#TDecimate (http://avisynth.nl/index.php/TIVTC/TDecimate)filter in TIVTC (http://avisynth.nl/index.php/TIVTC) plugin package:
TDecimate(CycleR=2, Cycle=10)

color
10th October 2018, 14:41
It does still after using "TDecimate(CycleR=2, Cycle=10)" have some blended frames.

wonkey_monkey
10th October 2018, 16:47
TDecimate is meant for deleting duplicates rather than blends. You could try srestore(x), where x is the current framerate multipled by 0.8, although I'm not sure how well it would work in this case.

Be advised that if you jump around in the file (in VirtualDub for example), srestore takes a few frames to stabilise.

Actually, given that you've got two blended frames in a row, you may need something more complicated to get a decent result. Are they duplicates of each other? Do all original frames exist on either side of the blends?

color
10th October 2018, 16:51
It does work with srestore when first skipping every second frame. I think that is the best to be done. Thank you. :)