Not being able to stitch the clips together

Hi, I’m trying to stitch a couple clips together on the first track, a single music asset on the second one, and a couple titles together on the last one.
The result has a single clip of 30 seconds (the same one) with artifacts on borders, and no other tracks added one on another, even tho I set the starts/lengths properly.
Here is the rendered video: https://shotstack-api-stage-output.s3-ap-southeast-2.amazonaws.com/jxzvlzl8n1/51dade76-c47b-4290-8373-2de19034448b.mp4

The main idea is that the clip should start and have the duration I set, and multiple tracks should overlap one another (since it’s a title, an audio and a video, and based on the nodejs demo, it should overlap)

The code is using the nodejs sdk, and each clip has a length and start.

I looked up your JSON in our backend and can see a couple of issues:

1) Stitching clips - it appears that you are trying to loop the main video clip multiple times through out the video but the end of the clip freezes on the last frame so it doesn’t loop smoothly.

When I checked the source video using our probe endpoint: https://api.shotstack.io/v1/probe/https%3A%2F%2Fak.picdn.net%2Fshutterstock%2Fvideos%2F2632940%2Fpreview%2Fstock-footage-two-child-funning-in-park-outdoors.mp4

It shows the duration is 5.64 seconds, your JSON plays the clip for 7.5 seconds so after 5.64 seconds there is no more video to play so the clip stays on the last frame until the next clip starts again.

The work around for this is to use the probe endpoint to get the duration (just replace the URL at the end with encoded URL of the asset you want to fetch) and get the exact duration, then set the length using that value and repeat every x seconds. So for this video the first clip would start at 0 and have a length 5.64, the second clip would start at 5.64 and length 5.64, etc…

2) The artifact/glitch down the right hand side - this is caused by irregular shaped/aspect ratio videos which when stretched result in a height with a fraction of a pixel which the encoder can’t process.

The work around in your case is to scale the clip by a very small amount so that it is slightly bigger than the video itself. You can read more about the Clip scale property here: Shotstack v1 API Reference Documentation.

I did notice that the source video is a Shutterstock preview, the video itself is very small so perhaps this issue only happens with previews. I would imagine Shutterstock licensed footage would be available in regular 720p/1080p dimensions and 16:9 aspect ratios so this issue might not be present when using full size footage.