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!
Here is an example JSON template to create a split screen effect. The video is 16:9 aspect ratio and so are the two source videos. The source videos are cropped to a square shape and then positioned left and right using an offset.
Finally the video URLs for each clip and length are set using merge fields.
{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "{{ VIDEO_1 }}",
"crop": {
"left": 0.25,
"right": 0.25
}
},
"start": 0,
"length": "{{ VIDEO_LENGTH }}",
"transition": {},
"offset": {
"x": -0.25
}
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "{{ VIDEO_2 }}",
"crop": {
"left": 0.25,
"right": 0.25
}
},
"start": 0,
"length": "{{ VIDEO_LENGTH }}",
"offset": {
"x": 0.25
}
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
},
"merge": [
{
"find": "VIDEO_1",
"replace": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/surfers.mp4"
},
{
"find": "VIDEO_2",
"replace": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/skier.mp4"
},
{
"find": "VIDEO_LENGTH",
"replace": 5
}
]
}
The resulting video looks like below:
This should be all you need. If the problem is not the template but something to do with Airtable integration please can you post the error here and screenshots, etc…, the more info the better.
Thanks for your replay and the template! I use the studio tool because coding is foreign to me, the example video that your script produced looks great. I need exactly that in vertical 1080x1920.
I tried your template just to see if it works but it sadly didn`t , I attached the screenshots below. Don’t get confused by the media links of my videos, it looks like a normal drive link but it is a direct download link, that i tested and it works fine when added manually in shotstack.
Thanks for helping out lucas!
P.S. I can sadly only upload one file as a new user so i combined them in one pic.
It looks correct but you are getting a validation error, so the render is being blocked before any saving or processing can take place. A validation error suggests there is something wrong with one of the values in the JSON.
My guess would be that the VIDEO_LENGTH value is being sent as a string/text. It needs to be sent as a number. This article is related to dates but I wonder if the value is actually saved as text in Google Sheets. If you force the format to a number, then Make will hopefully send it to us as a number. How to prevent Google Sheets from changing numbers into dates Help Docs | Integromat Help Center
Try that and see if that works.
Also I can mock up a template for you, with videos top and bottom. Do you know what shape the source videos will be - wide or vertical?
Thank you! I will read into that, i am using airtable instead of sheets. The VIDEO_LENGTH field is already set to a Numbers Field.
A mockup would be amazing, so i can use it and learn from it. The shape of the source videos vary. If you could show me how i can change it i will duplicate the mockup and save different versions for the ratio.
These are the different versions i need:
- two 1080x1920 videos.
- one 1080x1920 and one 1920x1080 videos
- two 1920x1080 videos
I am trying to understand for myself, I am thankful for your time and explenations!
For the Make issue, maybe try hard coding the length value - it has to be a number, so not enclosed in quotes ". That way you can test if that is causing the validation issue.
Hey Lucas, like I said i have absolutely no coding experience and i use the Studio for my templates. So I don’t know how I can “hard code” the value in make.
So I just manually put the value in the Shotstack API like seen in the picture, same validation error again. The grabbing the videos from my airtable works fine. It’s just the length field at the moment.
Looking forward to the templates, that really helps me Lucas!
Hey Lucas just wanna check up if you can help me with this problem. If not its okay but i just need a clear statement from you to make a decision which software i am going to use. Thank you!
Hi @naytguaca I just checked this out and there appears to be an issue with our Make module where it sends through all properties as strings, while they should be numbers.
We’re looking to get this fixed ASAP.
Hey @dazzatron @lucas.spielberg any updates? Somehow i cannot even merge the video fields anymore. When can i expect to be able to use shotstack with make automation? Thanks!
Update: I can merge 1 video and as soon as i want to merge a second video it shows the same error again.