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

No work crop #1

Open
szerzs-collab opened this issue Jan 11, 2023 · 3 comments
Open

No work crop #1

szerzs-collab opened this issue Jan 11, 2023 · 3 comments

Comments

@szerzs-collab
Copy link

crop.py doesn't want to work
Can you show a code example? There is video.mp4.
Here is my example:
import os
from moviepy.editor import VideoFileClip,concatenate_videoclips
import moviepy.editor as mpy
from moviepy.video.fx.all import crop

path of the video file to be cropped

path = 'E:/Crop-a-Video-main/'

#path of the video file to be saved after cropping
output_video = 'E:/Crop-a-Video-main/final/'

for filename in os.listdir(path):

    clip = mpy.VideoFileClip(path+filename)
    (w, h) = clip.size
    cropped_clip = crop(clip, width=600, height=5000, x_center=w/2, y_center=h/2)
    cropped_clip.write_videofile(output_video+filename)
@armansamimi
Copy link

It doesn't work, can you give us revised script?

@pj8912
Copy link

pj8912 commented Jul 30, 2023

worked fine for me

@armansamimi
Copy link

Could you please check it again?

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

3 participants