Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.1k stars 1.51k forks source link

.crop causes subclip to break video? #2013

Open Ewanophobia opened 11 months ago

Ewanophobia commented 11 months ago

Hello

To cut to the chase, I have a subclip from a video which I crop in my code:

clip_start = random.choice(TEMP)[0]

video_file = VideoFileClip(video)
subclip = video_file.subclip(clip_start, clip_start + clip_length)

clip = subclip.crop(x1=1, y1=1, x2=600, y2=600)
clip.write_videofile(OUT_PATH)

When the clip gets written out, the video is unplayable.

But, it's not a problem with the clip as:

clip_start = random.choice(TEMP)[0]

video_file = VideoFileClip(video)
subclip = video_file.subclip(clip_start, clip_start + clip_length)
subclip.write_videofile(OUT_PATH)

works normally.

Thanks

kthezelais commented 7 months ago

I'm having kind of the same issue here. Before the clip is cropped, I can watch the video on my phone with no issues. But after crop, I get only the sound with a pixelated green screen.

Jesus-Cries commented 6 months ago

I also have the same issue. The video won't play with my Windows media player but Chrome can play it when I drag the file into it.

SohamTilekar commented 6 months ago

Plese provide the python and moviepy version.

SohamTilekar commented 6 months ago

I think it is problem with the python version. Moviepy no longer maintained. it is outdated.

keikoro commented 4 months ago

Please always include your specs like we ask for in our issue templates – MoviePy version, platform used etc. – to help pinpoint what causes your problem, thanks.