(sudo) pip install moviepy
Moviepy uses ffmpeg software to read and export video and audio files. Also use (optional) ImageMagick to generate text and GIF files. Different media processing relies on Python’s fast math library numpy. Advanced effects and enhancements use some Python image processing libraries (PIL, scikit image, SciPy, etc.).
from moviepy.editor import *
Videopath = "video address to synthesize audio"
Video = videofileclip ("video address")
audio = AudioFileClip(sys.argv) print(audio.duration) sys.stdout.flush()
This work adoptsCC agreementReprint must indicate the author and the link of this article