mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix the file problem when combine videos on Windows
This commit is contained in:
parent
c06f7652cf
commit
56ed3538f6
2 changed files with 8 additions and 3 deletions
|
@ -733,8 +733,13 @@ class Scene(Container):
|
||||||
'-loglevel', 'error',
|
'-loglevel', 'error',
|
||||||
movie_file_path
|
movie_file_path
|
||||||
]
|
]
|
||||||
subprocess.call(commands)
|
combine_process = subprocess.Popen(commands)
|
||||||
|
combine_process.wait()
|
||||||
|
for pf_path in partial_movie_files:
|
||||||
|
os.remove(pf_path)
|
||||||
os.remove(file_list)
|
os.remove(file_list)
|
||||||
|
os.rmdir(partial_movie_file_directory)
|
||||||
|
os.rmdir(os.path.join(partial_movie_file_directory, os.path.pardir))
|
||||||
print("File ready at {}".format(movie_file_path))
|
print("File ready at {}".format(movie_file_path))
|
||||||
|
|
||||||
def tex(self, latex):
|
def tex(self, latex):
|
||||||
|
|
|
@ -15,7 +15,7 @@ def add_extension_if_not_present(file_name, extension):
|
||||||
def guarantee_existance(path):
|
def guarantee_existance(path):
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
return path
|
return os.path.abspath(path)
|
||||||
|
|
||||||
|
|
||||||
def get_scene_output_directory(scene_class):
|
def get_scene_output_directory(scene_class):
|
||||||
|
@ -78,4 +78,4 @@ def get_sorted_integer_files(directory,
|
||||||
elif remove_non_integer_files:
|
elif remove_non_integer_files:
|
||||||
os.remove(full_path)
|
os.remove(full_path)
|
||||||
indexed_files.sort(key=lambda p: p[0])
|
indexed_files.sort(key=lambda p: p[0])
|
||||||
return list(map(lambda p: p[1], indexed_files))
|
return list(map(lambda p: os.path.join(directory, p[1]), indexed_files))
|
||||||
|
|
Loading…
Add table
Reference in a new issue