I am trying to trim a youtube video as explained here: Trim a video using the editing API — Shotstack
Post Endpoint:
https://api.shotstack.io/stage/render
Body:
{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://www.youtube.com/watch?v=xkgMj8V7ffY"
},
"start": 0,
"length": 7
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "sd"
}
}
post API is success with 201 created.
{
"success": true,
"message": "Created",
"response": {
"message": "Render Successfully Queued",
"id": "d03bddae-490b-4b32-8b79-975b11b958ae"
}
}
But after hitting the get asset endpoint with response id in the path the response.status
is coming as failed. Below is the response body
Get Asset Endpoint
https://api.shotstack.io/stage/render/d03bddae-490b-4b32-8b79-975b11b958ae
But response.status is failed
Body:
{
"success": true,
"message": "OK",
"response": {
"id": "d03bddae-490b-4b32-8b79-975b11b958ae",
"owner": "f63d04cb2c",
"plan": "sandbox",
"status": "failed",
"error": "Rendering failed: One or more clips is not a valid media file and could not be loaded",
"duration": 7,
"billable": 7,
"renderTime": 434.97,
"data": {
"output": {
"format": "mp4",
"resolution": "sd"
},
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://www.youtube.com/watch?v=xkgMj8V7ffY"
},
"start": 0,
"length": 7
}
]
}
]
}
},
"created": "2022-12-31T09:14:11.075Z",
"updated": "2022-12-31T09:14:12.880Z"
}
}