How to convert mp4 to mp3 using Python. Python Tips and Tricks.
#shorts #python #programming #coding
from moviepy.editor import *
mp4 = r"shuffle.mp4"
mp3 = r"shuffle.mp3"
video = VideoFileClip(mp4)
audio = video.audio
audio.write_audiofile(mp3)
audio.close()
video.close()