I'm working on a YouTube-Downloader project and I'm having issues with my audio files. My code uses pytube to download the audio from a video.
The problem is that the downloaded audio file is either a .webm or a .mp4 file, which I'd like to convert to a .mp3 file. Is there a way to read the filetype (webm/mp4) first and then run a code that converts it to a mp3 file?
I'd like to run it as a script in pycharm. Not as a command in the console.
Thanks for your answers.
Das Typ