View Full Version : Drop/Remove Frames
color
11th March 2020, 12:24
I am going crazy here, math is not my strongest side, so If someone can help me. I got a movie that dublicates (wrong frames) the hole movie (25 fps). So I need to drop frames/remove this frames. I don't know how to figure out the first frame that needs to be deleted, but when looking a bit in the movie, I get that this frames between 2518-2550 this must be removed:
...
2518
2520
2523
2525
2543
2545
2548
2550
...
DJATOM
11th March 2020, 13:18
Probably not so optimal solution, but assuming pattern doesn't changes the whole movie (python code below)
int(2518/25) = 100
100*25 = 2500
frames="""2518
2520
2523
2525
2543
2545
2548
2550"""
frames=frames.split('\n')
frames2=[int(i)-2500 for i in frames]
"""frames2 will have initial section, which is"""
[18, 20, 23, 25, 43, 45, 48, 50]
color
11th March 2020, 13:27
Probably not so optimal solution, but assuming pattern doesn't changes the whole movie (python code below)
Its the same pattern in the full movie. I do however use avisynth. :)
DJATOM
11th March 2020, 14:37
I do however use avisynth
No problem with that. Python3 is handy interpreter for small calculations (and more).
Sharc
11th March 2020, 17:52
Its the same pattern in the full movie. I do however use avisynth. :)Have you tried the avisynth filters 'Dup' or 'DeDup' or 'ExactDedup'?
If the pattern is regular you could probably also use Selectevery(…).
manono
11th March 2020, 20:09
Have you tried the avisynth filters 'Dup' or 'DeDup'?
If the pattern is regular you could probably also use Selectevery(…).
Or TDecimate (http://avisynth.nl/index.php/TIVTC/TDecimate).
There might not be enough information supplied yet to be sure, but it seems there are 4 duplicate frames in every 25. If so, the TDecimate syntax goes:
TDecimate(Mode=0,Cycle=25.CycleR=4)
Again, as Sharc says, this relies on the pattern being regular. And the result is 21fps, an odd framerate unless, maybe, it's a silent film.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.