scenario-video-assembly
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScenario Video Assembly
Scenario 视频组装
Overview
概述
Scenario has no editing tools on the MCP surface. Every compositor, concatenator, trimmer and captioner is a deterministic model run through . The compositor, concatenator and trimmer ids are fixed and named below; Scenario ships two captioners, so that one is discovered with . Connection and the core loop: see the skill; the clips themselves: see . If a sibling skill named here is missing from your available skills, ask the user to install it (); unattended, proceed from tool schemas and flag the gap.
model_runrecommendscenarioscenario-videonpx skills add scenario-labs/skills --skill <name>Scenario在MCP表层没有编辑工具。所有合成器、拼接器、修剪器和字幕生成器都是通过运行的确定性模型。合成器、拼接器和修剪器的ID是固定的,如下所列;Scenario自带两个字幕生成器,因此需要通过来发现可用的那一个。连接方式与核心循环请参考 skill;片段本身的相关内容请参考。如果你的可用技能中缺少此处提到的兄弟技能,请让用户安装它(命令:);在无人值守的情况下,请根据工具schema继续操作并标记缺失的技能。
model_runrecommendscenarioscenario-videonpx skills add scenario-labs/skills --skill <name>Quick reference: pick the backend first
快速参考:先选择后端模型
| Need | Model |
|---|---|
| Clips end to end, optional transitions | |
| Anything overlapping: overlay, bed, titles | |
| Still layout (thumbnails, sheets, key art) | |
These ids are constants: each is Scenario's single deterministic tool for its operation, so discovery would only re-derive it.
Concat is sequential: takes 2 to 50 files (never 1), (default true) carries each clip's own track into the cut, and the optional array's "length must be number of videos - 1". Each entry is an object , never a bare string: is one of 18 names read off the schema (, the default, is the plain crossfade; is a different effect; a hard cut) and runs 0.1 to 5 seconds, default 0.5. Omit the array for hard cuts throughout, the right call whenever the brief does not ask one shot to flow into the next.
videospreserveAudiotransitions{type, duration}typefadedissolvenonedurationpreserveAudioasset_getproperties.durationdurationstartTimeVideo Studio is an absolute timeline: holds 1 to 50 image, video or audio sources placed by and stacked by (higher in front), with per-layer / rather than a between-clip array, so a cross-fade between two clips belongs in concat. At least one layer must be a video, so a music bed over a still is rejected.
layersstartTimezIndexfadeInfadeOut| 需求 | 模型 |
|---|---|
| 片段首尾拼接,可选转场效果 | |
| 任何重叠内容:叠加、背景音、标题 | |
| 静态布局(缩略图、图集、主视觉) | |
这些ID是常量:每个ID对应Scenario用于该操作的唯一确定性工具,因此执行发现操作也只会得到相同的结果。
拼接(Concat)是顺序执行的:参数接受2到50个文件(不能是1个),(默认值为true)会将每个片段的音轨保留到剪辑中,可选的数组的“长度必须等于视频数量减1”。每个数组项都是一个对象,不能是纯字符串:是schema中列出的18种名称之一(默认值是普通的交叉淡入淡出;是另一种效果;是硬切),的范围是0.1到5秒,默认0.5秒。如果全程使用硬切,请省略该数组——当需求没有要求镜头之间流畅过渡时,这是正确的选择。
videospreserveAudiotransitions{type, duration}typefadedissolvenonedurationpreserveAudioasset_getproperties.durationdurationstartTimeVideo Studio采用绝对时间线:包含1到50个图像、视频或音频源,通过定位,通过堆叠(数值越高越靠前),支持逐层设置/,而非片段间的转场数组,因此两个片段之间的交叉淡入淡出应使用拼接工具实现。至少必须有一个图层是视频,因此不支持在静态图片上添加背景音乐。
layersstartTimezIndexfadeInfadeOutThe Video Studio contract
Video Studio 使用约定
Per layer, three timing ideas have confusable names:
- and
startTimeplace the layer on the timeline.endTime - and
trimStartare amounts shaved off the head and tail of the source, not in and out points: to play the first 20 seconds of a 90-second track, settrimEnd.trimEnd: 70 - overrides the layer's length. The top-level
durationis a different field, setting the whole composition, and applies only whendurationisdurationMode."custom"
Everything is in seconds at , so do not promise frame-accurate cuts. and are strings taking pixels, percentages or words, and says which point of the layer they address: , , , , , , , , (the middle one is bare ), defaulting to . A bottom-right logo is , , , flush to the edge unless you inset it with a percentage.
step: 0.1xyanchortop-lefttop-centertop-rightcenter-leftcentercenter-rightbottom-leftbottom-centerbottom-rightcenter"top-left"x: "right"y: "bottom"anchor: "bottom-right"canvasModedurationMode"auto"canvasMode: "custom"canvasWidthcanvasHeightwidthheightwidthheightdurationMode: "custom"durationfitwidthheightxywidth: "1920"height: "1080""0""cover""contain""fill"widthheightvideoOutputFormatimageOutputFormatoutputFormatA layer's (image, video, audio, or mask) is optional and otherwise inferred from . There is no text layer, so titles, lower thirds and end cards arrive as rendered PNGs composited as image layers; renders them letter-perfect.
typesourcescenario-text-overlay每个图层有三个容易混淆的时间相关概念:
- 和
startTime用于在时间线上定位图层。endTime - 和
trimStart是从源文件开头和结尾裁剪掉的时长,而非入点和出点:例如要播放一段90秒音轨的前20秒,需设置trimEnd。trimEnd: 70 - 会覆盖图层的时长。顶层的
duration是另一个字段,用于设置整个合成作品的时长,仅当duration为durationMode时生效。"custom"
所有时间单位均为秒,精度为,因此不要承诺帧精确的剪辑。和是字符串类型,支持像素、百分比或关键词值,指定坐标对应图层的哪个锚点:、、、、、、、、(正中间是),默认值为。要放置右下角的Logo,可设置、、,这样会紧贴边缘,除非用百分比值设置内边距。
step: 0.1xyanchortop-lefttop-centertop-rightcenter-leftcentercenter-rightbottom-leftbottom-centerbottom-rightcenter"top-left"x: "right"y: "bottom"anchor: "bottom-right"canvasModedurationMode"auto"canvasMode: "custom"canvasWidthcanvasHeightwidthheightwidthheightdurationMode: "custom"durationfitwidthheightxywidth: "1920"height: "1080""0""cover""contain""fill"widthheightvideoOutputFormatimageOutputFormatoutputFormat图层的(image、video、audio或mask)是可选的,未设置时会从推断。没有文本图层,因此标题、下方三分之一字幕条和片尾卡需要先渲染为PNG文件,再作为图像图层合成;可以完美渲染这些文字内容。
typesourcescenario-text-overlayWorked example: three clips, a music bed, and captions
实操示例:三个片段、背景音乐加字幕
- For every source, and read
asset_get: the realproperties(audio carries it too),durationon video, andframeRate/widthon video and images alike. A model asked for eight seconds does not always return exactly eight.height - Add them up to get each clip's , then
startTimeonmodel_schema_get.model_scenario-compose-video - it with
model_runholding the three clips at their computedlayerss (startTime), a logo PNG pinned byzIndex: 0/x/yatanchor, and the music as an audio layer trimmed to the clips' total withzIndex: 1, since autotrimEndcomputes from every layer, the bed included.durationMode(0 to 2) andvolumeare per-layer and apply to video layers too, so balance the bed from either side. SetmutewithcanvasMode: "custom"andcanvasWidth;canvasHeightdefaults to 30 and takes whole numbers from 1 to 120, so set it to the clips' measuredfpswhen they agree (rounded), which is what step 1 read it for.frameRate - , then caption the finished cut rather than each clip:
jobs_wait(an authoring-time pick, since Scenario ships two captioners: re-discover withmodel_scenario-caption-studio) takes it asrecommendand transcribes whatever audio the master actually carries, so lower the bed'svideorather than muting the dialogue. It burns captions in by default, takes an existingvolumeas.srt, a file input needingsubtitlesfirst, returns a sidecar whenupload_assetis true, and positions them withoutputSrt(textPosition,topormiddle, defaultbottom, so move it off a bottom-edge overlay).bottom - to review, then
asset_displaywithasset_downloadleft unset (it is an image conversion target) for the file.format
Trim, split and resize have their own tool models. Note 's / are source in and out points, not timeline placement.
model_scenario-video-cutstartTimeendTime- 对每个源文件,调用并读取
asset_get:真实的properties(音频也有该字段)、视频的duration,以及视频和图片的frameRate/width。模型生成的8秒内容不一定刚好是8秒。height - 将时长相加得到每个片段的,然后调用
startTime获取model_schema_get的schema。model_scenario-compose-video - 调用运行该模型,
model_run中包含:三个片段按计算出的layers放置(startTime),一个Logo PNG通过zIndex: 0/x/y固定在anchor的位置,音乐作为音频图层通过zIndex: 1裁剪到与片段总时长一致——因为自动trimEnd会根据所有图层(包括背景音)计算时长。durationMode(0到2)和volume是逐层设置的,也适用于视频图层,因此可以从任意一侧调整背景音的平衡。设置mute并指定canvasMode: "custom"和canvasWidth;canvasHeight默认值为30,支持1到120的整数,因此当所有片段的fps一致时(取整后),将其设置为该值,这也是步骤1读取帧率的目的。frameRate - 调用等待任务完成,然后给成品剪辑添加字幕(而非逐个片段添加):
jobs_wait(这是编写本文时的选择,因为Scenario自带两个字幕生成器,可通过model_scenario-caption-studio重新发现可用版本)将视频作为recommend参数传入,会转录母版实际携带的所有音频,因此只需降低背景音的video,而不要静音对话。该模型默认烧录字幕,支持传入现有volume文件作为.srt(文件输入需要先调用subtitles上传),当upload_asset为true时会返回侧载字幕文件,并通过outputSrt设置字幕位置(textPosition、top或middle,默认bottom,因此如果底部有叠加层,需要调整字幕位置)。bottom - 调用进行审核,然后调用
asset_display下载文件,无需设置asset_download参数(该参数用于图片格式转换)。format
修剪、分割和调整大小有各自的工具模型。注意的/是源文件的入点和出点,而非时间线上的位置。
model_scenario-video-cutstartTimeendTimeCommon mistakes
常见错误
- Reaching for an MCP tool like , or for local ffmpeg to do the edit itself. The editing surface is
video_composeon tool models; probing a download is fine.model_run - Handing concat one clip, or one transition per clip: the minimum is 2 videos, and transitions run one fewer.
- Trusting here as validation: it returns a cost estimate only, and assembly payloads are the most structurally complex in the catalog.
dry_run - Captioning a concatenated master before checking its sync: the captioner times its lines to the audio it hears, so drifted audio ships drifted captions on top of it.
- 试图使用之类的MCP工具,或者用本地ffmpeg进行编辑。编辑操作的入口是对工具模型调用
video_compose;对下载文件进行检测是可以的。model_run - 给拼接工具传入1个片段,或者转场数量和片段数量相同:最少需要2个视频,转场数量比视频数量少1。
- 信任的验证结果:它仅返回成本估算,而组装请求的payload是所有工具中结构最复杂的。
dry_run - 在检查拼接母版的音画同步之前就添加字幕:字幕生成器会根据听到的音频来计时字幕行,因此漂移的音频会导致字幕也跟着错位。