Can I create a custom size video?

In “Pricing” it says that “Custom sizes and resolutions” are available. But I haven’t found how to do it in API documentation.
For example, I want to create a video with size 555x444. Can I do it?

Thank you! I love ShotStack, it’s cool :sunglasses:

Yes sorry there is a small validation error we need to fix but the functionality is there. You can use custom sizes using the size property in the output part of your JSON:

{
    "timeline": {
        "soundtrack": {
            "src": "https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/private/epic.mp3"
        },
        "background": "#000000",
        "tracks": [
            {
                "clips": [
                    {
                        "asset": {
                            "type": "html",
                            "html": "<b>Custom sized video (556 x 444)</b>",
                            "css": "b { font-family: \"Open Sans\"; color: #ffffff; font-size: 24px; text-align: left; }",
                            "width": 400,
                            "height": 200,
                            "background": "transparent"
                        },
                        "start": 1.2,
                        "length": 5,
                        "position": "bottomLeft",
                        "offset": {
                        	"x": 0.05,
                        	"y": 0.05
                        },
                        "transition": {
                            "in": "fade",
                            "out": "fade"
                        }
                    }
                ]
            },
            {
                "clips": [
                    {
                        "asset": {
                            "type": "video",
                            "src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/footage/hot-air-balloon-vertical.mp4",
                            "trim": 5
                        },
                        "start": 1.5,
                        "length": 5,
                        "transition": {
                            "in": "fade",
                            "out": "fade"
                        }
                    }
                ]
            }
        ]
    },
    "output": {
        "format": "mp4",
        "size": {
            "width": 556,
            "height": 444
        }
    }
}

Make sure to use widths and heights that are divisible by two. So 555px will throw an error. 556px is fine. At the moment it’ll throw an Rendering failed error but we’ll try to make that a bit more clear, and fix that bug in a future release.

This isn’t available in the SDKs yet, which should get updated over the next couple weeks. In the meantime you can add the property to the edit object manually.

1 Like