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

concatenate_videoclips([clip1,clip2]) results in a clip where the second clip is skewed and has severe lines #520

Closed
evanthemann opened this issue Apr 1, 2017 · 7 comments

Comments

@evanthemann
Copy link

When running the following code:

`>>> from moviepy.editor import *

clip1 = VideoFileClip('clip1.MOV')
clip2 = VideoFileClip('clip2.mp4')
render = concatenate_videoclips([clip1,clip2])
render.write_videofile('render.mp4', codec='libx264')`

The resulting video file is messed up. It has lines all through the screen and there are about 4 copies of the clip tiled across the screen horizontally and vertically.

@Zulko
Copy link
Owner

Zulko commented Apr 1, 2017

that is most certainly because your clips are not the same size, therefore you must add method='compose' to concatenate_videoclip

@ghost
Copy link

ghost commented Apr 1, 2017

Should we output a warning if the sizes are not equal and the method is not compose?

@ghost
Copy link

ghost commented Apr 3, 2017

@evanthemann .. did @Zulko 's advice solve the problem?

@tburrows13
Copy link
Collaborator

In fact, why not make "compose" the default? I can't see why most people would want to use "chain"... @Zulko, is there any reason the default is "chain"?

@evanthemann
Copy link
Author

Yes it did! Realized I was trying to combine a 1280x720 clip with a 1920x1080 clip. Thanks!

@tismagic
Copy link

Do you have a method to resize the video's size?
If you do, can you show me?

here is a method I wrote by myself. I don't think this is very good
def resizeAllClip(clips):
max = 0
for clip in clips:
if clip.size[1] > max:
max = clip.size[1]
clip_t = []
for clip in clips:
wid = int((max / clip.size[1]) * clip.size[0])
print(wid)
clip = clip.resize(width=wid, height=max)
clip_t.append(clip)
return clip_t

@EnvoySir
Copy link

@Zulko Thanks for your solution. is there any other useful params to remind us?

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