made name change correctly
line 59 is if any of characters cant be turned into a file remove them
This commit is contained in:
1 parent
21c8da3648
commit
9bb1aa351e
1 file changed
+5
-4
@@ -7,6 +7,8 @@ from moviepy.editor import (
|
||||
CompositeAudioClip,
|
||||
CompositeVideoClip,
|
||||
)
|
||||
import reddit.askreddit
|
||||
import re
|
||||
from utils.console import print_step
|
||||
|
||||
|
||||
@@ -14,6 +16,7 @@ W, H = 1080, 1920
|
||||
|
||||
|
||||
def make_final_video(number_of_clips):
|
||||
global submission
|
||||
print_step("Creating the final video 🎥")
|
||||
VideoFileClip.reW = lambda clip: clip.resize(width=W)
|
||||
VideoFileClip.reH = lambda clip: clip.resize(width=H)
|
||||
@@ -53,9 +56,7 @@ def make_final_video(number_of_clips):
|
||||
)
|
||||
image_concat.audio = audio_composite
|
||||
final = CompositeVideoClip([background_clip, image_concat])
|
||||
final.write_videofile(
|
||||
"assets/final_video.mp4", fps=30, audio_codec="aac", audio_bitrate="192k"
|
||||
)
|
||||
|
||||
filename = (re.sub('[?\"/%*:|<>]', '', ("assets/" + reddit.askreddit.submission.title + ".mp4")))
|
||||
final.write_videofile(filename, fps=30, audio_codec="aac", audio_bitrate="192k")
|
||||
for i in range(0, number_of_clips):
|
||||
pass
|
||||
Reference in new issue
Block a user