python 将视频转换成音频

Taoqun

安装库

sudo pip install moviepy

代码 index.py

from moviepy.editor import *

video = VideoFileClip('test.mp4')
audio = video.audio
audio.write_audiofile('test.mp3')

运行

python3 index.py

结果

➜  py python3 index.py
MoviePy - Writing audio in test.mp3
MoviePy - Done.     
阅读 1.7k

taoqun
个人的记录

[链接]

131 声望
5 粉丝
0 条评论

[链接]

131 声望
5 粉丝
文章目录
宣传栏