Skip to content

Specify FPS from commandline #1142

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

Closed
WampyCakes opened this issue Mar 21, 2021 · 7 comments · Fixed by #1013
Closed

Specify FPS from commandline #1142

WampyCakes opened this issue Mar 21, 2021 · 7 comments · Fixed by #1013
Labels
new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Comments

@WampyCakes
Copy link
Contributor

Description of proposed feature

You should be able to specify what frame rate to use when rendering from the commandline. Something like --fps 30

How can the new feature be used?

Setting fps without modifying the manim script

@WampyCakes WampyCakes added the new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) label Mar 21, 2021
@leotrs
Copy link
Contributor

leotrs commented Mar 21, 2021

Not saying this is a replacement for the requested feature, but you can set FPS independently of quality using a config file.

@behackl
Copy link
Member

behackl commented Mar 21, 2021

I've always been wondering why the fps couldn't be set from the CLI -- thanks for opening an issue. It should be easy to add a flag; but we shouldn't do so before #1013 is merged.

@WampyCakes
Copy link
Contributor Author

@leotrs The problem is that quality sets both resolution and fps. I think we should be able to use quality flags and also be able to independently set fps and resolution from the commandline. I am in a situation atm where that would be helpful, and as it pertains to rendering, it belongs as an option in the command. You don't always want to have to modify your config or script for quality.

@leotrs
Copy link
Contributor

leotrs commented Mar 21, 2021

Yeah that's fair. I think in this case it is warranted. However, I would advise against the proliferation of CLI flags in general...

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Mar 22, 2021

I've always been wondering why the fps couldn't be set from the CLI -- thanks for opening an issue. It should be easy to add a flag

Agreed it would be easier -- in fact, I've already done some work for that because it didn't make sense to have --webgl_updater_fps and not a general fps for each renderer.

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Mar 22, 2021

Click isn't in the spirit of freedom with the CLI. It's supposed to standardize the CLI to make intuitive sense with other POSIX compliant CLIs. In some cases, it would be very against Click's design to implement it like Argparse currently does -- so instead I opted to break the CLI's API and do some housekeeping/reorganization. The flags should all be there and if there was a test case written for it, it should still work.

fps is one example where it doesn't work in the cairo renderer (but webgl should work) and I'd have to write a video test or something to ensure proper functionality in the future

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Mar 22, 2021

This is now fixed in Cairo rendering in #1013, try using --fps 29.97, or --frame_rate 29.97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants