question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.

See original GitHub issue

Expected Behavior

not getting an error

Actual Behavior

getting the error in the title

Steps to Reproduce the Problem

be me and try to run from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip

ffmpeg is installed with apt and i can confirm its location in /usr/bin/. additionally ive also executed pip install imageio-ffmpeg in the python virtual environment and it is installed. ive logged platform.python_version() to confirm i was in the 3.8.0 venv. executing a plain interpreter terminal in the venv and trying to import it manually does not resault in an error. only during execution. the execution is in a flask application deployed with gunicorn and nginx.

Specifications

  • Python Version: 3.8.0
  • Moviepy Version: the newest
  • Platform Name: Ubunto server
  • Platform Version: 18.04

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:20

github_iconTop GitHub Comments

32reactions
tburrows13commented, Apr 24, 2020

Ok, try this before importing moviepy:

import os
os.environ["IMAGEIO_FFMPEG_EXE"] = "/usr/bin/ffmpeg"
4reactions
ClaudeSerrecommented, Aug 30, 2022

For those on MAC, if you install ffmpeg with Homebrew, then the path is different, so the code become :

import os

os.environ["IMAGEIO_FFMPEG_EXE"] = "/opt/homebrew/Cellar/ffmpeg/5.1/bin/ffmpeg"

Read more comments on GitHub >

github_iconTop Results From Across the Web

No ffmpeg exe could be found - FFMpeg error in Windows 10
RuntimeError : No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.
Read more >
macos - Install FFmpeg on OS X - Super User
I have Xcode installed as well as the CLI for Xcode ( gcc etc). I have a version of FFmpeg currently installed, but...
Read more >
FFMpeg installation (Newbie question) : r/moviepy - Reddit
RuntimeError : No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable. Thanks!
Read more >
Back to the Basics: Use and Install FFmpeg
Now, prepend the C:\ffmpeg folder to the system path environment variable. This step ensures that you can run the ffmpeg.exe command from ...
Read more >
No ffmpeg exe could be found - Blogg.se
... Comment on RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIOFFMPEGEXE environment variable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found