Skip to content

Option to auto rerender and play videos when their source code is modified #4235

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

Open
godalming123 opened this issue May 2, 2025 · 5 comments
Labels
new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Comments

@godalming123
Copy link

godalming123 commented May 2, 2025

Description of proposed feature

This would be useful, since it would save a couple keystrokes when you want to preview how a video looks with a change applied to it. There would also be an optional delay where manim would only start rendering the video after the source code hadn't been changed for a short period of time to avoid unnecessarily wasting CPU to render videos that never get looked at.

How can the new feature be used?

A flag for the manim render command.

This feature would be especially useful for fine tuning where the user is previewing there code in between every small adjustment to there code, say a delay within a LaggedStart.

@godalming123 godalming123 added the new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) label May 2, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board May 2, 2025
@uwezi
Copy link
Contributor

uwezi commented May 2, 2025

Manim itself as a Python library cannot achieve this, but there is Manim Sideview, which has this option.
https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview

There might also exist plugins or tools for your operating system which can automatically run an application when a change in a file are detected.

@godalming123
Copy link
Author

Manim itself as a Python library cannot achieve this

Can't you use something like watchdog to detect changes in the source code, and then use the existing rendering code to rerender and preview the new video whenever the source code changes?

@uwezi
Copy link
Contributor

uwezi commented May 3, 2025

Can't you use something like watchdog to detect changes in the source code, and then use the existing rendering code to rerender and preview the new video whenever the source code changes?

Manim is not running between renderings.
Have you looked into Manim Sideview?

@godalming123
Copy link
Author

I don't want to use manim sideview because I don't use VS code, although there is an editor agnostic command which uses entr:

echo main.py | entr -cr manim render MANIM_RENDER_OPTIONS

@uwezi
Copy link
Contributor

uwezi commented May 3, 2025

there is an editor agnostic command which uses entr:

echo main.py | entr -cr manim render MANIM_RENDER_OPTIONS

editor agnostic, but not operating system agnostic...

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
Status: 🆕 New
Development

No branches or pull requests

2 participants