From 0089bfd8d3b5f9348aca682c0fb4dc079d2cf9e0 Mon Sep 17 00:00:00 2001 From: Atul Anand Date: Thu, 4 Feb 2021 14:06:27 +0530 Subject: [PATCH] Added some more comments and wrote an example file on section and an optional print function --- Applications/Extract mp3 from mp4/source-code.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Applications/Extract mp3 from mp4/source-code.py b/Applications/Extract mp3 from mp4/source-code.py index ef646b3..435522a 100644 --- a/Applications/Extract mp3 from mp4/source-code.py +++ b/Applications/Extract mp3 from mp4/source-code.py @@ -1,14 +1,15 @@ -import moviepy import moviepy.editor - - # Get this library installed in your system + # Import your video file # Media file should be local -video = moviepy.editor.VideoFileClip("") # Put your file path in here +video = moviepy.editor.VideoFileClip("video_trial.mp4") # Put your file path in here # Convert video to audio audio = video.audio -audio.write_audiofile('new_audio.mp3') +# Writing an audio file... +audio.write_audiofile('new_audio.mp3') # Rename the "new_audio" to what you want... + +print("Your video has been converted into audio. Go and have a look...")