Coder Social home page Coder Social logo

Comments (6)

keikoro avatar keikoro commented on May 18, 2024

Update - managed to install Scipy (it's pip'ed into my virtual environment) but am still getting the same import error. /:

from moviepy.

Zulko avatar Zulko commented on May 18, 2024

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.

keikoro avatar keikoro commented on May 18, 2024

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.

keikoro avatar keikoro commented on May 18, 2024

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.

keikoro avatar keikoro commented on May 18, 2024

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.

Zulko avatar Zulko commented on May 18, 2024

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 object myclip and you
type myclip. and then hit tab, it will show you all the attributes and
methods of myclip. If you type clip.resize( and you hit tab it will
display the documentation of resize.

  • 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 write x = None. For istance if a clip has no sound you will have
clip.audio=None. Since the logical value of None is False 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)

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.