用python将mp4中的音频提取出来(mp3格式)
作者:互联网
首先:pip install moviepy -i https://pypi.tuna.tsinghua.edu.cn/simple
然后:新建my4tomy3.py
from moviepy.editor import *
# 要转换的mp4文件
video = VideoFileClip('/home/cjh/videos/music01.mp4')
audio = video.audio
# 转换为mp3文件
audio.write_audiofile('/home/cjh/videos/music01.mp3')
标签:videos,python,mp4,video,mp3,home,audio 来源: https://www.cnblogs.com/sdunjie/p/14961370.html