Comments (6)
Update - managed to install Scipy (it's pip'ed into my virtual environment) but am still getting the same import error. /:
from moviepy.
Thanks for the feedback !
- You need to install Pygame to have "preview" and "show". It is written in the docs (README and HTML) but I agree that it's not easy to find so I modified the code: now it will leave a message askiing to install pygame if tyou try to preview a clip without Pygame installed.
- Just added crop documentation. Yes x1 and x2 are the x-coordinates delimiting the horizontal crop, why ?
- The resize was indeed buggy. I just corrected this bug, but it will only work with a recent version (0.13), didn't test it completely. In any way the resizing is not really good with scipy (and I suspect with Sciki-image either) so I recommend you install PIL, it is easier to install than OpenCV and gives good results.
Tell me if you meet any other bug !
from moviepy.
Thanks for getting back to me so quickly!
- True! I was totally sure I'd installed PyGame but noticed now I hadn't, actually. Currently in the process of doing so.
- Where can I find the crop docu? (: (Is it on GitHub pages? Searched for it, but didn't find any new results.) I got weird results using x1 and x2 this way - the crops I got were also cropped vertically, but not in a predictable way, IIRC. I'll experiment some more with this once I get everything working again (I rm'd my env, now have to reinstall everything, ha). What I was mostly confused about: Is x2 measured from 0 or from x1? Can I also use y1 and y2? (If so: how would I combine x1 and y1 if I didn't want to use x2 and y2?)
- I've meanwhile discovered there's quite a bit of weirdness going on on my end with OpenCV and the virtual environment. Looks like I initially accidentally brewed it from within the virtualenv, which appeared to work, but didn't actually result in a real working OpenCV within that env or outside of it. When I tried to brew it outside of the virtualenv, I couldn't because of missing dependencies. Then I installed those, managed to brew it, but it's still not recognised. I've meanwhile managed to install PIL, though I wasn't sure if I can really use it as it says "The Python Imaging Library is not used yet (I don’t like the copyright) but it is coming." in your Download & Installation instructions! I thought you might only added it to the error message in preparation for future use.
A suggestion I have for the GitHub pages documentation: maybe add fixed links to the Installation instructions as well as the Referene Manual to the menu on the left-hand side? (Or maybe to all four topics that are part of the User's Guide?) I think this'd be helpful. (:
from moviepy.
I think I found the info on cropping! Will test it now. (My new virtual env is finally set up again for GIF-making. (; )
from moviepy.
Ok, an update! I figured out how cropping works and can also resize with PIL now, yay!
I cannot, however, get PyGame to work with my virtualenv. I managed to install it system-wide, but it does not work within the virtualenv and I can't install it there either. Found a few seemingly related bug reports in the PyGame BitBucket repo but none of them helped me solve my problem. Too bad. /:
Some other things:
- You mention crossfading in the User Reference but don't explain how it works (I found the info on crossfadein and -out by looking through the fx files in the repo).
- I think it'd also make sense to mention how (easy it is) to get an existing clip's data like size, fps or duration etc. in the manual. Had to hunt around in the files for the info. (:
- I'm having troubles introducing my own variables, though this could be related to me being a Python beginner, not sure. I thought that a statement like this:
if thisvariable:
do something
would get executed if thisvariable
existed but would simply get ignored if it didn't. However, I always get error messages when thisvariable
wasn't previously defined. (I wanted to resize a clip depending on if variables newheight and/or newwidth exist(s).)
from moviepy.
Le 18/02/2014 15:06, Kay a écrit :
Ok, an update! I figured out how cropping works and can also resize
with PIL now, yay!Urgeil ! Let me know if there is any other feature you want / have
problems with.I cannot, however, get PyGame to work with my virtualenv. Too bad. /:
Too bad indeed, previewing makes the editing much more agreable.
Some other things:
I get lots of complaints about the docs :) . Do you know about the
IPython Notebook ? It's an awesome code editor which does autocompletion
and autodoc. For instance if you have a clip objectmyclip
and you
typemyclip.
and then hit tab, it will show you all the attributes and
methods ofmyclip
. If you typeclip.resize(
and you hit tab it will
display the documentation ofresize
.
- I'm having troubles introducing my own variables
All variables must receive a value before they are used. The pythonic
way to say "this variable doesn't have any value" is to writex = None
. For istance if a clip has no sound you will have
clip.audio=None
. Since the logical value ofNone
isFalse
you can
test if a clip has some audio with
if clip.audio:
Now if you want to test if a clip has some attribute author
but you
are not sure that this attribute exists at all, you will write
if hasattr( myclip, 'author' )
If you want you can paste your code somewhere and I'll tell you how I
would have written it.
Thanks for the feedback, it's really appreciated !
from moviepy.
Related Issues (20)
- crossfadeout not effect after CompositeVideoClip
- Aligning to "North west" HOT 1
- AttributeError: 'NoneType' object has no attribute 'end'
- ModuleNotFoundError: No module named '_ctypes' / error: metadata-generation-failed
- 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
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.