mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-02-01 03:51:42 +01:00
[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
This commit is contained in:
parent
70bdf32a88
commit
2a3acd318a
@ -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…
x
Reference in New Issue
Block a user