Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.1k stars 1.51k forks source link

Cannot install on Windows / Documentation outdated #2006

Open HasseM opened 1 year ago

HasseM commented 1 year ago

I'm trying to install on Windows but after installing it does not work.

By running only: from moviepy.editor import *

I get: The specified path is invalid. The specified path is invalid.

For sure I did read the comments on editing moviepy/config_defaults.py but there are 2 problems with it: 1) I already installed it before reading that comment, how to fix it? Run install again? 2) moviepy/config_defaults.py does not exist (anymore?), should this be config.py? if so, how to change it?

It would be really really helpfull if docs are fixed around this. I already tried so many things, but no progress at all. Please help!

Also on my next line: clip = VideoFileClip("test.mp4").subclip(50,60) I get an error:

Traceback (most recent call last): File "C:\Python\lib\site-packages\moviepy-2.0.0.dev0-py3.10.egg\moviepy\video\io\ffmpeg_reader.py", line 824, in ffmpeg_parse_infos File "C:\Python\lib\site-packages\moviepy-2.0.0.dev0-py3.10.egg\moviepy\video\io\ffmpeg_reader.py", line 559, in parse KeyError: 'input_number'

I installed latest ffmpeg manually and added it to Windows path variable. But that did not help.

HasseM commented 1 year ago

After lots and lots of struggling I manage to get it reinstalled via PIP (before I used manual install process). Still not sure on how to update the env after installing...... But by doing it like this:

import os os.environ["IMAGEMAGICK_BINARY"] = "C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\magick.exe" from moviepy.editor import *

on the first 3 lines in my pthon script, it works. Without it, fails becuase it cannot find ImageMagick.

keikoro commented 12 months ago

Please always include your specs like we ask for in our issue templates – MoviePy version, platform used etc. – to help pinpoint what causes your problem.

We generally recommend you always use the latest version of MoviePy found in this repo, or what's on master. The last release on PyPI is very outdated.

FlynnHillier commented 11 months ago

Please always include your specs like we ask for in our issue templates – MoviePy version, platform used etc. – to help pinpoint what causes your problem.

We generally recommend you always use the latest version of MoviePy found in this repo, or what's on master. The last release on PyPI is very outdated.

I believe the confusion arises from the docs found here.

When specifying how to approach correctly configuring moviepy in regards to imagemagick (as a windows user), the docs state that the user should, 'before installing moviepy by hand', go into moviepy/config_defaults.py and update the IMAGEMAGICK_BINARY variable to point to the imageMagick binary location. This obviously implies that the user should opt to download moviepy manually instead of using a package manager such as pip, if they wish to configure moviepy for ImageMagick.

Naturally, someone following the docs would now seek how to manually install moviepy. However, when you check the installation section, specifically the 'method by hand' part; the docs state you should download either from pyPi (which is outdated as you stated) - or to use the development version from github master (which is up-to-date but to my knowledge seems to be formatted differently from how pip serves the package). Within the github source, i was unable to located config_defaults.py, only config.py. The docs state that config_defaults.py should be edited before running setup.py however the file is absent within the master.

I believe the docs should be updated to no longer point to pyPi as a source, and the location of config_defaults.py within the github master should be made more clear, or perhaps if the github structure does not contain config_defaults.py as i suspect, perhaps that entire section of the docs should be ammended slightly.

I myself am struggling to get moviePy to be able to locate imageMagick currently, having followed the docs.