Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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()
like image 639
Pablo Avatar asked Dec 30 '16 20:12

Pablo


People also ask

Where is FFmpeg exe?

ffmpeg.exe is a legitimate file and it belongs to video converter third party software. It is mainly used to convert the video from one format to another format. It is not a windows file and it is stored in c:\program files, since most of the third party video converter software uses this ffmpeg.exe for this process.


3 Answers

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().
like image 112
Bill Bell Avatar answered Oct 27 '22 16:10

Bill Bell


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.

like image 27
Ekrem Gurdal Avatar answered Oct 27 '22 17:10

Ekrem Gurdal


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.

like image 34
Jean-François Fabre Avatar answered Oct 27 '22 15:10

Jean-François Fabre