Weird sound when used video with sound

Hi Shotstack Team,

I have rendered a video https://shotstack-api-stage-output.s3.ap-southeast-2.amazonaws.com/xl0xyiuvel/97f17a71-87c7-420a-aab0-249376fe8843.mp4 and strange sound occurs around 12th second.

Could you please assist?

This sounds like the length you have set for the video file with the audio is longer than the actual video file. Or if you are using an audio file, the length has been set slightly longer than the actual duration of the media file.

For example if you have a video (with audio) and the duration is 20 seconds, but in the API you set the JSON length to 20.1 seconds, the last sample of the audio will loop for the extra 0.1 second and produce the sound you are hearing.

The solution is to make sure the length is set to the exact duration of the video/audio file or slightly shorter.

Try that but If you still have issues share a JSON file with the issue and I can correct it for you.

1 Like

Thank you, it makes total sense

1 Like

Just an update on this if anyone else has the same issue. There are two helpful ways to get the length of the video or audio file so you can set the length accurately.

First is the probe endpoint and use the response.metadata.format.duration value, the endpoint is documented here:

Second, you can upload and save your assets with Shotstack and let us manage them using our Ingest service. When you upload a file we save metadata such as width, height and duration. You can call the API to get these details and use the duration from the response. Docs here:

1 Like