diff --git a/manimlib/config.py b/manimlib/config.py index 3937b6338f..b2a8ed82ea 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( + "-k", "--four_k", + action="store_true", + help="Render at a 4K quality", + ), parser.add_argument( "-g", "--save_pngs", action="store_true", @@ -214,12 +219,23 @@ 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) # If the resolution was passed in via -r if args.resolution: - if "," in args.resolution: + if args.resolution.lower() == "low": + camera_config.update(manimlib.constants.LOW_QUALITY_CAMERA_CONFIG) + elif args.resolution.lower() == "medium": + camera_config.update(manimlib.constants.MEDIUM_QUALITY_CAMERA_CONFIG) + elif args.resolution.lower() == "high": + camera_config.update(manimlib.constants.HIGH_QUALITY_CAMERA_CONFIG) + elif args.resolution.lower() == "4K": + camera_config.update(manimlib.constants.FOURK_CAMERA_CONFIG) + + elif "," in args.resolution: height_str, width_str = args.resolution.split(",") height = int(height_str) width = int(width_str) diff --git a/manimlib/constants.py b/manimlib/constants.py index 7d5957ff08..9ae2163af5 100644 --- a/manimlib/constants.py +++ b/manimlib/constants.py @@ -115,6 +115,12 @@ class MyText(Text): """ # 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,