始めに

Chillin Render APIを使用すると、以下のようなJSON構造を定義することで、レンダリングされるビデオコンテンツとパラメータを指定できます。

  • [email protected]に連絡してRender APIクレジットを取得してください

  • ダッシュボードに移動してRender APIキーを生成してください

  • JSON構造をリクエストボディとして、APIキーをAuthorizationヘッダーとして指定して、Render APIエンドポイント(https://api.chillin.online/render/v1)にPOSTリクエストを送信します

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

コア概念

すべてのJSONオブジェクトには、ビデオの合成幅、合成高さ、解像度を指定するビデオプロジェクトオブジェクトが含まれています。

プロジェクトオブジェクトには、ビデオのレンダリングに必要な基本的なパラメータ(幅、高さ、長さ、背景色など)が含まれています。

プロジェクトには、ビデオ、画像、テキスト、形状、音声、エフェクトなど、各要素がビデオコンポーネントを表す1つ以上の要素も含まれています。

各要素には、位置、サイズ、色、コンテンツなど、コンポーネントに特有のパラメータが含まれています。

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

JSONスキーマ

リクエストJSONは、このドキュメントで定義されたJSONスキーマに厳密に従う必要があります。Chillin Video Editorで対応するリクエストJSONをテストおよび生成できます。