Skip to content

Instantly share code, notes, and snippets.

@mtpereira
Created November 3, 2014 00:16
Show Gist options
  • Save mtpereira/6bf3f41db47b6d04a878 to your computer and use it in GitHub Desktop.
Save mtpereira/6bf3f41db47b6d04a878 to your computer and use it in GitHub Desktop.
Create a music video from an audio file and an image file.
#!/usr/bin/env python
from moviepy.editor import AudioFileClip, ImageClip
from sys import argv
audio = AudioFileClip(argv[1])
clip = ImageClip(argv[2]).set_duration(audio.duration).set_audio(audio)
clip.write_videofile(argv[3])
@mtpereira
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment