File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ def main(
208208 config .background_color = WHITE
209209
210210 if settings .transparent_bg :
211- settings .img_format = ImgFormat .png
211+ settings .img_format = ImgFormat .PNG
212212
213213 t = datetime .datetime .fromtimestamp (time .time ()).strftime ("%m-%d-%y_%H-%M-%S" )
214214 config .output_file = "git-sim-" + ctx .invoked_subcommand + "_" + t + ".mp4"
Original file line number Diff line number Diff line change 1111from manim .utils .file_ops import open_file
1212
1313from git_sim .settings import settings
14+ from git_sim .enums import VideoFormat
1415
1516
1617def handle_animations (scene : Scene ) -> None :
1718 scene .render ()
1819
19- if settings .video_format == "webm" :
20+ if settings .video_format == VideoFormat . WEBM :
2021 webm_file_path = str (scene .renderer .file_writer .movie_file_path )[:- 3 ] + "webm"
2122 cmd = f"ffmpeg -y -i { scene .renderer .file_writer .movie_file_path } -hide_banner -loglevel error -c:v libvpx-vp9 -crf 50 -b:v 0 -b:a 128k -c:a libopus { webm_file_path } "
2223 print ("Converting video output to .webm format..." )
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class StyleOptions(Enum):
2727
2828
2929class VideoFormat (str , Enum ):
30- mp4 = "mp4"
31- webm = "webm"
30+ MP4 = "mp4"
31+ WEBM = "webm"
3232
3333
3434class ImgFormat (str , Enum ):
35- jpg = "jpg"
36- png = "png"
35+ JPG = "jpg"
36+ PNG = "png"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Settings(BaseSettings):
1414 n = 5
1515 files : Union [List [pathlib .Path ], None ] = None
1616 hide_first_tag = False
17- img_format : ImgFormat = ImgFormat .jpg
17+ img_format : ImgFormat = ImgFormat .JPG
1818 INFO_STRING = "Simulating: git"
1919 light_mode = False
2020 transparent_bg = False
@@ -30,7 +30,7 @@ class Settings(BaseSettings):
3030 show_outro = False
3131 speed = 1.5
3232 title = "Git-Sim, by initialcommit.com"
33- video_format : VideoFormat = VideoFormat .mp4
33+ video_format : VideoFormat = VideoFormat .MP4
3434 stdout = False
3535 output_only_path = False
3636 quiet = False
You can’t perform that action at this time.
0 commit comments