To save your XML Template and to export a Dynamic Movie from the template programmatically, you need to send the template
the https://xml.impossible.io/v1/xml/<region>/<prjuid>/<name> endpoint with an authenticated
POST request.
curl -u APIKEY:APISECRET https://xml.impossible.io/v1/xml/us-west-2/12345-abcdef-7890/name-for-template -d '
<movie width="640" height="360" framerate="30/1">
<scene duration="100">
<video url="https://cdn.impossible.io/xml/003.mov" audio="false">
<filter type="saturation" intensity="0.5" />
<transform type="flip" axis="x" />
<filter type="vignette" color="#ff00ff" />
</video>
</scene>
</movie>'
To render your XML Template directly and optionally upload the rendered video to a destination,
you need to send the template and upload instructions the https://xml.impossible.io/v1/render/<region>/<prjuid> endpoint with an authenticated POST request.
If you do not specify a destination, the response will include a URL to the rendered video.
The following extra parameters (-d parameter=...) are recognized:
| format | Format of the rendered video, e.g. "mp4", "webm", "flv", "mpg", "wmv", etc |
| async | "true": return immediately, upload the video in the background |
| onsuccess | A URL to notify when the video was rendered and uploaded. |
| onerror | A URL to notify when the video rendering or uploading failed. |
curl -u APIKEY:APISECRET https://xml.impossible.io/v1/render/us-west-2/12345-abcdef-7890 \
-d destination='{"type": "s3", "aws_access_key_id": "my_access_key",
"aws_secret_access_key": "my_secret_key", "bucket": "my-bucket", "filename": "my-video.mp4"}'
-d template='
<movie width="640" height="360" framerate="30/1">
<scene duration="100">
<video url="https://cdn.impossible.io/xml/003.mov" audio="false">
<filter type="saturation" intensity="0.5" />
<transform type="flip" axis="x" />
<filter type="vignette" color="#ff00ff" />
</video>
</scene>
</movie>'
Terms of Use | © 2017, Impossible Software, or its affiliates.