4

The default size of picture or video rendered by manim is 1920*1080. But I want to resize it to for example 2000 * 2000, and I don't know how to modify it.

I browsed the doc of manim, but I haven't find any useful ways.

Can you help me with it?

enter image description here


I tried to modify frame_height,frame_width,frame_size,but nothing happend. https://docs.manim.community/en/stable/reference/manim._config.utils.ManimConfig.html#manim._config.utils.ManimConfig.frame_height

genpfault
  • 51,148
  • 11
  • 85
  • 139
zjnyly
  • 189
  • 1
  • 11

2 Answers2

10

you can use the -r, and set e.g. -r 2000,2000.

Here I wrote a whole tutorial how to change the pixel size: https://flyingframes.readthedocs.io/en/latest/ch5.html enter image description here

Kolibril
  • 1,096
  • 15
  • 19
  • I tried that like this: "manim -r 3664,1980 test.py TrigCircle". It renders alright but nothing is shown. The output is "Rendered TrigCircle Played 0 animations". And if I use "manim test.py TrigCircle -p -r 3664,1980" instead, the animation is played but with a black frame around. I can't seem to have the resolution and the video frame to be exactly my custom resolution. – Bachir Messaouri Sep 10 '22 at 10:42
0

TL;DR:

  • Do not use -q or --quality parameter, as those default to the standard manim's aspect ratio.
  • Set the desired pixel size with e.g. pixel_width and pixel_height.
  • Set either frame_width or frame_height to the number of desired logical units. No need to set the other one, it is automatically set for you.
  • If you want to render your video at other "qualities" you'll just have to adjust the pixel width/height.

E.g. the following manim.cfg does mainp's default "low quality" but in portrait orientation:

[CLI]
pixel_width = 450
pixel_height = 800
frame_width = 8
Juan A. Navarro
  • 10,595
  • 6
  • 48
  • 52