GithubHelp home page GithubHelp logo

Comments (8)

antonpetrov145 avatar antonpetrov145 commented on July 20, 2024 3

Same issue found on garuda linux

moviepy==1.0.3

Seems issue is related to searching for ffmpeg.exe no matter the os

As a workaround I changed

FFMPEG_BINARY = os.getenv('FFMPEG_BINARY', 'ffmpeg-imageio')

to

FFMPEG_BINARY = os.getenv('FFMPEG_BINARY', 'auto-detect')

in /venv/lib/python3.9/site-packages/moviepy/config_defaults.py
and error is not present

You can also set the FFMPEG_BINARY=/usr/bin/ffmpeg (or where your ffmpeg binary is at) in your .env file - works as well.

from moviepy.

antonpetrov145 avatar antonpetrov145 commented on July 20, 2024 1

awesome

from moviepy.

belalsalih avatar belalsalih commented on July 20, 2024

since we are using azure devops to build/deploy the code, updating 'config_defaults.py' is not an option.
setting up an env variable 'FFMPEG_BINARY=/usr/bin/ffmpeg' as per your suggestion fixed the issue.

thanks alot for the help.

from moviepy.

studioj avatar studioj commented on July 20, 2024

this is also happening on windows. A temporary fix could be to lock

imageio-ffmpeg<0.5

from moviepy.

keikoro avatar keikoro commented on July 20, 2024

Same issue found on garuda linux

moviepy==1.0.3

Seems issue is related to searching for ffmpeg.exe no matter the os

This would suggest the issue lies with imageio-ffmpeg and should be fixed there, not in MoviePy.

But a Linux system looking for an exe file does not square with:

this is also happening on windows. A temporary fix could be to lock

imageio-ffmpeg<0.5

@antonpetrov145 Are you sure it's trying to look for an .exe file? I had a cursory look at imageio-ffmpeg's code and got the impression it is more a matter of misleadingly named variables/function names.

The info about setting the ENV variable is probably the best advice, in any case, as the variable exists for a reason. Though it might make sense to better surface its existence? It's mentioned in the install instructions but not in the project README, for example.

from moviepy.

antonpetrov145 avatar antonpetrov145 commented on July 20, 2024

@keikoro if user doesn't set the FFMPEG_BINARY variable the default is ffmpeg-imageio
FFMPEG_BINARY = os.getenv("FFMPEG_BINARY", "ffmpeg-imageio")
but then

if FFMPEG_BINARY == "ffmpeg-imageio":
    from imageio.plugins.ffmpeg import get_exe

    FFMPEG_BINARY = get_exe()

my suggestion is to set the default to auto-detect then if user wants to use ffmpeg-imageio it can be set with ENV variable. With this the risk of the above error will be much lower IMO.

I tried both my suggestions - set to auto-detect and set env variable, both work. The question is - do we want to let users set the ENV or we can set to auto-detect by default in the code and have ffmpeg-imageio as option not relying on imageio-ffmpeg.

from moviepy.

keikoro avatar keikoro commented on July 20, 2024

Changing a default which a) has been in place for a long term, b) is documented and c) can very easily be circumvented by users may make sense in the long term but, as said elsewhere, would need discussing in one of the threads about the future of the project.

It's not something I'd be comfortable taking responsibility for at this point, with the project being kind of in limbo/awaiting review.

ETA: @antonpetrov145 I saw those variables/functions containing the word "exe", but what led you to believe the code is looking for an .exe file?

from moviepy.

antonpetrov145 avatar antonpetrov145 commented on July 20, 2024

@keikoro good, I was confused by the naming of the function, I checked the code for them and yes - my mistake, I will close this PR.

from moviepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.