File tree 4 files changed +9
-8
lines changed
4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ def main(
208
208
config .background_color = WHITE
209
209
210
210
if settings .transparent_bg :
211
- settings .img_format = ImgFormat .png
211
+ settings .img_format = ImgFormat .PNG
212
212
213
213
t = datetime .datetime .fromtimestamp (time .time ()).strftime ("%m-%d-%y_%H-%M-%S" )
214
214
config .output_file = "git-sim-" + ctx .invoked_subcommand + "_" + t + ".mp4"
Original file line number Diff line number Diff line change 11
11
from manim .utils .file_ops import open_file
12
12
13
13
from git_sim .settings import settings
14
+ from git_sim .enums import VideoFormat
14
15
15
16
16
17
def handle_animations (scene : Scene ) -> None :
17
18
scene .render ()
18
19
19
- if settings .video_format == "webm" :
20
+ if settings .video_format == VideoFormat . WEBM :
20
21
webm_file_path = str (scene .renderer .file_writer .movie_file_path )[:- 3 ] + "webm"
21
22
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 } "
22
23
print ("Converting video output to .webm format..." )
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class StyleOptions(Enum):
27
27
28
28
29
29
class VideoFormat (str , Enum ):
30
- mp4 = "mp4"
31
- webm = "webm"
30
+ MP4 = "mp4"
31
+ WEBM = "webm"
32
32
33
33
34
34
class 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):
14
14
n = 5
15
15
files : Union [List [pathlib .Path ], None ] = None
16
16
hide_first_tag = False
17
- img_format : ImgFormat = ImgFormat .jpg
17
+ img_format : ImgFormat = ImgFormat .JPG
18
18
INFO_STRING = "Simulating: git"
19
19
light_mode = False
20
20
transparent_bg = False
@@ -30,7 +30,7 @@ class Settings(BaseSettings):
30
30
show_outro = False
31
31
speed = 1.5
32
32
title = "Git-Sim, by initialcommit.com"
33
- video_format : VideoFormat = VideoFormat .mp4
33
+ video_format : VideoFormat = VideoFormat .MP4
34
34
stdout = False
35
35
output_only_path = False
36
36
quiet = False
You can’t perform that action at this time.
0 commit comments