Skip to content

Instantly share code, notes, and snippets.

@yazdipour
Last active July 27, 2017 18:43
Show Gist options
  • Save yazdipour/bdcbf2ae5acbbb5e05198a3c8fa900c3 to your computer and use it in GitHub Desktop.
Save yazdipour/bdcbf2ae5acbbb5e05198a3c8fa900c3 to your computer and use it in GitHub Desktop.
# pip install imageio
# then in python :
# import imageio and
# imageio.plugins.ffmpeg.download().
import moviepy.editor as mp
clip = mp.VideoFileClip("X.mp4")
# .subclip(0,20)
clip.audio.write_audiofile("Y.mp3")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment