Created
April 21, 2020 06:13
-
-
Save mburst/476d51f6de6e0f41494b65626f908275 to your computer and use it in GitHub Desktop.
Add Coffin Dancing Meme and Astronomia To Any Short Video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from moviepy.editor import VideoFileClip, AudioFileClip, concatenate_videoclips | |
dropstart = 19 | |
audio = AudioFileClip('astronomia.mp3') | |
dance = VideoFileClip('dance.mp4') | |
clip = VideoFileClip('fail.mp4') | |
audiostart = max(0, dropstart-clip.duration) | |
audio = audio.subclip(audiostart, dropstart + dance.duration) | |
finalclip = concatenate_videoclips([clip, dance], method="compose").set_audio(audio) | |
finalclip.write_videofile('out.mp4') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires the song in mp3 form, the dancing pallbearers in mp4 and then the video you want to have it appended to. Since the drop starts at 19s, the video needs to be less than 19s. Haven't tested with longer fails though