Minimal JSON Example
This example provides a minimal JSON payload for server-side rendering. It contains one video clip and one compound caption. For an initial integration, copy the complete JSON and use it to create a rendering task. After validating the flow, replace the video URL, caption text, or compound-caption style as needed.
Complete JSON
Example contents
- The output resolution is 960 × 540;
- The total timeline duration is 10 seconds;
- The video is trimmed from 0 seconds to 10 seconds in the source media;
- The compound caption starts at 0 seconds on the timeline and remains visible for 5 seconds;
- The compound caption contains two text items:
VLOG #01andDAILY LIFE.
Field reference
All time fields use microseconds. One second equals 1,000,000 microseconds.
| Field path | Type | Description | Example or constraint |
|---|---|---|---|
timeline.resWidth | integer | Output video resolution width, in pixels. | 960 |
timeline.resHeight | integer | Output video resolution height, in pixels. | 540 |
timeline.duration | integer | Duration of the entire timeline, in microseconds. | 10000000 (10 seconds) |
timeline.videoTracks | array | List of video tracks. | 1 video track in this example |
timeline.videoTracks[].videos | array | List of video clips in the current video track. | 1 video clip in this example |
timeline.videoTracks[].videos[].path | string | Video media URL. It can be replaced with any valid video URL accessible to the rendering service. | https://alieasset.meishesdk.com/demo/video.mp4 |
timeline.videoTracks[].videos[].trimIn | integer | Trim-in time in the source video, in microseconds. | 0 |
timeline.videoTracks[].videos[].trimOut | integer | Trim-out time in the source video, in microseconds. | 10000000 (10 seconds) |
timeline.captionTracks | array | List of caption tracks. | 1 caption track in this example |
timeline.captionTracks[].compoundCaptions | array | List of compound captions in the current caption track. | 1 compound caption in this example |
timeline.captionTracks[].compoundCaptions[].inPoint | integer | Compound-caption in-point on the timeline, in microseconds. | 0 |
timeline.captionTracks[].compoundCaptions[].duration | integer | How long the compound caption remains visible, in microseconds. | 5000000 (5 seconds) |
timeline.captionTracks[].compoundCaptions[].styleId | string | Compound-caption package ID. Only the two IDs listed below are currently supported. | Select one of two values |
timeline.captionTracks[].compoundCaptions[].captionItems | array | List of text items in the compound caption. | 2 text items in this example |
timeline.captionTracks[].compoundCaptions[].captionItems[].index | integer | Text-item index; keep it unique and ordered within the compound caption. | 0, 1 |
timeline.captionTracks[].compoundCaptions[].captionItems[].text | string | Caption text. It can be changed freely, but keep the length appropriate because long text may affect the package layout. | VLOG #01, DAILY LIFE |
Compound-caption styles
The following two compound-caption packages are currently available. The styleId must be one of these values:
8FC6C80D-0F68-4EE2-B773-982975DBB4C4D037A06A-FFD8-4863-A291-A2BC105F0BBC
To switch styles, replace the styleId in the JSON with the other supported value. When editing captionItems[].text, retain the existing index values and item structure where possible, and keep the text length appropriate for the selected caption layout.
Recommended edits
For the first trial, modify only the following fields:
- Replace
videos[].pathwith a video URL accessible to the rendering service; - Replace
captionItems[].textas needed; - To preview the other caption style, switch
styleIdbetween the two supported values; - After changing timing values, ensure that the video trim range and caption display range do not exceed the timeline duration.
When the JSON is ready, follow Start a synthesis task to submit it, then use the returned taskId to query task results.