Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to call moviepy.video.fx.all.crop() ? #760

Closed
Swiffers opened this issue Apr 11, 2018 · 7 comments
Closed

How to call moviepy.video.fx.all.crop() ? #760

Swiffers opened this issue Apr 11, 2018 · 7 comments

Comments

@Swiffers
Copy link

The script looks like the most basic:

from moviepy.editor import
clip = VideoFileClip('./video.mp4')

I would like to crop() this clip, how to do it?

@Swiffers
Copy link
Author

The documentation mention:

from moviepy.video.fx.scroll import crop
newclip = myclip.fx( vfx.crop, x1=15)

But I'm getting this error:

from moviepy.video.fx.scroll import crop
> ImportError: cannot import name crop

@Zulko
Copy link
Owner

Zulko commented Apr 11, 2018

  • the documentation should say from moviepy.video.fx.crop
  • When you import moviepy.editor, you can also crop with cropped_clip = clip.crop(x1=15) I think.

@TejasBob
Copy link

import moviepy.video.fx.all as vfx
new_clip = myclip.fx(vfx.crop, x1=15)

This works fine!

@Swiffers
Copy link
Author

Swiffers commented Apr 11, 2018

@TejasBob It didn't for me,

Could it be caused by my multiple imports?

import moviepy.video.fx.all as vfx
from moviepy.editor import *

[...]
new_clip = myclip.fx(vfx.crop, x1=15)

But I fixed the issue by using:

from moviepy.editor import *
new_clip = vfx.crop(myclip, x1=15)

@tburrows13
Copy link
Collaborator

The recommended way is just with

from moviepy.editor import *
new_clip = clip.crop(x1=15)

Does this work?

@Swiffers
Copy link
Author

Yes, it does

@LaksVister
Copy link

The recommended way is just with

from moviepy.editor import *
new_clip = clip.crop(x1=15)

Does this work?

Not any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants