I have an app that processes audio files and converts them to ‘wav’ format. This works locally on my Mac, however in DigitalOcean, when recording audio, i get the below error, followed by a 500:
warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
Unexpected error: [Errno 2] No such file or directory: 'ffprobe'
Not sure why this error arises because pydub works correctly when I run the application locally
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey there,
That error means ffprobe
isn’t installed on your DigitalOcean server.
It works locally because your Mac has it by default, but for Droplets, you’ll need to install it manually.
Just SSH into your Droplet and run:
sudo apt update && sudo apt install ffmpeg -y
That’ll install both ffmpeg
and ffprobe
, and your pydub
audio processing should work just like it does locally.
Let me know if you’re still getting errors after that!
- Bobby
Heya,
The error you’re seeing on your DigitalOcean server:
Unexpected error: [Errno 2] No such file or directory: 'ffprobe'
means that the pydub
library is trying to use ffprobe
to process audio files, but ffprobe
(a tool that comes with ffmpeg
) is not installed on your DigitalOcean server.
Run the following commands on your droplet:
sudo apt update
sudo apt install ffmpeg -y
This will install both ffmpeg
and ffprobe
, and pydub
will then be able to use them.
Heya, @c19cee53301743a5b5a88333eb1e2e
ffprobe
is not installed on your DigitalOcean droplet. You can install it with apt
:
sudo apt update && sudo apt install ffmpeg -y
You can also avoid system-level dependencies entirely by switching to pure Python audio processing libraries if your use case isn’t too complex.
For example, libraries like wave
, soundfile
(via pysoundfile
), or audioread
can handle many audio format conversions without requiring ffmpeg
or ffprobe
.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.