Created
September 19, 2021 11:50
-
-
Save DBoyara/8915d69fad53062e4ba80f6de6adf8d6 to your computer and use it in GitHub Desktop.
Python mp4 to mp3 with moviepy
This file contains hidden or 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 os | |
| from moviepy.editor import VideoFileClip | |
| def main(): | |
| video = VideoFileClip(os.path.join("path_to", "movie.mp4")) | |
| video.audio.write_audiofile(os.path.join("path_to", "audio.mp3")) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment