0

I'm creating a program for school that streams video and audio from youtube and displays them for a few clients at the same time. For this, I need to change a file's format to .mp3 and I learned that I can do that with pydub AudioSegment, yet, I keep getting an error.

That's the code lines that bring the error:

original_audio = AudioSegment.from_file(original_name)
original_audio.export(new_name, format="mp3")

This is the error:

WindowsError: [Error 2] The system cannot find the file specified

Thank you in advance.

galmeriol
  • 461
  • 4
  • 14
itay12v
  • 1
  • 2

1 Answers1

1

Do you have ffmpeg installed? AFAIK that is a requirement. You can download ffmpeg from here: http://ffmpeg.org

Put this in your script directory and everything should then work fine.

Sasha
  • 1,674
  • 1
  • 16
  • 23