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
| # coding: utf-8 | |
| import moviepy.editor as mp | |
| import sys | |
| def convert(video_file_name, audio_file_name=None): | |
| if audio_file_name is None: | |
| audio_file_name = video_file_name + '.mp3' | |
| try: | |
| clip = mp.VideoFileClip(video_file_name) | |
| clip.audio.write_audiofile(audio_file_name) |
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 pip | |
| from subprocess import call | |
| for dist in pip.get_installed_distributions(): | |
| call("pip install --upgrade " + dist.project_name, shell=True) |
NewerOlder