We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e72535 commit 463b902Copy full SHA for 463b902
scripts/Video-to-audio-convertor/vid_to_aud.py
@@ -0,0 +1,19 @@
1
+import moviepy.editor
2
+from moviepy.video.VideoClip import VideoClip
3
+from pathlib import Path
4
+
5
+try:
6
+ # to select the video file:
7
+ a = input("Enter the path of the video:\n")
8
+ video = moviepy.editor.VideoFileClip(a) # Add path of your video in the terminal
9
10
+ # to create the audio file:
11
12
+ audio = video.audio
13
+ audio.write_audiofile(
14
+ "extractedaudio.mp3"
15
+ ) # audio will be saved as extractedaudio.mp3 in the current directory.
16
17
+except Exception as e:
18
+ print("Error:", e)
19
+ exit(1)
0 commit comments