Slow motion api?

I don’t think shotstack has any slow motion capabilities. Is there a good API I could send clips to first to slow them 50% before sending to shotstack? (I’m looking to slow 50%)

It is not built in just yet, but we have built a proof of concept and plan to add something soon. We also have a new Ingest API that is designed to upload and store source files and also create renditions that have transformations applied: Creating Renditions from Source Files | Shotstack Documentation. Speed could be one of the transformations. Let me try this weekend and see if I can hook that up.

1 Like

I added this to the API. You can now set the playback speed of a video asset between 0 (paused) and 10 (10x speed). 0.75 - 0.5 will give you a reasonably smooth slow-motion effect. It might be better if you have 60fps or higher framerate footage although I only tried with 25-30fps.

To speed up just use a value greater than 1 - 1.5 - 2 give some fun results.

The speed settings are in the API docs for video and audio, but not yet in the SDK’s. SDK’s will follow shortly.

As explained in the docs, you might need to recalculate the length of the clip to shorten or lengthen it depending on if you speed up or slow down.

1 Like

Here is an example of slowed down video, audio is also slowed down:

Here is the clip part of the JSON, note that the original video duration is 25.85, so the new length is set to 34.36 (25.85 / 0.75).

{
    "asset": {
        "type": "video",
        "src": "https://github.com/shotstack/test-media/raw/main/captioning/scott-ko.mp4",
        "volume": 1,
        "speed": 0.75
    },
    "start": 0,
    "length": 34.36
}

And sped up:

{
    "asset": {
        "type": "video",
        "src": "https://github.com/shotstack/test-media/raw/main/captioning/scott-ko.mp4",
        "volume": 1,
        "speed": 1.5
    },
    "start": 0,
    "length": 17.23
}

Note in this one the length is 17.23 (25.85 / 1.5)

1 Like