Raise NeedDownloadError ('Need ffmpeg exe.' NeedDownloadError: Need ffmpeg exe)

I am trying to make a call to the unofficial python API Instagram library, after I fixed a few errors for the dependencies that I fixed, I was stuck with this.

File "C:\Users\Pablo\Desktop\txts_pys_phps_programacion\Instagram-API-python-master\InstagramAPI.py", line 15, in <module> from moviepy.editor import VideoFileClip File "C:\Python27\lib\site-packages\moviepy\editor.py", line 22, in <module> from .video.io.VideoFileClip import VideoFileClip File "C:\Python27\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 3, in <module> from moviepy.video.VideoClip import VideoClip File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 20, in <module> from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video File "C:\Python27\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 15, in <module> from moviepy.config import get_setting File "C:\Python27\lib\site-packages\moviepy\config.py", line 38, in <module> FFMPEG_BINARY = get_exe() File "C:\Python27\lib\site-packages\imageio\plugins\ffmpeg.py", line 86, in get_exe raise NeedDownloadError('Need ffmpeg exe. ' NeedDownloadError: Need ffmpeg exe. You can download it by calling: imageio.plugins.ffmpeg.download() 
+7
python ffmpeg instagram-api moviepy
source share
6 answers

This package relies on the ffmpeg executable in PATH.

So just download it, install it somewhere and add the installation directory to PATH. make sure you can access it by typing:

 ffmpeg 

from the command line.

+2
source share

These last two lines in the error messages provide a valuable key, and I installed the video only today, so I remember the tool.

 NeedDownloadError: Need ffmpeg exe. You can download it by calling: imageio.plugins.ffmpeg.download() 
  • First (sudo) pip install imageio , if necessary.
  • Now: import imageio and then imageio.plugins.ffmpeg.download() .
+19
source share

If you are using Ubuntu just try:

 sudo apt-get install ffmpeg 

Otherwise, if you are using Windows, just try changing ffmpeg.py 82nd line from auto = False to auto = True

It will automatically download ffmpeg to the correct path once. Then import imageio and write imageio.plugins.ffmpeg.download()

Will work.

+3
source share

On Windows, I would fix this as follows:

  • Manually downloading ffmpg from github

  • In the file lib \ site-packages \ imageio \ plugins \ ffmpeg.py change

     exe = get_remote_file('ffmpeg/' + FNAME_PER_PLATFORM[plat], auto=False) 

    to

     exe = "PATH_WITH_FFMPG\\ffmpeg.win32.exe" 
0
source share

For those using mac, do it.

pip install imageio (if not already installed).

Then create a .py file (python script).

In this file write:

 import imageio imageio.plugins.ffmpeg.download() 

Run this script in a terminal (e.g. python (insert .py file name here) ")

It installs FFmpeg into a directory that should be automatically added to your path. If not, add it to your path.

Then enter

  ffmpeg 

to make sure it is installed in your path.

0
source share

on mac, this is the best way to install ffmpeg. Open terminal and type.

 $ brew install ffmpeg 

You will see that it is installed.

 ==> Installing dependencies for ffmpeg: lame, x264, xvid 
0
source share

All Articles