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

Ability to set fps of VideoFileClip #1069

Closed
garyo opened this issue Jan 29, 2020 · 4 comments · Fixed by #1329
Closed

Ability to set fps of VideoFileClip #1069

garyo opened this issue Jan 29, 2020 · 4 comments · Fixed by #1329
Labels
feature-request Request for a new feature or additional functionality. good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly.

Comments

@garyo
Copy link

garyo commented Jan 29, 2020

FFMPEG supports a "video file name" of image-%04d.png, and moviepy accepts this in VideoFileClip() which is great. But unfortunately it assumes 25 fps, and I don't see any way to change that. I can call clip=clip.set_fps(24) but that doesn't change the duration - I think it just skips frames.

It would be great if VideoFileClip could accept an optional fps arg for this case.

@tburrows13 tburrows13 added the feature-request Request for a new feature or additional functionality. label Feb 8, 2020
@tburrows13 tburrows13 added this to the Release v2.0.0 milestone Feb 23, 2020
@tburrows13
Copy link
Collaborator

As a workaround until this feature is added you can use .speedx() in conjunction with .set_fps().

E.g.
clip = clip.speedx(24/25).set_fps(24)

@tburrows13 tburrows13 added the good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly. label Jun 16, 2020
@tburrows13
Copy link
Collaborator

For reference for anyone wanting to implement this, I'd suggest a new optional parameter in .set_fps() called something like change_duration set to False by default. Then if it is true call speedx as I suggested above.

@badsketch
Copy link

I'd like to give this a shot 🙂

@tburrows13
Copy link
Collaborator

Thanks for offering however in this case I think that @mxbi may have already done it. No PR yet though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for a new feature or additional functionality. good-first-issue Especially suitable for people new to moviepy and/or programming; beginner-friendly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants