Skip to content

Instantly share code, notes, and snippets.

@pointofpresence
Last active March 31, 2024 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pointofpresence/f63eddc36fc5b87f66af2cb1dad6d5bd to your computer and use it in GitHub Desktop.
Save pointofpresence/f63eddc36fc5b87f66af2cb1dad6d5bd to your computer and use it in GitHub Desktop.
Python extract audio from video
import moviepy.editor as mp
def extract_audio(video, audio):
my_clip = mp.VideoFileClip(video)
my_clip.audio.write_audiofile(audio)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment