Reputation: 41
I installed moviepy package using pip. Whenever I import moviepy, the following error appears:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-3137d113b348> in <module>()
6 import os
7 import math
----> 8 from moviepy.editor import VideoFileClip
9 from IPython.display import HTML
10 get_ipython().magic('matplotlib inline')
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\editor.py in <module>()
20 # Clips
21
---> 22 from .video.io.VideoFileClip import VideoFileClip
23 from .video.io.ImageSequenceClip import ImageSequenceClip
24 from .video.VideoClip import VideoClip, ImageClip, ColorClip, TextClip
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\video\io\VideoFileClip.py in <module>()
1 import os
2
----> 3 from moviepy.video.VideoClip import VideoClip
4 from moviepy.audio.io.AudioFileClip import AudioFileClip
5 from moviepy.Clip import Clip
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\video\VideoClip.py in <module>()
19
20 import moviepy.audio.io as aio
---> 21 from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
22 from .io.ffmpeg_reader import ffmpeg_read_image
23 from .io.ffmpeg_tools import ffmpeg_merge_video_audio
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\video\io\ffmpeg_writer.py in <module>()
17 from tqdm import tqdm
18
---> 19 from moviepy.conf import FFMPEG_BINARY
20 from moviepy.tools import verbose_print
21
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\conf.py in <module>()
59 FFMPEG_BINARY = 'ffmpeg.exe'
60 else:
---> 61 raise IOError("FFMPEG binary not found. Try installing MoviePy"
62 " manually and specify the path to the binary in"
63 " the file conf.py")
OSError: FFMPEG binary not found. Try installing MoviePy manually and specify the path to the binary in the file conf.py
I downloaded the FFMPEG file but I don't know to specify the path in conf.py. Any help ?
Upvotes: 4
Views: 12141
Reputation: 11473
I don't have anaconda
, but as per error dump
C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\conf.py in <module>()
59 FFMPEG_BINARY = 'ffmpeg.exe'
60 else:
---> 61 raise IOError("FFMPEG binary not found. Try installing
Here are steps that I can think of,
ffmpeg.exe
on your system.C:\Users\manch_000\Anaconda3\lib\site-packages\moviepy\conf.py
conf.py
Hope this helps.
Upvotes: 1
Reputation: 27
I encountered this issue when trying to use PythonVideoConverter
The steps I took to finally resolve this were:
pip install ffmpeg
Then you have to go download the ffmpeg executables separately. Source code can be found here:
I actually used the pre-built binaries for windows available here:
https://github.com/BtbN/FFmpeg-Builds/releases
The lines to use PythonVideoConverter are:
from converter import Converter
conv = Converter()
Add the absolute path to the executables as input parameters to Converter(), ie:
ffmpegPath = r"c:\...\ffmpeg.exe"
ffprobePath = r"c:\...\ffprobe.exe"
from converter import Converter
conv = Converter(ffmpegPath, ffprobePath)
edit: This was on Windows 10 using Python 3.7.4. I used the win64-gpl build of ffmpeg.
Upvotes: 3
Reputation: 508
I had this same problem, but in ubuntu. It got solved by simply installing ffmpeg using apt-get:
sudo apt-get install ffmpeg
Upvotes: 3