Video to audio | Python |mp4 to mp3

Quick Start: moviepy

Cite: taoquns 2019

# pip install moviepy
from moviepy.editor import *

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

Requirement

moviepy
decorator
tqdm
requests
numpy
imageio
pillow
imageio_ffmpeg

ffmpy3

Cite: © Jumping boy; 2019


from ffmpy3 import FFmpeg
ff = FFmpeg(inputs={'周笔畅-最美的期待(伴奏版).mp4': None},
outputs={'output.mp3': None})
print(ff.cmd)
ff.run()
Author

Karobben

Posted on

2021-04-23

Updated on

2024-01-11

Licensed under

Comments