From b700d0c9b913524bd6a194e271fd43644c9da687 Mon Sep 17 00:00:00 2001 From: Kamushy <92086533+Kamushy@users.noreply.github.com> Date: Mon, 6 Jun 2022 14:58:15 +1000 Subject: [PATCH] added the speed up Can't figure out how to work the getenv, it gets an error most of the time. would love help --- video_creation/final_video.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video_creation/final_video.py b/video_creation/final_video.py index 93bac6f..965534f 100644 --- a/video_creation/final_video.py +++ b/video_creation/final_video.py @@ -6,6 +6,7 @@ from moviepy.editor import ( concatenate_audioclips, CompositeAudioClip, CompositeVideoClip, + vfx, ) import reddit.subreddit import re @@ -80,6 +81,8 @@ def make_final_video(number_of_clips): ) image_concat.audio = audio_composite final = CompositeVideoClip([background_clip, image_concat]) + #speed video up, would prefer to use GETENV + final = final.fx(vfx.speedx, 1.2) filename = (re.sub('[?\"%*:|<>]', '', ("assets/" + reddit.subreddit.submission.title + ".mp4"))) final.write_videofile(filename, fps=30, audio_codec="aac", audio_bitrate="192k") for i in range(0, number_of_clips):