Last active
March 31, 2024 19:01
-
-
Save pointofpresence/f63eddc36fc5b87f66af2cb1dad6d5bd to your computer and use it in GitHub Desktop.
Python extract audio from video
This file contains 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
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