Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Display Modes
Old 11th March 2020, 12:24   #1  |  Link
color
Registered User
 
color's Avatar
 
Join Date: May 2016
Posts: 235
Drop/Remove Frames

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
...
__________________
Automatic Colorization

Last edited by color; 11th March 2020 at 13:03. Reason: my keyboard did press the "v"-keyboard, it does this sometimes. Don't know why.
color is offline   Reply With Quote
Old 11th March 2020, 13:18   #2  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Probably not so optimal solution, but assuming pattern doesn't changes the whole movie (python code below)
Quote:
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]
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
Notebook: Ryzen 7945HX, 64 GB RAM, RTX 4060, 17'' @ 240Hz @ 1440p
DJATOM is offline   Reply With Quote
Old 11th March 2020, 13:27   #3  |  Link
color
Registered User
 
color's Avatar
 
Join Date: May 2016
Posts: 235
Quote:
Originally Posted by DJATOM View Post
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.
__________________
Automatic Colorization
color is offline   Reply With Quote
Old 11th March 2020, 14:37   #4  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Quote:
Originally Posted by color View Post
I do however use avisynth
No problem with that. Python3 is handy interpreter for small calculations (and more).
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
Notebook: Ryzen 7945HX, 64 GB RAM, RTX 4060, 17'' @ 240Hz @ 1440p
DJATOM is offline   Reply With Quote
Old 11th March 2020, 17:52   #5  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,087
Quote:
Originally Posted by color View Post
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(…).

Last edited by Sharc; 12th March 2020 at 00:22.
Sharc is offline   Reply With Quote
Old 11th March 2020, 20:09   #6  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Sharc View Post
Have you tried the avisynth filters 'Dup' or 'DeDup'?
If the pattern is regular you could probably also use Selectevery(…).
Or 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.
manono is offline   Reply With Quote
Reply

Tags
remove frames

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.