Comments (8)
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.
awesome
from moviepy.
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.
this is also happening on windows. A temporary fix could be to lock
imageio-ffmpeg<0.5
from moviepy.
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.
@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.
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.
@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)
- Workflows need updating
- No longer encoding subtitles HOT 2
- AttributeError: 'NoneType' object has no attribute 'get_frame', reported by AudioFileClip.to_soundarray() HOT 1
- Test suite fails for most Windows, Linux tests HOT 2
- Test suite fails for macOS due to missing Conda install
- support latest decorator
- No sound HOT 2
- how to keep the aspect ratio for my vertical video? HOT 5
- I cut 1800 seconds of audio, but the result is 1846 seconds. Why is this happening? How can I solve this problem?
- Resizable rounded rectangle
- Getting `AttributeError: 'NoneType' object has no attribute 'get_frame'` when trying to save a `CompositeVideoClip`
- Error When Generating a Long video and not getting the error when generating a shorter video
- AttributeError: 'NoneType' object has no attribute 'get_frame' when calling write_videofile HOT 1
- Vertical MOV video to MP4 HOT 3
- yielding write_videofile progress HOT 5
- Output video without sound
- Inconsistent video duration before and after write_videofile HOT 1
- Audio glitching when concatenating with moviepy
- Error Using MoviePy in Django Project on Linux (Python 3.12, MoviePy 1.0.3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moviepy.