Dynamic video length

Hi, can my video’s length by dynamic depending on the length of my source clip?

Yes. You can set "length" to "auto" which will dynamically set the length. of the clip based on the asset source.

You can also set the "length"to "end" which will make the clip last for the duration of the whole Edit.

You can find more information in the docs.

 {
    "timeline": {
        "fonts": [
            {
                "src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/fonts/MovieLetters.ttf"
            }
        ],
        "background": "#000000",
        "tracks": [
            {
                "clips": [
                    {
                        "asset": {
                            "type": "text",
                            "text": "HELLO {{ NAME }}",
                            "font": {
                                "family": "Clear Sans",
                                "color": "#ffffff",
                                "size": 80
                            },
                            "alignment": {
                                "horizontal": "center"
                            },
                            "width": 720,
                            "height": 212
                        },
                        "start": 4,
                        "length": "end",
                        "transition": {
                            "in": "fade",
                            "out": "fade"
                        },
                        "fit": "none",
                        "scale": 1,
                        "offset": {
                            "x": -0.206,
                            "y": -0.138
                        },
                        "position": "center",
                        "effect": "zoomIn"
                    }
                ]
            },
            {
                "clips": [
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/earth.mp4"
                        },
                        "start": 0,
                        "length": "auto"
                    }
                ]
            },
            {
                "clips": [
                    {
                        "asset": {
                            "type": "audio",
                            "src": "https://shotstack-ingest-api-v1-sources.s3.ap-southeast-2.amazonaws.com/wzr6y0wtti/zzy8xbmk-1il3-dk4w-qubt-0p4qjs31tpw2/source.mp3"
                        },
                        "start": 0,
                        "length": "end"
                    }
                ]
            }
        ]
    },
    "output": {
        "format": "mp4",
        "size": {
            "width": 1280,
            "height": 720
        }
    }
}

thanks, is there a way to set a clip’s start to an arbitrary point near the end (like 5 seconds before a video (set to auto length) ends?

Basically I have videos of varying lengths, but on all of them I want branding to come up 5 seconds before the end.