This is great! Using percentages, I believe I’ve basically recreated my favorites ones from Movie Maker:
Zoom In
Zoom In, Hold Top
Zoom In, Hold Bottom
Zoom In, Pan Left
Zoom In, Pan Right
Zoom Out
Zoom Out, Hold Top
Zoom Out, Hold Bottom
Zoom Out, Pan Left
Zoom Out, Pan Right
For example, here is Zoom Out, Hold Top-
—
transition.fill: 1
transition.distort: 0
transition.rect: “0=-10%/0%:120%x120%; -1=0%/0%:100%x100%”
transition.halign: center
transition.valign: middle
“shotcut:animIn”: “00:00:06.006”
…
I don’t know what shotcut:animIn is. What is that? Is that close to 6 seconds since that’s what I set as my duration on my photos? Is it weird that it has an extra 6 thousanths?
Now for panoramas that I want to pan while filling either height or width, I still need to do those custom since they are all different sizes. And I don’t think there is any way using percentages like this. Or is there some way to do that? For example, I have a 5909x2736 pano that I’d like to fill height and pan across the full width. I figured it out with a custom size/position filter. But can that be done in an adaptive preset somehow?
Thanks to @sauron for referring me to this thread.
The duration of a simple keyframe. animIn = simple keyframe at beginning, animOut = simple keyframe at the end
Ok, sound good. But I wonder why I have an extra .006 seconds in there. Did I drag the black dot slightly past the end? It doesn’t matter I guess, but my photos are all set initially to 6 seconds. Oh wait, even the stock presets are 6.006 seconds.
Since I may adjust the duration of individual photos in the timeline, I would also then have to adjust the keyframe to get the pan/zoom effect to match the duration. Sooo, you can see the next question coming… is there any way to set the keyframe duration of a preset to go the whole length of an item? I’m just using the beginning keyframe since I want the same pan/zoom throughout the duration.
Maybe it is due to your framerate. Frame counts are converted into time based on frame rate.
180 frames / (30000/1001 frames/sec) = 6.006 sec
(30000/1001) is the exact frame rate for what is commonly referred to as 29.97
not completely for simple keyframes. You already saw how " -1=…" accomplishes that. Simply remove the shotcut:animIn and shotcut:animOut lines from your preset to make the preset use regular keyframes.
Does that file regenerate itself if the framerate changes?
Hmm regular keyframes instead of simple ones. I don’t know if I’m ready. Ok, I’ll experiment there.
Oh boy. I tried the stock Slow Zoom Out preset on a roughly 8 second image, and then it actually went the whole duration. How? Well I reopened the file in my text editor and now it said “shotcut:animIn”: “00:00:07.941”. So I guess that file is indeed actually changing every time I pick a different Timeline item.
However, my custom preset still doesn’t fill the duration. Ok then. Yeah Shotcut doesn’t know what I want with my presets.
So I tried removing that animIn line from my custom preset file like you said, and yes, it caused the keyframe to go the full duration of this longer item. Hah, great! Time to remove that from all my custom presets.
Hi @HikingMike - Just wondering if you were willing to share the code of your presets on here, and maybe post them as a .txt file? No worries if you’re not happy to do that!
Jon
@jonray, and everyone - Ok, here are my new Size & Position presets… rough approximations of what I remember from Movie Maker. I’ll attach it here as a zip file with all of them.
By the way, instead of using the word “Pan”, I used “Move” for moving the image left or right. I noticed that the stock presets have “Pan” when it’s the wrong direction (if you’re thinking like panning the camera). For example, “Slow Zoom Out, Pan Down Left” will actually move the image down/left, which would be pan up/right for the camera view terminology. I decided I don’t think it really makes sense to use “Pan” terminology in this case anyway when there is also zooming. I’m no professional, so maybe that’s what they say in filming even with zoom at the same time. But I like this way better.
Of course feel free to rename these if you use them. I put an “M” in front of them for my initial so they are easy for me to see in the list of presets. Let me know how they work for you or if you see anything that’s off.
Hey, that’s great to hear back that they work for you. And it’s cool to see that quick slideshow you made with them already, Jon. Nice description of how others can load them. Now I need to start using them too on this big slideshow
Ok, new question - can I make a preset that zooms an image enough to fill the width, and lose image some above/below the view window? This is for an image with greater width than height. Is that possible? The percentage would not be known and neither would the dimensions for transition.rect because we don’t know the dimensions of the source image. The Fill radio under Size and Position appears to fill the height, and actually so does the Fit radio so I might need a definition on what those choices do.
I can do this one-off by calculating the height I need to expand the width enough to fill the width. For example, with a 3264x2448 image, I calculate 3840/3264 = 1.176… Then 1.176*2448 = 2880. Set the width to 2880 and it fills the width of the view window. And here is a preset for those dimensions that fills width and pans vertically -
transition.rect: 0=0 0 3840 2880 1;178=0 -720 3840 2880 1
Wow, this is great information! I am a total newbie at Shotcut, and I’ve been rather confused about how the Size and Position filter works. I’m working with some still images that are all different sizes, and I was wondering why there’s no option for inputting values in percents rather than pixels. Looks like you have to hard-code percents into a custom preset, I guess.
Anyway, here are a few “dumb newbie” questions:
The 0,0 position refers to the top left corner of the frame, correct?
So apparently the Y axis is “backwards”, since a negative Y value is ABOVE the X axis, correct?
Does “fill” versus “fit” make any difference in the code for a custom Size and Position filter? I mean, if you’re specifying the exact dimensions (in pixels, or in percent of the original image), that nails it down, right?
Am I correct in assuming that the transition.rect statement could contain more than two sets of parameters? Can you call out 2, 3, 4, or more keyframes (separated by semicolons) in a single transition.rect statement?
For the next version 19.01.x, based on @HikingMike’s contribution, I changed the names of our presets to use “Move” instead of “Pan.” I also added Slow Zoom In/Out, Hold presets based on his (added Left/Right edges and a little slower.)