From 9010d14a129a045136ed946dc09fc3537ee28c94 Mon Sep 17 00:00:00 2001 From: iaacornus Date: Wed, 8 Jun 2022 00:05:38 +0800 Subject: [PATCH] include / in regex pattern to avoid confusing ffmpeg --- video_creation/final_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 3ea3101..2d23bc8 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -80,7 +80,7 @@ def make_final_video(number_of_clips, file_name): if file_name is None: filename = re.sub( - "[?\"%*:|<>]", "", (f"assets/{reddit.subreddit.submission.title}.mp4") + "[?\"%*:|<>]/", "", (f"assets/{reddit.subreddit.submission.title}.mp4") ) final.write_videofile(filename, fps=30, audio_codec="aac", audio_bitrate="192k")