How can I get around ffmpeg with python Permission Denied?

681 Views Asked by At

I am trying to get raw data from an mp3 file with python. I know there are easy ways to do this with a wave file, but I don't want to convert it. This is the relevant part of my code:

from pydub import AudioSegment
AudioSegment.converter = "C:/Program Files/Ffmpeg"
AudioSegment.ffmpeg = "C:/Program Files/Ffmpeg/ffmpeg.exe"
sound = AudioSegment.from_mp3("audio/" + song_box.get(ANCHOR))

When it gets to that last line, it returns an error "PermissionError: [WinError 5] Access is denied."

I had previous errors, so I figured out I needed to install ffmpeg, and I got that set up in it's own folder (see in the code) and I also put it on both the user path and the system path (system? whatever the main one is). I also bypassed the folder C:/Program Files/Ffmpeg in windows defender, but that did not help. Is there anything else I can try?

0

There are 0 best solutions below