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

19k views Asked by At

I'm trying to execute a call to an unofficial Instagram API python library, after several errors for dependencies needed I fixed, I'm stuck at this one.

 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()
6

There are 6 answers

1
Jean-François Fabre On BEST ANSWER

This package relies on the ffmpeg executable to be in the PATH.

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

ffmpeg

from the command line.

6
Bill Bell On

Those final two lines in the error messages provide a valuable clue, and I installed moviepy only today so I remember a remedy.

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().
0
ilya On

At Windows, I'd fix this that way:

  1. Manual download ffmpg from github

  2. In the Lib\site-packages\imageio\plugins\ffmpeg.py file, change

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

    to

    exe = "PATH_WITH_FFMPG\\ffmpeg.win32.exe"
    
0
Uzzi Emuchay On

For anyone using a mac do this.

pip install imageio (if not already installed).

Then create a .py file (python script).

In this file write this:

import imageio

imageio.plugins.ffmpeg.download()

Run this script in the terminal (i.e "python (insert .py filename here)" )

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

Then type

   ffmpeg 

to make sure it's installed in your path.

0
Ekrem Gurdal On

If you are using Ubuntu just try:

sudo apt-get install ffmpeg

Else if you are using Windows just try to change ffmpeg.py 82th line from auto=False to auto=True

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

Will work.

0
Arun Tom On

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

$ brew install ffmpeg

you will be seeing it get installed.

==> Installing dependencies for ffmpeg: lame, x264, xvid