| 屬性 | 類型 | 必要 | 範例 | 值範圍 | 描述 |
|---|---|---|---|---|---|
| width | number | true | - | - | 視頻元素的寬度。 |
| height | number | true | - | - | 視頻元素的高度。 |
| ext | string | true | - | mp4 | mov | 視頻的文件擴展名(例如,“mp4”,“mov”)。 |
| externalUrl | string | false | - | - | 來自外部來源的視頻文件的 URL。 |
| startInSource | number | true | - | - | 視頻剪輯在源文件中的開始時間,單位為秒。通常為 0,只有當視頻節點從源視頻的前面被修剪時才會不同於 0。`startInSource` 和 `duration` 的總和必須小於或等於 `sourceDuration`。 |
| sourceDuration | number | true | - | - | 源視頻文件的總時長,單位為秒。此字段應與源視頻的實際長度匹配。 |
| isFrontTrimmed | boolean | false | - | - | 指示視頻是否已從源視頻的前面修剪。當 `startInSource` 不為 0 時,應設置為 true。 |
| volume | number | false | - | 0 - 1 | 視頻元素的音量級別。1 代表全音量,0 代表靜音。 |
| hasAudio | boolean | true | - | - | 指示視頻元素是否包含音頻。 |
| tone | object | false | - | - | 對圖像色調的調整,包括伽瑪、飽和度、對比度、亮度和顏色通道。 |
| lut | object | false | - | - | 用於調整圖像色調的查找表。 |
| filterAgent | object | false | - | - | 應用於視頻的過濾器配置。支持可選的區域遮罩。 |
| maskData | object | false | - | - | 用於裁剪或形狀視頻元素本身的遮罩配置(節點級裁剪)。這不同於 filterAgent.region,後者限制了過濾器效果的應用範圍。 |
注意:
- externalUrl 必須可訪問。
- 只支持 H.264 編碼的視頻;不支持 HEVC (H.265) 編碼的視頻。
sourceDuration字段必須與源視頻文件的實際時長匹配。startInSource和duration的總和必須小於或等於sourceDuration。- 在大多數情況下,
startInSource為 0。只有當視頻節點從源視頻的前面被修剪時,才會與 0 不同。- 當
startInSource不為 0 時,應將isFrontTrimmed設置為 true,以指示視頻已從前面修剪。
{
"id": "30793500-aee2-4f6d-845f-b3adbe4302ca",
"type": "Video",
"width": 1280,
"height": 720,
"hasAudio": true,
"start": 0,
"duration": 10.218542,
"trackIndex": 0,
"x": -209.95197696399893,
"y": 254.59255700448338,
"blendMode": "normal",
"anchorX": 640,
"anchorY": 360,
"rotation": 0,
"scaleX": 1,
"scaleY": 1,
"alpha": 1,
"skewX": 0,
"skewY": 0,
"keyframes": [],
"filterAgent": {
"type": "Pixelate",
"options": [{ "key": "size", "value": 8, "min": 1, "max": 100 }]
},
"externalUrl": "https://videos.pexels.com/video-files/1526909/1526909-hd_1280_720_24fps.mp4",
"ext": "mp4",
"tone": {
"gamma": -0.66,
"saturation": 0,
"contrast": 0,
"brightness": 0,
"red": 0,
"green": 0,
"blue": 0
},
"startInSource": 0,
"sourceDuration": 30.5,
"volume": 1
}