mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
audio extract from video two files added
This commit is contained in:
parent
e7d673430e
commit
ecc2188aea
7
scripts/extract_audio_from_video/README.md
Normal file
7
scripts/extract_audio_from_video/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# extract audio from video
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
- Clone the repo
|
||||||
|
- download the requirements
|
||||||
|
- run `python video_to_audio.py`
|
8
scripts/extract_audio_from_video/video_to_audio.py
Normal file
8
scripts/extract_audio_from_video/video_to_audio.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import moviepy.editor
|
||||||
|
|
||||||
|
path_video = input("Enter the path of video: ")
|
||||||
|
video = moviepy.editor.VideoFileClip(path_video)
|
||||||
|
|
||||||
|
audio = video.audio
|
||||||
|
path_audio = input("Enter the path of audio:")
|
||||||
|
audio.write_audiofile(path_audio)
|
Loading…
Reference in New Issue
Block a user