Variable clip length and auto clip adjustment options

Hi, this might be an obvious question, but please point me in the right direction.

Is it possible using the visual template designer, to auto adjust the length of other clips on the template, to the length of the main video clip in the template?

I see I can manually set the length of elements like logos and other text on the template, but would like them to share the same length as the main video clip, which isn’t always the same in my user case – it could be a 30second clip, it could be 1.45sec clip. But I would like the length of the other elements in the template to match this length.

In a more advanced scenario, there are some text overlays over the video I would like to spread out evenly throughout the final video depending on the length of the main video clip.

Hope this makes sense.

There isn’t currently a way to do this automatically using the editor. The way to do this via the API is to fetch the length of the main video and then adjust the length of the other assets.

You can get the length in one of two ways:

  1. Use the probe endpoint (Inspecting Assets | Shotstack Documentation), pass the URL of the main video and it will return the duration, then set the length of the other clips using merge fields or programmatically.

  2. Use the Ingest API (Ingest and Transform Source Footage | Shotstack Documentation), when you upload or transfer an asset to Shotstack, we save the duration, size etc… You can then look up the duration using the API and set the length of other assets using merge fields.

We do have “smart” clips on our roadmap which will let you do this kind of thing in the edit itself but right now it is a semi-manual process.

Hey Lucas, I have a similar problem. I have a template to turn 2 videos into 1 splittscreen video.

I use a merge field to replace my video from the airtable list. That works fine for one video, but as soon as i put a merge field for the second video the operation fails. Same is for video lenght, when i set a merge field for it and replace it with a input for example “19” the operation fails too.

I tried a lot and i came to the conclusion that as soon as i use more than 1 merge field in a tremplate it fails.

I use airtable for the data like video urls and video length, make/integromat to tie shotstack and my airtable together. Whenever i get an error it says the error is coming from shotstack API.

Can you please give me some advice on how to get my splittscreen template to work with 2 merge field video tracks and a merge field for lenght.

Thanks!