[pp:ugoira] fix high frame rates (#4421)

only return an output frame rate for non-uniform ugoira
when the frame delay gcd is >= 10, i.e. 100 fps
pull/4489/head
Mike Fährmann 1 year ago
parent 70bdf32a88
commit 2a3acd318a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -282,10 +282,14 @@ class UgoiraPP(PostProcessor):
return timecodes
def calculate_framerate(self, frames):
uniform = self._delay_is_uniform(frames)
if uniform:
if self._delay_is_uniform(frames):
return ("1000/{}".format(frames[0]["delay"]), None)
return (None, "1000/{}".format(self._delay_gcd(frames)))
gcd = self._delay_gcd(frames)
if gcd >= 10:
return (None, "1000/{}".format(gcd))
return (None, None)
@staticmethod
def _delay_gcd(frames):

Loading…
Cancel
Save