Creative tip - how to make an animated horizontal line for use in video titles

I created an animated horizontal line (which widens outwards from the middle).
Here it how it looks with a black background:


https://streamable.com/ao5kb

To do this:
A. In SC, I put a white colour clip on V2. I made it 10 seconds long

B. I used Size/ Position filter to make it 8 pixels high and 1920 pixels wide (full width), positioned half-way down the screen, then I animated it using Size /Position keyframes so it begins in the centre and widens out to full width.
Use these coordinates:
Start: Position: 960*, 540**; Size: 0, 8
End: Position: 0, 540; Size: 1920, 8

NB *960 is half of 1920 (full width in HD), **540 is half of 1080 (full height in HD).
Make the animation short - ie less than 1 second.

C. I exported the animation as a Quicktime Animation (.mov). (Tip : colour clip on V2, make sure there is no clip on V1). The background will look black in the preview but when exported will turn out transparent.

How to use it:

Importing the .mov file to the timeline and applying a Size/Position filter to the clip (make sure it’s set to “distort”) allows you to instantly make it any width by dragging the boundary box widthways - and also by dragging the boundary box in a vertical direction it allows you to make the line quite narrow.

I used it in the following sample video title:
RED ARROWS:

https://streamable.com/d8jle

PLANET EARTH:

https://streamable.com/qzisx

Enjoy!

4 Likes

Hope you don’t mind my adding to your excellent post.

Made a couple of Size & Position presets for horizontal line animation.

The first one creates a horizontal line starting from zero at the center of screen all the way to the outer edges of the screen. It can be used with any resolution, you can modify it to place the line anywhere on the screen and adjust the length of the line.

The second one creates a horizontal line starting from the left side of the screen ending at the right side.

H Line 0 to Full Screen.txt (224 Bytes)

H Line L to R.txt (223 Bytes)

Windows users can put the presets here: C:\Users\Username\AppData\Local\Meltytech\Shotcut\presets\affineSizePosition

Not at all, @sauron ! Good to hear from you.

Saving the animations as presets is ingenious! I will give that a try, thanks.

An easy way to get to this location that works on any OS is Settings > App Data Directory > Show… and then go into into presets > affineSizePosition.

Thanks for the info about presets, @shotcut and @sauron.

Just looking at the code and trying to work out how it works:

transition.rect: 
0=50% 50% 0% .5% 1;
29=0% 50% 100% .5% 1

Just to confirm my thinking, and also to help others, to my mind the above code means:

(please correct me if I’m wrong on any point)

A transition.rect: [The rectangle properties…]
B 0=: [Beginning (of frame 1 (?))]
C 50% 50% 0% .5% : [Position: 50% from left, 50% from top, Size: 0% width, 0.5% height.
All relative to screen size/resolution]
D 29=: [End (of frame 29 (?))]
E 0% 50% 100% .5%: Position: 0% from left, 50% from top, Size: 100% width, 0.5% height.
All relative to screen size/resolution]

Just a few questions -
a) are the “1s” (at the end of the rect properties) just to indicate that that feature is “on” ?, and
b) Does this code work for frame rates other than 30fps - ie does SC adapt?
Also, I assume:
“shotcut:animIn”: “00:00:01.00”
“shotcut:animOut”: “00:00:00.000”…

…means the transition lasts for 1 second?
(actually my brain sort of expected the numbers to logically be the other way round - ie “in” at 00.00 and “out” at at 01.00… )

I created and saved the presets in Shotcut. Then edited and replaced the pixel values with percentage values to make the preset “adapt” to different resolutions. This thread has more information about the process.

Tried it with 50 fps and 30 fps. The preset works with both frame rates. It does adapt.
I set the length of the transition to 1 second so I’m assuming

means the transition length is one second.

The other questions need to be answered by Dan. He’s the one who knows all about how the presets and key frames work.

The “1” is the level of opacity, where 1 = 1.0 = 100%. This opacity is not exposed in the Size and Position filter UI; it always sets it to 1.

No, you would need to substitute the time clock value format you see in “shotcut:animIn”
0=50% 50% 0% .5% 1; 00:00:01.00=0% 50% 100% .5% 1
You could use “00:00:00.00” instead of “0” but it is not necessary.

“shotcut:animIn” and “shotcut:animOut” are the durations of the simple keyframes and not their positions or start and end times. There are 2 simple keyframes and each has a starting time relative to the filter start or end.

@sauron and @shotcut - I am very grateful for your hugely informative replies. It’s increased my understanding of it all. Fascinating stuff!! - Thanks!

OMG I just realised that I’d asked about presets in the above thread! Completely forgot about it! Apologies for that.

This topic was automatically closed after 90 days. New replies are no longer allowed.