|
|
|
@ -38,6 +38,7 @@ def name_normalize(name: str) -> str:
|
|
|
|
|
name = re.sub(r"(\w+)\s?\/\s?(\w+)", r"\1 or \2", name)
|
|
|
|
|
name = re.sub(r"\/", r"", name)
|
|
|
|
|
|
|
|
|
|
# was having issues with names too long
|
|
|
|
|
name = name[0:140]
|
|
|
|
|
|
|
|
|
|
lang = settings.config["reddit"]["thread"]["post_lang"]
|
|
|
|
@ -77,7 +78,6 @@ def make_final_video(
|
|
|
|
|
audio_clips.insert(0, AudioFileClip("assets/temp/mp3/title.mp3"))
|
|
|
|
|
audio_concat = concatenate_audioclips(audio_clips)
|
|
|
|
|
audio_composite = CompositeAudioClip([audio_concat])
|
|
|
|
|
audio_composite.write_audiofile(f"assets/temp/mp3/moviepy.mp3", fps=44100, verbose=False, logger=None)
|
|
|
|
|
|
|
|
|
|
with open(f"assets/temp/mp3/list2.txt", 'w') as f:
|
|
|
|
|
f.write("file " + f"'title.mp3'" + "\n")
|
|
|
|
@ -86,10 +86,10 @@ def make_final_video(
|
|
|
|
|
|
|
|
|
|
os.system("ffmpeg -f concat -y -hide_banner -loglevel panic -safe 0 " +
|
|
|
|
|
"-i " + f"assets/temp/mp3/list2.txt " +
|
|
|
|
|
"-c copy " + f"assets/temp/mp3/concat_audio.mp4")
|
|
|
|
|
"-c copy " + f"assets/temp/mp3/concat_audio.mp3")
|
|
|
|
|
|
|
|
|
|
all_audio = AudioFileClip(f"assets/temp/mp3/concat_audio.mp4")
|
|
|
|
|
all_audio = CompositeAudioClip([audio_composite])
|
|
|
|
|
all_audio = AudioFileClip(f"assets/temp/mp3/concat_audio.mp3")
|
|
|
|
|
audio_composite = CompositeAudioClip([audio_composite])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -126,8 +126,8 @@ def make_final_video(
|
|
|
|
|
# else: story mode stuff
|
|
|
|
|
img_clip_pos = background_config[3]
|
|
|
|
|
image_concat = concatenate_videoclips(image_clips).set_position(img_clip_pos)
|
|
|
|
|
#image_concat.audio = audio_composite
|
|
|
|
|
image_concat.audio = all_audio
|
|
|
|
|
image_concat.audio = audio_composite
|
|
|
|
|
#image_concat.audio = all_audio
|
|
|
|
|
|
|
|
|
|
final = CompositeVideoClip([background_clip, image_concat])
|
|
|
|
|
title = re.sub(r"[^\w\s-]", "", reddit_obj["thread_title"])
|
|
|
|
|