[AI study notes] Error: ffmpeg error (see stderr output for detail)

Error:

insert image description here

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.
insert image description here

Solution:

  1. 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
    insert image description here
  2. 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
    insert image description here
    3. Configure ffmpeg environment
    Right-click on "Computer", find Properties --> and then operate as shown below.
    insert image description here
    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.
    insert image description here
    If you run the code and try it out, you can find that
    insert image description here
    the problem is solved!

Personal stepping on the pit learning experience, I hope it can be helpful to you!

Guess you like

Origin blog.csdn.net/weixin_45954198/article/details/128212230