I wanted to make my program that takes Youtube video, downloads and then converts mp4 video to mp3 audio. When it gets to converting part it gives a TypeError: 'str' object is not callable.

I've tried different libraries but decided to use moviepy.

Here's the code itself

yt = YouTube(str(input("Link to video: ")))

videos = yt.streams.get_by_itag("140")

videos.download(r"C:\Users\User\Desktop\Python\Youtube to MP3\Videos")

ToConvert = VideoClip(r'C:\Users\User\Desktop\Python\Youtube to MP3\Videos\%s%s' %(yt.title, '.mp4'))
mp3file = ToConvert.audio

0 Answers