Serve Video with Shotstack
Shotstack provides a built in asset hosting service for your generated videos, images and audio files. Assets are stored on a high availability storage system and served globally via a content delivery network (CDN).
Hosting is enabled by default and all assets rendered via the editing API or ingested via the ingest API are immediately sent to the hosting service. There is a webhook that posts a callback when the asset arrives at the hosting service and an API that allows you to look up information about the asset and it's availability.
Assets are hosted with the following URL format:
https://cdn.shotstack.io/{{REGION}}/{{STAGE}}/{{OWNER_ID}}/{{FILENAME}}
Where the following parameters need to be replaced with:
Parameter | URL |
---|---|
REGION | The only region currently available is au |
STAGE | The staging environment: stage for the development sandbox, v1 for live production usage. |
OWNER_ID | The owner or key ID. This is the owner parameter returned by render status requests or the key ID in dashboard |
FILENAME | The asset filename to serve to users |
An example URL looks like the following:
https://cdn.shotstack.io/au/v1/msgtwx8iw6/2826ceb8-f0d4-43da-a472-42d88161d1a3.mp4
Setup
The Shotstack hosting service is setup by default and does not need to be setup or configured.
Adding credentials
The Shotstack hosting service is built in to the Shotstack platform and does not require credentials.
Integration
All assets created by the editing API and ingest API are automatically sent to the Shotstack hosting service. You do not need to add or edit the output destinations parameter unless you want to opt-out from hosting.
Opting out from the Shotstack destination
By default all generated files are sent to the Shotstack destination. If you transfer files to your own hosting or storage provider you may wish to opt out from hosting your videos with Shotstack using:
"destinations": [{
"provider": "shotstack",
"exclude": true
}]
The exclude value of true
will not send videos to Shotstack.