Comments (5)
Thanks for the insight. I didn't know you could change the content of "conf" at run time, this is really nice.
@bobatsar @sanfx would the following implementation be ok for you ?
It should work like this:
import moviepy.conf as mpy_conf
mpy_conf.change_settings({'FFMPEG_BINARY': my_custom_path,
'IMAGEMAGICK_BINARY':my_other_custom_path})
You could make a personal configuration file my_conf.py
like that:
FFMPEG_BINARY= my_custom_path
IMAGEMAGICK_BINARY = my_other_custom_path
#etc...
and you would use it like this:
conf.change_settings(file="path/to/my_conf.py")
Then there will also be a get_setting
function which will be used everywhere where the configuration values are needed, like you suggested with get_ffmpeg_binary
, so that errors will be raised at write_video time if for instance FFMPEG wasn't found and wasn't set manually.
I just need some time to ensure that the error messages stay informative in all cases.
from moviepy.
Hi Zulko,
yes that sounds good for me.
I don't understand why one would need additionally the my_conf.py variant but perhaps @sanfx knows a usage scenario for that.
Thanks for the great work
from moviepy.
Ok, that will be done. The advantage of using my_conf.py is that if the program gets big with many parameters in the configuration, then some user will have a favorite configuration file that they can use in all of their script. It's common practice with matplotlib, where you ca define a "stylesheet" for all your plots which is actually a configuration file.
from moviepy.
Done ! At least on Github, not yet on PyPi. See the new moviepy/config_defaults.py for the details.
from moviepy.
Dear guys,
i tried to implement your solutions for this issue. But it wont work for me. I got the "[Error 2] The system cannot find the file specified".
my start-code:
import os
import moviepy.config as mpy_conf
mpy_conf.FFMPEG_BINARY = os.path.join("C:\Program Files (x86)\ImageMagick-6.9.0-Q16", "ffmpeg", "ffmpeg.exe")
from moviepy.editor import VideoFileClip, ImageSequenceClip
Is their any else to consider? What could be wrong?
from moviepy.
Related Issues (20)
- Release 0.2.4.0 missing
- video.preview() has a bug after concatenate_videoclips in version 1.0.3
- TypeError: '<' not supported between instances of 'str' and 'int' HOT 1
- Audio out of sync for combined DASH video
- Inconsistent duration for composite output HOT 1
- Trying to hide the Logger Bar in the console
- Text For Stroke/Outline Doesn't Align properly
- Unable to set FPS in GIFs
- Can I run 'write_videofile' function with GPU ? HOT 2
- I have a doubt, as shown in the picture, I get a 403 from my program, but from the browser it works!
- Saving the same video clip twice will yield different results
- Decorator not working correctly fps remains to be None and cause TypeError
- Sound doubling / looping when merging clips. HOT 1
- ffmpeg interpets video title as a command line argument when it begins with "-"
- Audio out of sync when I grab window bar.
- Bug in CompositeVideoClip
- Efficiency Disparity Between MoviePy and FFmpeg
- A household appliances company in the Netherlands and all of Europe, King Import Export, announces the theft of a container of household appliances and warns customers to beware of purchasing the product without invoices. The invoice must bear the company seal, King Import Export, so as not to be exposed to problems.
- ImageMagick Binary Not Found HOT 2
- King1
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.