Feature Description
Call ChanjingVideo Synthesis Open API: list public/custom avatars, upload materials, drive digital humans with text or audio, poll tasks; download the finished video with a script when the user explicitly requests it. This skill scriptdoes notdepend on ffmpeg/ffprobe (unlike the one-click video synthesis orchestration). For credentials and permission boundaries, see the same directory manifest.yaml。
Runtime Dependencies
- python3 and the same repository
scripts/*.py - No ffmpeg/ffprobe gating
Environment Variables and Machine-Readable Declarations
- Environment variable keys and descriptions:
manifest.yaml(environmentsection) and this document - variables, credential model, compliance
permissions、clientPermissions、agentPolicy:manifest.yaml
Usage Commands
- ClawHub(slug is based on the registry):
clawhub run chanjing-video-compose - This repository:
python skills/chanjing-video-compose/scripts/create_task.py …(see Standard Workflow)
Registration and Review (Single Source of Truth)
Credentials,primaryEnv omission, optional env, no ffmpeg gating (for this skill's standalone usage scenarios), etc.:based on manifest.yaml as the standard. This article starts from When to Use and describes the workflow and API.
When to Use This Skill
Use this Skill when the user wants to do these things:
- Create a digital human video synthesis task
- Drive a digital human to appear on camera with text
- Drive a digital human video with local audio
- Query public digital human or custom digital human avatars
- Poll video synthesis results
- Download the final video locally when the user explicitly requests it
If the need is closer to "uploading a real-person video for lip-sync driving", prefer chanjing-avatar, and do not mix them.
Preconditions
Before executing this Skill, you must first complete AK/SK and Token verification through chanjing-credentials-guard .
This Skill shares with guard:
~/.chanjing/credentials.jsonhttps://open-api.chanjing.cc
When there are no credentials, the script will automatically open the Chanjing login page and prompt for the configuration command.
Review and Security (Credentials and Boundaries)
Item-by-item descriptions related to Purpose / Credentials / Persistence are in manifest.yaml. The following are only supplements to the SKILL body:
create_task.py --callback: If a URL is passed in, Chanjing may push task results to that endpoint; you must evaluate trust and reachability yourself.
Standard Workflow
- First have the user explicitly choose the digital human source:
common(public digital human) orcustomised(custom digital human) - Call
list_figures.py --source <common|customised>(recommended--json, public sources can increase--page-sizeor paginate) to get available avatars;compare within the candidatesname, eachfigure'stypeand resolution,audio_man_id、audio_name(if any) and task persona before selectingperson.id。Forbiddento default to the first few items in the list without comparison. - If a public digital human is selected, also confirm
figure_type(consistent with the selectedfigures[].type), for examplesit_body/whole_body/circle_view. When there are no special user requirements,default to prioritizing young, energetic avatars(names/audio_nameleaning toward youth, student, vitality, etc.); switch only when the subject matter requires a mature or middle-aged/elderly temperament. - If using text-driven mode, determine
audio_man_id - Before creating the task, you must explicitly ask the user about subtitle preference:
show(keep subtitles) orhide(hide subtitles) - If the user chooses
showHowever, if no custom style or position requirements are proposed, directly use the default values recommended by the official documentation; only continue to ask follow-up questions when the user explicitly wants to adjust the subtitle position or stylesubtitle_configparameters - If the user wants to customize the subtitle position, explain that the coordinates use the top-left corner as the origin, then supplement with
subtitle_configrelated parameters - If using local audio or a background image, first call
upload_file.pyto obtainfile_id - Call
create_task.pyto create a video composition task and obtainvideo_id - Call
poll_task.pyto poll until successful and obtainvideo_url - Only when the user explicitly requests saving locally, call
download_result.py
Covered APIs
This Skill currently covers:
GET /open/v1/list_common_dpPOST /open/v1/list_customised_personPOST /open/v1/create_videoGET /open/v1/videoGET /open/v1/common/create_upload_urlGET /open/v1/common/file_detail
Scripts
Script directory:
skills/chanjing-video-compose/scripts/
| Script | Description |
|---|---|
_auth.py |
Read credentials, obtain or refresh access_token |
list_figures.py |
Use `--source common |
upload_file.py |
Upload audio or background materials, poll until the file is available, then output file_id |
create_task.py |
Create a video composition task; when using a public digital human, you may supplement with --figure-type ..., subtitles support `--subtitle show |
poll_task.py |
Poll video details until complete, by default output video_url |
download_result.py |
Download the final video to outputs/video-compose/ |
Usage Examples
Example 1: Public digital human text-driven
# 1. 先列公共数字人
python skills/chanjing-video-compose/scripts/list_figures.py --source common
# 2. 用公共数字人创建文本驱动视频
VIDEO_ID=$(python skills/chanjing-video-compose/scripts/create_task.py \
--person-id "C-ef91f3a6db3144ffb5d6c581ff13c7ec" \
--figure-type "sit_body" \
--audio-man "C-0ae461135d8a4eb2b59c853162ea9848" \
--subtitle "show" \
--subtitle-x 31 \
--subtitle-y 1521 \
--subtitle-width 1000 \
--subtitle-height 200 \
--subtitle-font-size 64 \
--subtitle-stroke-width 7 \
--text "你好,这是一个蝉镜视频合成测试。")
# 3. 轮询到完成,拿到 video_url
python skills/chanjing-video-compose/scripts/poll_task.py --id "$VIDEO_ID"
Example 2: Custom digital human driven by uploading local audio
python skills/chanjing-video-compose/scripts/list_figures.py --source customised
AUDIO_FILE_ID=$(python skills/chanjing-video-compose/scripts/upload_file.py \
--service make_video_audio \
--file ./input.wav)
VIDEO_ID=$(python skills/chanjing-video-compose/scripts/create_task.py \
--person-id "C-ef91f3a6db3144ffb5d6c581ff13c7ec" \
--subtitle "hide" \
--audio-file-id "$AUDIO_FILE_ID")
python skills/chanjing-video-compose/scripts/poll_task.py --id "$VIDEO_ID"
Example 3: Explicitly download the final video
python skills/chanjing-video-compose/scripts/download_result.py \
--url "https://example.com/output.mp4"
Download Rule
Downloading is an explicit action, not a default action:
poll_task.pyAfter success, first returnvideo_url- Do not automatically download the result file
- Only when the user explicitly says "download locally", "save to outputs", or "save it to disk for me" should you execute
download_result.py
Figure Selection Rule
Follow this rule when choosing a digital human:
- If the user wants to use an existing character library on the platform, first use a public digital human:
list_figures.py --source common - If the user wants to use a character they trained or generated from an upload, first use a custom digital human:
list_figures.py --source customised - When creating a video with a public digital human, you may pass according to the selected form
--figure-type <type> - When using a custom digital human, you do not need
figure_type
Subtitle Rule
Follow this rule for subtitles:
- Do not assume by default that the user wants subtitles or does not want subtitles
- Before creating the task, you must explicitly ask the user to choose:
showorhide - If by
chanjing-one-click-video-creationtherun_render.pycallcreate_task.py, use the currentworkflow.jsonroot-levelsubtitle_requiredas the standard (default false →--subtitle hide;true →showand recommended style),no needto separately ask again about the subtitle switch for this one-click video path, unless the user explicitly requests changing the subtitle strategy in the requirements - When the user chooses to keep subtitles, call
create_task.py --subtitle show - If the user does not specify the subtitle position or style, directly use the official recommended default values;
create_task.pywhen--subtitle-coloris not passed, defaults to white textcolor=#FFFFFF: 1080p isx=31 y=1521 width=1000 height=200 font_size=64 stroke_width=7 asr_type=0; 4K canvas isx=80 y=2840 width=2000 height=1000 font_size=150 stroke_width=7 asr_type=0(both groups includecolor=#FFFFFF) - When the user chooses to hide subtitles, call
create_task.py --subtitle hideor the backward-compatible usage--hide-subtitle - If the user requests adjusting the subtitle position or style, you may continue to pass
--subtitle-x/--subtitle-y/--subtitle-width/--subtitle-height/--subtitle-font-size/--subtitle-color/--subtitle-stroke-color/--subtitle-stroke-width/--subtitle-font-id/--subtitle-asr-type - Coordinates are based on the top-left origin; the subtitle area cannot exceed
screen_width/screen_height - If the user only says "want subtitles" but does not specify a position, there is no need to ask again for specific values; unless the user explicitly wants to adjust the position, directly use the default values
Output Convention
Default local output directory:
outputs/video-compose/
Additional Resources
For more interface details, see:
skills/chanjing-video-compose/reference.mdskills/chanjing-video-compose/examples.md