Python error solution - 'ffmpeg' is not an internal or external command, nor is it a runnable program

problem discovery

When I called the ffmpeg package, the following error occurred:ffmpeg’ �����ڲ����ⲿ���Ҳ���ǿ����еij������������ļ���

This is a bunch of garbled characters. After I checked it on the Internet, I said that the garbled characters actually refer to ‘ffmpeg‘ 不是内部或外部命令,也不是可运行的程序this problem. There are blogs on the Internet that just change the encoding format, but I still have no success

problem solved

I've checked that I've installed ffmpeg in the terminal, but it doesn't work. There is a method ( link ) to download ffmpeg directly on the Internet, but I didn't find the python file he said, so I hit it by mistake and simply downloaded the ffmpeg file directly from the terminal.

I downloaded ffmpeg.exe and other related files according to the link above, and then I installed the ffmpeg package on the command line:pip install ffmpeg

Then I got these two folders:
Please add a picture description

The file path is here:\anaconda3\Lib\site-packages

I clicked into the ffmpeg folder and modified the following code:

  • _probe.py file:
    Please add a picture description
    Change the path after the seventh line of cmd to the path where ffprobe.exe is located (this path is the path to decompress after downloading the ffmpeg package)

  • _run.py file:
    Please add a picture description
    Same as above, after that I can call the ffmpeg package normally

Guess you like

Origin blog.csdn.net/m0_61787307/article/details/129942467