antiboredom/vidpy

Center video on a square Composition

Opened this issue · 8 comments

Hi, I been enjoying playing around with this library. I been trying to center (vertically) a regular 1920x1080 video on a square Composition (500x500)

I notice that the video scales correctly to the 500 width but whenever I try to move it down to center it it gets cropped at the bottom.

Am I implementing this incorrectly or is it a limitation of the library.

subclip = Clip('video.mp4').position(0, 0, '100%', '100%')
comp = Composition([subclip], width=500, height=500)
comp.preview()

I also notice that once i add a .position() there is a spacing at the top even when my Y value is 0.

Thanks again for clarifying.

Hi - glad you're liking it! There are definitely some issues with how I'm doing positioning and scaling. I will take a look on my end.

kyb3r commented

Having a similar problem with positioning.

After using a 1280x200px image as a clip and putting it in a composition and trying to change the position of the clip, the clip gets partially cropped out.

clip = Clip('image.png')
clip.position(x=0, y=100)

comp = Composition([clip], width=1280, height=720)
comp.preview()

Is there any way that I can help fix this issue?

kyb3r commented

There are many reasons why I would prefer using melt over moviepy,
including multicore rendering support, stability - moviepy uses a tonne of ram if you are using many clips, the ability to serialize videos into XML, etc. I would gladly pay to get a stable version of this library!

@kyb3r any contributions would be welcome! I've neglected this library for a while but interested in getting back into it...

kyb3r commented

@antiboredom I made some changes on my fork that seemed to fix the issue with images, but I'm not sure if its the best way to fix it. I'm still new to the MLT Framework and would appreciate some pointers so I can do it right. I'm down to contribute to the library and turn it into something amazing. Lemme know if you wanna create a discord server or something where we can discuss the development, I feel like a realtime chat would make it easier to communicate.

@kyb3r I set up a discord server here: https://discord.gg/d68FKU6

Hi, interesting project. I would like it to develop.
I used earlier MLT and then Moviepy (there are memory problems). Now I'm looking for another solution.
I wonder maybe yours VidPy. I also looked at https://github.com/PixarAnimationStudios/OpenTimelineO
It is universal and more convenient than XML and can be compatible with KDENLIVE (MLT)

I like the number of effects in MLT and I would like to connect the OpenTimeline