ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
21.42k stars 1.57k forks source link

Use stdin as input will generate the output video in a "-" folder. Can I modify it ? #3788

Open zhangsn opened 4 months ago

zhangsn commented 4 months ago

Description of bug / unexpected behavior

use - to input from stdin without creating a python file

manim -qm - Demo Manim Community v0.18.1

[05/29/24 05:11:55] INFO Enter the animation's code & end with an EOF (CTRL+D on Linux/Unix, CTRL+Z on Windows): [python file content] CTRL+D

The video will be generated at "/manim/media/videos/-/720p30/Demo.mp4". The folder name "-" can not be parameterized.

Expected behavior

any extra parameter to control this folder name?

uwezi commented 4 months ago

you can configure the output directory using the media_dir attribute:

https://docs.manim.community/en/stable/reference/manim._config.utils.ManimConfig.html#manim._config.utils.ManimConfig.media_dir

https://docs.manim.community/en/stable/guides/configuration.html