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

Add change_duration flag to Clip.set_fps() #1329

Merged
merged 5 commits into from
Oct 4, 2020

Conversation

mxbi
Copy link
Contributor

@mxbi mxbi commented Oct 4, 2020

This pull fixes #1069 by adding a new change_duration=False flag to Clip.set_fps. When False, original behaviour is conserved, When true, the speed and duration of the video are both changed when the fps is changed (so that all frames are preserved 1:1).

I have yet to write tests but on some test videos the behaviour is as expected.

  • I have added suitable tests demonstrating a fixed bug or new/changed feature to the test suite in tests/
  • I have properly documented new or changed features in the documentation or in the docstrings
  • I have properly explained unusual or unexpected code in the comments around it
  • I have formatted my code using black -t py36

@coveralls
Copy link

coveralls commented Oct 4, 2020

Coverage Status

Coverage increased (+0.05%) to 67.532% when pulling d746418 on mxbi:fps-changeduration into 3a6f014 on Zulko:master.

@tburrows13 tburrows13 merged commit d367014 into Zulko:master Oct 4, 2020
@tburrows13 tburrows13 added the feature New addition to the API i.e. a new class, method or parameter. label Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New addition to the API i.e. a new class, method or parameter.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to set fps of VideoFileClip
3 participants