Just a warning up front: I trained an AI to write weird Lifehacker articles and then generate videos from them, so actually pay attention to any of the content in the JSON or look at the renders please be prepared for a “WTF is this?” Also, I removed domain names in my URLs in the JSON below and wanted to mention that so you know it’s not the problem.
I’m using the PHP SDK, but since it uses Guzzle I just pulled the JSON out of the requests so I could post that (since, ultimately, that’s what the API is getting and I figured it’d make more sense to compare that data than the giant PHP object it’s based on). Both edits were generated using the same script with different source data so it’s strange that not all edits succeed. I figured this must be related to the source media but I checked them and they’re fine. Maybe you can see what I’m missing in the JSON.
Here is JSON output for a successful render:
{
"timeline": {
"background": "#000000",
"fonts": [
{
"src": "https:\/\/shotstack-assets.s3-ap-southeast-2.amazonaws.com\/fonts\/OpenSans-Regular.ttf"
}
],
"tracks": [
{
"clips": [
{
"asset": {
"type": "audio",
"src": "https:\/\/dl.airtable.com\/.attachments\/d05cd5436584e4fc90964239a2b081da\/f5024b02\/FILMPAC_Father--Son_FMAAA2205.mp3?ts=1653429023&userId=usrQ4kJRtjzTLK4bl&cs=6ffb8fce77fb691d",
"volume": 0.1
},
"start": 0,
"length": 123,
"fit": "crop",
"position": "center",
"transition": {
"out": "fade"
},
"opacity": 1
},
{
"asset": {
"type": "html",
"html": "<h1>Frozen Mayonnaise Popsicles Make for an Improved Relationship With Your Dad<\/h1><p>by Globot Duke Cadmus<\/p>",
"css": "h1 { color: #ffffff; font-size: 32px; font-family: \"Open Sans\"; margin-left: 48px; margin-bottom: 4px; width: 1400px; line-height: 100%; } p { font-size: 18px; color: #ffffff; text-transform: uppercase; font-family: \"Open Sans\"; margin-left: 48px; width: 1400px; }",
"width": 1400,
"height": 160,
"background": "transparent",
"position": "left"
},
"start": 5,
"length": 118,
"fit": "none",
"position": "bottomLeft",
"offset": {
"x": 0,
"y": 0
},
"transition": {
"out": "fade"
},
"opacity": 1
}
]
},
{
"clips": [
{
"asset": {
"type": "audio",
"src": "https:\/\/dl.airtable.com\/.attachments\/e315aa47b8cbb2bb7f2e1c7f7f9629fa\/297b24cb\/c99809cd256c1b087f122c36d7dc4136.mp3?ts=1653430490&userId=usrQ4kJRtjzTLK4bl&cs=a3767a085f0056a1",
"volume": 1
},
"start": 5.25,
"length": 118,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "image",
"src": "https:\/\/[DOMAIN]\/alh\/aLh-Watermark-bg-short.png"
},
"start": 5,
"length": 118,
"fit": "crop",
"position": "center",
"opacity": 1
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https:\/\/[DOMAIN]\/alh\/alh_bumper.mp4",
"volume": 1
},
"start": 0,
"length": 5,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "image",
"src": "https:\/\/dl.airtable.com\/.attachments\/5e1f337431d7d4fd8ec511e8ce1b5ecd\/c48b44eb\/pexels-photo-1435901.jpeg"
},
"start": 5,
"length": 5,
"fit": "crop",
"position": "center",
"transition": {
"out": "fade"
},
"effect": "zoomIn",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/86706fc25f089151cf3b77df63b7f10f\/08955a22\/mayonnaise-01.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=a6f8d912f9aaa39b",
"volume": 0
},
"start": 10,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/bda7cc08dacf6bbead0b1598c392ed64\/9999e886\/mayonnaise-02.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=06feaf507df7c5d3",
"volume": 0
},
"start": 17,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/a2ea677b345544fe5bbeb80811ed2ca9\/9da62749\/579049398.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=3358bf3a5cec972c",
"volume": 0
},
"start": 24,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/c35abd8f5df24bb73886d12d8667fc4d\/f9abc904\/471842425.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=4b3cc0c032fe2f47",
"volume": 0
},
"start": 31,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/0423fc380b5add14fcd57313f0480e4e\/9e1b94cc\/446893941.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=45b540bdb634c43b",
"volume": 0
},
"start": 38,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/42cff5eeecb5943ff717939b4c3403f8\/7f2207f9\/456084550.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=c8a1197fb0c05693",
"volume": 0
},
"start": 45,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/bbc5032485c9070f8eb36dc5f0f62ff0\/8fc0b614\/397913267.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=c136736c649cb5cb",
"volume": 0
},
"start": 52,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/2e07c06b1ca3862e8d2cc5330a32b1b7\/39f25542\/398491096.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=96cc680d043acebf",
"volume": 0
},
"start": 59,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/162f70fb8abb2fecd976c8574fc67b79\/78161251\/430435946.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=7c3022971f3003df",
"volume": 0
},
"start": 66,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/276ec1c4e9becd77f286b5e5196af319\/739de733\/429549536.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=f121cfc9a5e88a9a",
"volume": 0
},
"start": 73,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/1bd727845148550f2ac33c5a0f59059a\/ef76b05c\/391587199.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=6cba8513bb5d8d4b",
"volume": 0
},
"start": 80,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/59e8e49418d03b737a5634f4392f14ee\/8246df73\/368267400.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=3b95b83dadc892da",
"volume": 0
},
"start": 87,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/0069bba20b203becbf5d145b4765408b\/e0ae16cf\/371616705.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=83c5dbcbcd49b799",
"volume": 0
},
"start": 94,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/04a7f0adb9352d4812353e769398da22\/25241a59\/377065649.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=a32595f37bc554ca",
"volume": 0
},
"start": 101,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/dl.airtable.com\/.attachments\/0b738cdffaf08668729e1fe33312a308\/14037360\/401469703.hd.mp4?ts=1653429017&userId=usrQ4kJRtjzTLK4bl&cs=bc7954059b874ed2",
"volume": 0
},
"start": 108,
"length": 7,
"fit": "crop",
"position": "center",
"opacity": 1
},
{
"asset": {
"type": "video",
"src": "https:\/\/[DOMAIN]\/alh\/like-comment-subscroob.mp4",
"volume": 0
},
"start": 115,
"length": 8,
"fit": "crop",
"position": "center",
"transition": {
"out": "fade"
},
"opacity": 1
}
]
}
],
"cache": true
},
"output": {
"format": "mp4",
"resolution": "1080",
"fps": 24,
"quality": "medium",
"repeat": true
},
"callback": "https:\/\/[DOMAIN]\/shothook\/webhook.php?shotstack=recL9CdHx9dzf3rzb",
"disk": "local"
}
The rest won’t fit so I’ll post the unsuccessful example as a comment.