Closed RasmusWL closed 5 years ago
Usually, the order of layers need to be changed and background clip with the "hole" in the middle is the best solution.
Thanks for the input @SuslikV. I can see that this can work for my MWE, and it should be applicable to my actual problem as well.
However, I don't think it's more of a hack than an actual solution to the core of this problem. It will not work if you want to add a transition to the location/rotation of Lenna, or transition to location/rotation of the OpenShot logo. If you use a picture with alpha to zoom, then this won't work either.
I think a solution to the core of this problem, could be to allow changing scale/location/rotation of the mask (by default, it could mirror the clip. solving my problem would just be making scale constant = 1.0)
We could add an additional property to effects, to render them before we scale the clip image. That combined with the crop effect, would allow the image to scale, but the crop to remain fixed (in theory). Not sure how well this would work in reality, but it's a possibility. :smile:
I think I understand your point. We could figure out the viewport that should be displayed by the crop effect before scaling the image. So by setting {left,right,top,bottom}_crop=0.0
, we will only show the same part that was shown on the first frame of the crop effect.
I don't know the internals of OpenShot, so I don't know if this is a good solution :smile:
For now, the "solution" that SuslikV came up with works for my specific case.
Question:
How can I apply a zoom effect to a clip, without changing the dimension shown? As an example, I try to display Lenna on top of the OpenShot logo, and I want to zoom in on Lenna without covering up more of the OpenShot logo. Example of what I'm looking for can be seen here
Attempts at solving the problem
I tried 3 approaches:
1.0 -> 2.0
, and linear crop of all sides0.0 -> 0.25
. This didn't work at all, since at half the transition more of the video will be shown (crop for all sides will be at0.125
, scale at1.5
, shown area in one dimension is1.5 - (1.5 * 0.125 * 2) = 1.125
) result video.osp
file. (for example, halfway needs a scale of(1.0 - (1.0 / 1.5)) / 2 = 0.16666666666666669
for each side). This almost does what I want, except for the fact that the dimensions is not completely constant. If you look at the left edge of the Lenna picture in the result video, you can see that it jumps back and forth a bit.Is it is possible to achieve this effect with OpenShot? :blush:
I can see one work-around; by doing the animation in an other project with the wanted dimensions, exporting this to a video, and importing into the original project. However, since I'm trying to automate the whole process with the openshot-api, I would rather not have to go through this :neutral_face:
System Details:
Other Details:
I found an example for how to do this with After Effects.