Update utils.py

fix window error
This commit is contained in:
AIFSH
2024-05-31 21:13:34 +08:00
committed by GitHub
parent 0afc77fdcc
commit 75eaa97f2b
+3 -1
View File
@@ -86,7 +86,9 @@ def save_video(video_tensor, audio_path, output_path, fps=30.0):
cmd = (f'{get_ffmpeg_exe()} -i "{temp_output_path}" -i "{audio_path}" '
f'-map 0:v -map 1:a -c:v h264 -shortest -y "{output_path}" -loglevel quiet')
os.system(cmd)
os.system(f'rm -rf "{temp_output_path}"')
import shutil
shutil.rmtree(temp_output_path)
# os.system(f'rm -rf "{temp_output_path}"')
def compute_dist(x1, y1, x2, y2):