Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add 4K option

safinsinghe5bca5fccecd
diff --git a/manimlib/config.py b/manimlib/config.py
index 3937b6338..2ca60301e 100644
--- a/manimlib/config.py
+++ b/manimlib/config.py
@@ -50,6 +50,11 @@ def parse_cli():
action="store_true",
help="Render at a high quality",
),
+ parser.add_argument(
+ "--four_k",
+ action="store_true",
+ help="Render at a 4K quality",
+ ),
parser.add_argument(
"-g", "--save_pngs",
action="store_true",
@@ -214,6 +219,8 @@ def get_camera_configuration(args):
camera_config.update(manimlib.constants.MEDIUM_QUALITY_CAMERA_CONFIG)
elif args.high_quality:
camera_config.update(manimlib.constants.HIGH_QUALITY_CAMERA_CONFIG)
+ elif args.four_k:
+ camera_config.update(manimlib.constants.FOURK_CAMERA_CONFIG)
else:
camera_config.update(manimlib.constants.PRODUCTION_QUALITY_CAMERA_CONFIG)
diff --git a/manimlib/constants.py b/manimlib/constants.py
index 7d5957ff0..9ae2163af 100644
--- a/manimlib/constants.py
+++ b/manimlib/constants.py
@@ -115,6 +115,12 @@ NO_SCENE_MESSAGE = """
"""
# There might be other configuration than pixel shape later...
+FOURK_CAMERA_CONFIG = {
+ "pixel_height": 2160,
+ "pixel_width": 3840,
+ "frame_rate": 60,
+}
+
PRODUCTION_QUALITY_CAMERA_CONFIG = {
"pixel_height": 1440,
"pixel_width": 2560,