Question about the new Size and Posiition keyframed presets

@sauron and @shotcut, thanks guys for these very helpful explanations. It’s all making more sense to me now! I’ll look forward to playing around with these presets when I get a moment. I appreciate your responses.

You should be able to use “:1.0” for shotcut:animIn and shotcut:animOut to mean one second (vary the number for other seconds values, of course). The important thing to note is that the colon and decimal characters tell the engine this is a time value. Use appropriate decimal point character for your locale.

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

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? :slight_smile: 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.

Ok, but I’m looking at the Slow Zoom Out stock preset right now and it is-

transition.fill: 1
transition.distort: 0
transition.rect: “0=-5%/-5%:110%x110%; -1=0%/0%:100%x100%”
transition.halign: center
transition.valign: middle
“shotcut:animIn”: “00:00:06.006”

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

Yes I’ll definitely share those here. Let me check them a little more to be sure they are correct.

@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.

HikingMike Size & Position Presets.zip (2.1 KB)

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.

  • Zoom In
  • Zoom In, Hold Bottom
  • Zoom In, Hold Top
  • Zoom In, Move Left
  • Zoom In, Move Right
  • Zoom Out
  • Zoom Out, Hold Bottom
  • Zoom Out, Hold Top
  • Zoom Out, Move Left
  • Zoom Out, Move Right
1 Like

@HikingMike - Thanks for posting these!! Much appreciated. Downloaded and unzipped - will try them out when I get a spare moment! Jon

Good job. They all work well.:+1:

Thanks again, @HikingMike. I just made this short slideshow using them. Nice option for some gently-moving transitions .


https://streamable.com/nhb35

For the benefit of others, to load presets, (it’s really easy!) - navigate to (Windows):

Settings (in shotcut, top menu bar)) > App Data Directory > Show…
then…
presets > affineSizePosition.

Copy all HikingMike’s text files there. Then they’ll show up as presets when a size/position filter is added.

Jon

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 :slight_smile:

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:

  1. The 0,0 position refers to the top left corner of the frame, correct?
  2. So apparently the Y axis is “backwards”, since a negative Y value is ABOVE the X axis, correct?
  3. 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?
  4. 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?

Yes.

AFAIK Fill allows you to zoom where fit will not zoom.

Yes you can have multiple parameters.

This thread gives a detailed explanation about how the Size and Position filter works.

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.)

1 Like

Sweeeeet! That is fantastic.