FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe'

First make sure you have ffprobe installed, which is part of FFmpeg, so actually you need to install ffmpeg. You can do that by following the instructions of one of those two sites.

https://ffmpeg.org/download.html

https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg

After that you need to add the libary to your system path for python to be able to find and to use it. That can be done by either actually adding the installation path of FFmpeg to your OS path (How to do that depends on your operating system), or by adding it to the temporary path variable that is used inside of python.

import sys
sys.path.append('/path/to/ffmpeg')

For the second option you have to make sure to append the path to FFmpeg before importing anything else. This is the better option if you have no option to change the configuration of the root system, but can become very inconsistent when used by different python scripts.

Finally make sure to have ffprobe installed (e.g. with pip install ffprobe inside a terminal, see https://pypi.org/project/ffprobe) so that import ffprobe should work inside the python environment.


I tried the following method, and it worked:

$ sudo apt update
$ sudo apt install ffmpeg

Tags:

Python

Pydub