I’ve put together this very simple example to show how you can alternate from one clip to another while keeping the timing in sync. If you swap the source videos in the JSON below with the speakers and start adjusting the timing (start, length and trim) you should be able to achieve what you are trying to do.
In this example I am just using a counter video so you can see the seconds counting up and see the timing is continuously proceeding through the video.
Here is the JSON:
{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-1.mp4",
"trim": 0
},
"start": 0,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-2.mp4",
"trim": 5
},
"start": 5,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-1.mp4",
"trim": 10
},
"start": 10,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-2.mp4",
"trim": 15
},
"start": 15,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-1.mp4",
"trim": 20
},
"start": 20,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-2.mp4",
"trim": 25
},
"start": 25,
"length": 5
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "sd"
}
}
In this snippet the two videos are: https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-1.mp4 and https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/motion-graphics/countup-2.mp4.
The final output looks like this:
The trick will be to work out the start, length (duration) and trim (how much to chop off the start (or how far in to the video you are).
This should all translate across to one of our SDK’s as well but this should hopefully explain the general concept.