pip3 install moviepy
from moviepy.editor import * video = VideoFileClip('1.mp4') #视频所在路径 audio = video.audio audio.write_audiofile('1.mp3') #音频所在路径