Z
Z
Zhenia Bel2020-12-26 23:38:02
Python
Zhenia Bel, 2020-12-26 23:38:02

How to convert mp4 video clip to mp3 using ffmpeg in python?

How to convert mp4 video clip to mp3 using ffmpeg in python?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SKEPTIC, 2020-12-27
@pro100chel

import ffmpeg

video = ffmpeg.input("1.mp4")

audio = video.audio

stream = ffmpeg.output(audio, "1.mp3")

ffmpeg.run(stream)

Of course, use ffmpeg-python as a library for python. There version 0.2.0.
Well, of course, you need to download from the official ffmpeg website and drop ffmpeg.exe from the bin folder into the folder with the python script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question