Incipere

Chillin Render API permittit tibi contentum video et parametra definire ad reddendum, definiendo structuram JSON sicut infra.

  • I ad Render Console ad obtinendum credita Render API et generandum tuum clavis Render API.

  • Mittere petitionem POST ad finem Render API cum tuo clavis API:

curl-example.sh
1curl -X POST https://render-api.chillin.online/render/v1 \ 2-H "Accept: application/json" \ 3-H "Content-Type: application/json" \ 4-H "Authorization: Bearer YOUR_API_KEY" \ 5-d @request.json
request.json
1{ 2 "compositeWidth": 1920, 3 "compositeHeight": 1080, 4 "fps": 30, 5 "projectData": { 6 "type": "", 7 "width": 1920, 8 "height": 1080, 9 "fill": "#000000", 10 "view": [ 11 { 12 "id": "bba95c7f-652b-4380-b166-6bece989f527", 13 "type": "Image", 14 "start": 0, 15 "duration": 5, 16 "trackIndex": 0, 17 "x": 0, 18 "y": 0, 19 "width": 3629, 20 "height": 5444, 21 "blendMode": "normal", 22 "anchorX": 1814.5, 23 "anchorY": 2722, 24 "rotation": 0, 25 "scaleX": 0.19838354151359294, 26 "scaleY": 0.19838354151359294, 27 "alpha": 1, 28 "skewX": 0, 29 "skewY": 0, 30 "hidden": false, 31 "locked": false, 32 "keyframes": [], 33 "externalUrl": "https://images.pexels.com/photos/33189512/pexels-photo-33189512.jpeg", 34 "ext": "jpeg" 35 } 36 ], 37 "audio": [], 38 "effect": [], 39 "transition": [], 40 "version": 0, 41 "duration": 5 42 } 43}; 44

API in modo async operatur et responsionem reddet sicut hoc:

async_response.json
1{ 2 "code": 0, 3 "data": { 4 "message": "Async render request submitted successfully", 5 "render_id": 100000, 6 "status": "processing" 7 }, 8 "msg": "success" 9} 10

Notiones Fundamentales

Omnes obiecta JSON includunt obiectum projecti video, definientem latitudinem compositam video, altitudinem compositam, et resolutionem.

Obiectum projecti continet parametros fundamentales ad reddendum video, quales sunt latitudo, altitudo, duratio, color background, et plura.

Projectum etiam includit unum vel plura elementa, ubi unumquodque elementum repraesentat componentem video, qualis est video, imago, textus, figura, audio, vel effectus.

Unumquodque elementum continet specificos parametros pro componenti, quales sunt positio, magnitudo, color, contentum, et cetera.

project.json
1{ 2 "compositeWidth": 1920, 3 "compositeHeight": 1080, 4 "fps": 30, 5 "projectData": { 6 "type": "", 7 "width": 1920, 8 "height": 1080, 9 "fill": "#000000", 10 "view": [ 11 { 12 "id": "8ecf7475-2c6c-47f9-827b-a09c7913f4c0", 13 "type": "Image", 14 "start": 0, 15 "duration": 5, 16 "trackIndex": 0, 17 "x": -570.0335392757963, 18 "y": -170.90659033307685, 19 "blendMode": "normal", 20 "anchorX": 1302, 21 "anchorY": 2312, 22 "rotation": 0, 23 "scaleX": 0.23356401384083045, 24 "scaleY": 0.23356401384083045, 25 "alpha": 1, 26 "skewX": 0, 27 "skewY": 0, 28 "keyframes": [], 29 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg", 30 "ext": "jpeg" 31 } 32 ], 33 "audio": [], 34 "effect": [], 35 "transition": [], 36 "version": 0, 37 "duration": 5 38 } 39}; 40

Schema JSON

Petitionem tuam JSON stricte adhaerere debet ad schema JSON definitum in hoc documento. Potes testare et generare correspondens petitionem JSON in Chillin Video Editor.