Skip to content

Instantly share code, notes, and snippets.

@evmcheb
Created October 27, 2019 13:33
Show Gist options
  • Save evmcheb/c4c71e0d51eb968b814990ef1d8e7566 to your computer and use it in GitHub Desktop.
Save evmcheb/c4c71e0d51eb968b814990ef1d8e7566 to your computer and use it in GitHub Desktop.
# A snippet of how a comment is converted into a video
from moviepy.editor import *
audio = AudioFileClip(f"{tid}/{comment.name}/{num}.mp3")
image = (ImageClip(f"{tid}/{comment.name}/{part.name}")
.set_duration(audio.duration) # using the fx library to effortlessly transform the video clip
.resize(1.2).on_color(size=DIM, color=dark_grey)
.set_fps(5)
.set_pos((0.5, 0.5), relative=True)
.set_audio(audio))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment