Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick highest fps when concatenating #416

Merged
10 commits merged into from
Feb 27, 2017
9 changes: 3 additions & 6 deletions moviepy/video/compositing/concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ def concatenate_videoclips(clips, method="chain", transition=None,
clips with smaller dimensions will appear centered. The border
will be transparent if mask=True, else it will be of the
color specified by ``bg_color``.

If all clips with a fps attribute have the same fps, it becomes the fps of
the result.

The highest fps among the clips will be the fps of the result clip.

Parameters
-----------
Expand Down Expand Up @@ -113,9 +112,7 @@ def make_frame(t):
result.audio = CompositeAudioClip([a.set_start(t)
for a,t in audio_t])

fps_list = list(set([c.fps for c in clips if hasattr(c,'fps')]))
if len(fps_list)==1:
result.fps= fps_list[0]
result.fps = max([c.fps for c in clips if hasattr(c,'fps')])

return result

Expand Down