Error:
reason:
I asked the big guy, and the big guy said let me debug the ffmpeg library to see if it can be used locally, and then combined with some blog posts I checked and the local environment, it was deduced that I probably did not have a configured environment.
Since I have a conda environment, a local python3.9 environment, and the ffmpeg library installed directly in Jupyter by pip install ffmpeg-python before. The current situation is that there is no problem importing the ffmpeg library, but an error is reported when calling it, and it cannot be called locally, so I think it should be an environmental problem. So I chose to re-download, install and configure the environment.
Solution:
- Download the ffmpeg file and find the bin file in the folder
Download the ffmpeg file (you can also download the latest version from the official website )
link: https://pan.baidu.com/s/1e22sTSvLHeZayxm8YEnwoQ
Extraction code: mtwq
- Put the ffmpeg file in one place (this is the ffmpeg function library, you can put it in the lib file of your python environment, you can put it as you like) My
storage path: (I put it in the conda environment)
D: \CS\Code\Jupyter\Anaconda3\Lib\ffmpeg-release-essentials\ffmpeg-4.3.1-2021-01-01-essentials_build
Then, enter the bin folder (copy path)
D:\CS\Code\Jupyter\Anaconda3 \Lib\ffmpeg-release-essentials\ffmpeg-4.3.1-2021-01-01-essentials_build\bin
3. Configure ffmpeg environment
Right-click on "Computer", find Properties --> and then operate as shown below.
4. After the configuration is complete, check it in cmd (command prompt window).
Enter ffmpeg, and the following figure will be displayed, indicating that your configuration is successful.
If you run the code and try it out, you can find that
the problem is solved!
Personal stepping on the pit learning experience, I hope it can be helpful to you!