Skip to content

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 #01 and DAILY LIFE.

Field reference

All time fields use microseconds. One second equals 1,000,000 microseconds.

Field pathTypeDescriptionExample or constraint
timeline.resWidthintegerOutput video resolution width, in pixels.960
timeline.resHeightintegerOutput video resolution height, in pixels.540
timeline.durationintegerDuration of the entire timeline, in microseconds.10000000 (10 seconds)
timeline.videoTracksarrayList of video tracks.1 video track in this example
timeline.videoTracks[].videosarrayList of video clips in the current video track.1 video clip in this example
timeline.videoTracks[].videos[].pathstringVideo 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[].trimInintegerTrim-in time in the source video, in microseconds.0
timeline.videoTracks[].videos[].trimOutintegerTrim-out time in the source video, in microseconds.10000000 (10 seconds)
timeline.captionTracksarrayList of caption tracks.1 caption track in this example
timeline.captionTracks[].compoundCaptionsarrayList of compound captions in the current caption track.1 compound caption in this example
timeline.captionTracks[].compoundCaptions[].inPointintegerCompound-caption in-point on the timeline, in microseconds.0
timeline.captionTracks[].compoundCaptions[].durationintegerHow long the compound caption remains visible, in microseconds.5000000 (5 seconds)
timeline.captionTracks[].compoundCaptions[].styleIdstringCompound-caption package ID. Only the two IDs listed below are currently supported.Select one of two values
timeline.captionTracks[].compoundCaptions[].captionItemsarrayList of text items in the compound caption.2 text items in this example
timeline.captionTracks[].compoundCaptions[].captionItems[].indexintegerText-item index; keep it unique and ordered within the compound caption.0, 1
timeline.captionTracks[].compoundCaptions[].captionItems[].textstringCaption 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-982975DBB4C4
  • D037A06A-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.

For the first trial, modify only the following fields:

  1. Replace videos[].path with a video URL accessible to the rendering service;
  2. Replace captionItems[].text as needed;
  3. To preview the other caption style, switch styleId between the two supported values;
  4. 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.