API & Integration -> Quick Start
Concatenate multiple videos
This example shows how to combine multiple videos into one using RenderScript.
Step 1Declare two videos
Declare two video elements. Make sure that they are on the same track to have them play after one another.
curl -X POST https://api.creatomate.com/v2/renders \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -d '{ "output_format": "mp4", "width": 1920, "height": 1080, "elements": [ { "type": "video", "source": "https://cdn.creatomate.com/demo/video1.mp4", "track": 1 }, { "type": "video", "source": "https://cdn.creatomate.com/demo/video2.mp4", "track": 1 } ] }'
Step 2Add an optional transition
To apply a transition effect between the videos, add an animation to the second video, with
transitionset to
true.
curl -X POST https://api.creatomate.com/v2/renders \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -d '{ "output_format": "mp4", "width": 1920, "height": 1080, "elements": [ { "type": "video", "source": "https://cdn.creatomate.com/demo/video1.mp4", "track": 1 }, { "type": "video", "source": "https://cdn.creatomate.com/demo/video2.mp4", "track": 1, "animations": [ { "duration": 1, "transition": true, "type": "fade" } ] } ] }'