scenario-video-editing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Video Editing

Scenario 视频编辑

Overview

概述

Every image post-processing effect has a video twin, and each is a
model_run
on a tool model: one clip in, a few numbers, one clip out. Generating or restyling footage, lipsync, dubbing and upscaling are
scenario-video
; concatenating, compositing and captioning a cut are
scenario-video-assembly
; the still-image side is
scenario-image-editing
. Connection and the core loop:
scenario
. If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add scenario-labs/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
每个图像后处理效果都有对应的视频版本,且每个效果都是工具模型上的一次
model_run
:输入一个视频片段,调整若干参数,输出一个视频片段。生成或重制素材风格、口型同步、配音和超分辨率属于
scenario-video
范畴;拼接、合成和为剪辑添加字幕属于
scenario-video-assembly
范畴;静态图像编辑则对应
scenario-image-editing
。连接与核心循环:
scenario
。如果你的可用技能中缺少此处提到的同类技能,请让用户安装(命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守模式,则从工具schema开始执行并标记缺失项。

The twin rule

孪生规则

A video effect's id is the image id with
-video
appended, its file field is
video
rather than
image
, and the knobs are identical:
model_scenario-postprocessing-lut-video
takes the same
lutStyle
enum and
lutIntensity
as
model_scenario-postprocessing-lut
. All eighteen have twins, from blur and color correction through oilify, posterize and vignette.
One twin differs: Dissolve (Video) blends the clip with a still
dissolveImage
, not a second clip; crossfading two clips is a concat transition.
视频效果的ID是对应图像效果ID后追加
-video
,其文件字段为
video
而非
image
,且可调参数完全一致:
model_scenario-postprocessing-lut-video
与
model_scenario-postprocessing-lut
使用相同的
lutStyle
枚举值和
lutIntensity
参数。从模糊、色彩校正到油画效果、色调分离、暗角,全部18种效果都有对应的视频版本。
有一个孪生效果是例外:Dissolve(视频版)是将片段与静态的
dissolveImage
混合,而非与另一个片段混合;两个片段的交叉淡入淡出属于拼接转场效果。

Quick reference

快速参考

NeedModel or query
Grade or stylize
filters={"tags": ["Post Processing"]}
, plus the effect name as
query
Trim to a range
model_scenario-video-cut
(
startTime
,
endTime
)
Cut into segments
model_scenario-video-split
(
cutPoints
; N points give N+1 clips)
Rescale or re-encode
model_scenario-resize-video
Play a clip backwards
model_reverse-video
Frames out, frames in
model_scenario-video-to-image-seq
,
model_scenario-image-seq-to-video
Subjects as layers
model_scenario-video-layers-extractor
Masks, cutouts
recommend
with the need in the user's own words
Pull the audio track
model_scenario-audio-extract
Extracted frames carry no index and share one
createdAt
, so their order exists only in the job row's
assetIds
, and that list has come back out of time order (a confirmed defect at authoring time). The extractor takes a scalar
video
; every frame is
extractAllFrames: true
, and
frameInterval
(default 24 at authoring time, about one frame a second on a 24 fps clip) applies only when that flag is off. Check that the row holds exactly the clip's
nbFrames
ids (
asset_get
reports it beside
frameRate
; a short row is a dropped frame, which no reordering fixes), then, before reassembling with
model_scenario-image-seq-to-video
or handing frames on, lay the returned ids into
model_scenario-grid-maker
in that order (a fixed first-party id: Scenario's single grid tool; its
images
field takes an array of 1 to 100 ids and ignores a bare id while the run still succeeds, so past 100 frames sheet in batches or raise
frameInterval
; set
columns
, default 3 and up to 20, so a batch reads as a near-square sheet) and read the sheet against the clip's free
firstFrame
and
lastFrame
and its motion; a frame that breaks continuity is out of place, and the corrected order travels as your own id list from then on. Never rebuild order from listings or timestamps, and a preview that runs backwards on a clean sheet is the assembler's
pingpong
flag, not the order.
A cutout with transparency never ships as mp4: at authoring time the removal models carried alpha only as WebM or ProRes 4444 MOV, so read the output-format enum off
model_schema_get
and agree the container with the user before pricing the run.
Effect lookups go through
search
,
target="models"
,
public=true
. The
model_scenario-
ids are constants: each is Scenario's single deterministic tool for its operation, so discovery would only re-derive it.
model_reverse-video
sits outside that set and is an authoring-time hit: re-discover it by name (
search
query="video reverse"
).
需求模型或查询
调色或风格化
filters={"tags": ["Post Processing"]}
,并将效果名称作为
query
参数
裁剪到指定时间范围
model_scenario-video-cut
(参数:
startTime
、
endTime
)
切割为多段
model_scenario-video-split
(参数:
cutPoints
;N个切割点会生成N+1个片段)
缩放或重新编码
model_scenario-resize-video
倒放片段
model_reverse-video
帧提取与帧合成
model_scenario-video-to-image-seq
、
model_scenario-image-seq-to-video
将主体作为图层
model_scenario-video-layers-extractor
蒙版、抠图使用
recommend
并以用户自己的语言描述需求
提取音轨
model_scenario-audio-extract
提取的帧没有索引,且共享同一个
createdAt
时间戳,因此它们的顺序仅存在于任务行的
assetIds
中,而该列表返回时并非按时间顺序排列(这是编写本文时已确认的缺陷)。提取器接收一个标量
video
参数;当
extractAllFrames: true
时会提取所有帧,而
frameInterval
(编写本文时默认值为24,对于24fps的片段约为每秒一帧)仅在该标志为关闭状态时生效。
请检查任务行中的ID数量是否与片段的
nbFrames
完全一致(
asset_get
会在
frameRate
旁返回该值;如果行长度不足说明有丢帧,这是重排无法解决的问题)。然后,在使用
model_scenario-image-seq-to-video
重新合成或交付帧之前,将返回的ID按顺序传入
model_scenario-grid-maker
(这是一个固定的官方ID:Scenario唯一的网格工具;其
images
字段接收1到100个ID组成的数组,若传入单个裸ID会被忽略但任务仍会成功,因此超过100帧时需要分批处理或增大
frameInterval
;设置
columns
参数,默认值为3,最大为20,这样一批帧会以接近正方形的网格形式呈现),并结合片段的
firstFrame
、
lastFrame
及其运动规律来核对网格中的帧;如果某一帧破坏了连续性,说明它的位置不对,之后就使用你自己整理好的正确ID顺序。绝对不要通过列表或时间戳重建顺序,另外,如果在正确排列的网格上预览出现倒放的情况,是合成器的
pingpong
标志导致的,而非顺序问题。
带透明度的抠图结果绝对不会以mp4格式输出:编写本文时,抠图模型仅支持WebM或ProRes 4444 MOV格式携带alpha通道,因此请通过
model_schema_get
读取输出格式枚举值,并在为任务定价前与用户确认容器格式。
效果查询通过
search
接口进行,参数为
target="models"
、
public=true
。以
model_scenario-
开头的ID都是常量:每个ID对应Scenario中执行该操作的唯一确定性工具,因此发现操作只会重新推导出相同的ID。
model_reverse-video
不在这个集合中,是编写本文时的热门工具:可通过名称重新发现它(
search
的
query="video reverse"
)。

Cost follows the clip, so trim first

成本由片段决定,因此先裁剪

On the video twins the
video
input carries
cost_impact: true
, which the image versions do not: price tracks the footage rather than the settings. Trim to the frames that ship, then grade;
dry_run=true
prices a payload before it runs. Video tools also outlast
model_run
's wait window, so launch with
wait=false
and follow with
jobs_wait
, re-calling it with the returned
pending_job_ids
. A client-side timeout on
jobs_wait
is as harmless as the server's own: re-call it with the same ids rather than treating the job as lost.
Checking costs nothing:
asset_get
returns
firstFrame
and
lastFrame
as their own asset ids, so
asset_display
one to confirm a grade before chaining another billable run onto it.
在视频孪生效果中,
video
输入带有
cost_impact: true
属性(图像版本则没有):价格由素材时长而非设置决定。先裁剪到最终需要的帧范围,再进行调色;设置
dry_run=true
可在运行前计算任务的价格。视频工具的运行时间也会超过
model_run
的等待窗口,因此请使用
wait=false
启动任务,然后调用
jobs_wait
,传入返回的
pending_job_ids
进行轮询。
jobs_wait
的客户端超时和服务端超时一样都不会造成问题:使用相同的ID重新调用即可,不要认为任务已经丢失。
检查是免费的:
asset_get
会将
firstFrame
和
lastFrame
作为独立的资产ID返回,因此可以用
asset_display
查看其中一帧来确认调色效果,然后再串联下一个付费任务。

Field names drift between neighbors

相邻工具的字段名差异

  • Video Cut and the effect twins take a scalar
    video
    . Resize Video takes
    video
    as an
    array: true
    field capped at one item, where a bare id is dropped silently; its size is
    width
    and
    height
    in pixels, both optional, and one alone keeps the aspect ratio.
  • The output format field is
    outputFormat
    on cut and split,
    videoOutputFormat
    on resize.
  • preserveAudio
    defaults to true on cut, split and resize; the effects expose no audio field and pass the track through.
  • Enum values are copied, not retyped: one
    lutStyle
    string contains a space.
  • asset_download
    takes no
    format
    for a video: it converts image formats only. A GIF from the sequence tool is an image asset and takes
    format: "gif"
    ; the
    png
    default flattens it to one frame.
  • 视频裁剪(Video Cut)和效果孪生工具接收标量
    video
    参数。视频缩放(Resize Video)的
    video
    字段是
    array: true
    类型,最多包含1个元素,若传入单个裸ID会被静默丢弃;其尺寸参数为像素单位的
    width
    和
    height
    ,两者都是可选的,仅设置一个时会保持宽高比。
  • 输出格式字段在裁剪和分割工具中是
    outputFormat
    ,在缩放工具中是
    videoOutputFormat
    。
  • preserveAudio
    在裁剪、分割和缩放工具中默认值为true;效果类工具不提供音频相关字段,会直接透传音轨。
  • 枚举值是直接复制的,而非重新定义:有一个
    lutStyle
    的字符串值包含空格。
  • asset_download
    对于视频不接受
    format
    参数:它仅支持转换图像格式。序列工具生成的GIF属于图像资产,可使用
    format: "gif"
    参数;默认的
    png
    格式会将其扁平化为单帧。

Resizing is not reframing

缩放不等于重构图

No tool model repaints a video's canvas. Resize Video takes
fit
:
contain
(default) fits the clip inside the target,
stretch
forces the size and distorts,
cover
fills the target and center-crops the rest.
cover
is the cheap way to an exact ratio when losing the edges is acceptable, but none of them gives a 16:9 clip a vertical frame with the whole picture kept, so that brief needs a decision before any spend, between two routes an order of magnitude apart in price.
  • Generative reframe (
    query="reframe"
    , Luma Ray 3.2 Reframe and Wan 2.2 Reframe,
    scenario-video
    territory) outpaints past the frame and keeps the whole picture, at by far the highest price in such a job. Resolution ceilings bite: a schema can allow a vertical ratio and its top resolution tier separately yet reject the pair at run time.
  • Compositor (Video Studio, cropping or pillarboxing onto a vertical canvas) is cheap but throws away width or adds bars, and its layer geometry is
    scenario-video-assembly
    's contract rather than a one-line setting.
dry_run
prices a payload without validating it, so either route can bill for a run that fails outright or returns a mis-composed frame at exactly the right dimensions.
没有任何工具模型会重绘视频的画布。视频缩放工具支持
fit
参数:
contain
(默认值)将片段适配到目标尺寸内,
stretch
强制拉伸到目标尺寸(会导致变形),
cover
填充目标尺寸并对超出部分进行中心裁剪。如果可以接受边缘被裁剪,
cover
是获得精确比例的低成本方式,但这三种模式都无法在保留完整画面的前提下将16:9的片段转为竖屏格式,因此这类需求在产生任何费用前需要先确定方案,两种可选方案的价格相差一个数量级。
  • 生成式重构图(
    query="reframe"
    ,包括Luma Ray 3.2 Reframe和Wan 2.2 Reframe,属于
    scenario-video
    范畴)通过外绘扩展画面边界,保留完整画面,是这类任务中价格最高的方案。分辨率上限会带来限制:schema可能单独允许竖屏比例和最高分辨率档位,但在运行时会拒绝两者的组合。
  • 合成器(Video Studio,在竖屏画布上裁剪或添加上下黑边)成本较低,但会损失画面宽度或添加黑边,其图层几何设置属于
    scenario-video-assembly
    的约定内容,而非单行参数设置。
dry_run
仅计算任务价格而不进行验证,因此无论选择哪种方案,都有可能出现任务完全失败、或者返回尺寸正确但构图错误的帧却仍被收费的情况。

Worked example: a graded cutdown

示例:带调色的精简剪辑

Launch every
model_run
below with
wait=false
and retire it with
jobs_wait
before the next step reads its asset.
  1. asset_get
    the master and read
    properties.duration
    before choosing times.
  2. Trim:
    model_scenario-video-cut
    with
    startTime
    and
    endTime
    in seconds. Going first is what makes every later step cheaper.
  3. Reshape:
    model_scenario-resize-video
    ,
    video
    as a one-item array,
    width
    and
    height
    at the delivery size,
    videoOutputFormat: "mp4"
    .
    fit
    settles the shape at this step rather than later:
    cover
    lands an exact ratio once the edges are spendable, and a shape that has to keep the whole picture is the reframe decision above.
  4. Grade:
    model_schema_get
    , then the LUT twin with
    lutIntensity
    near 0.6.
  5. Texture:
    model_schema_get
    , then the Grain twin with
    grainProfile
    (a 22-value enum, default
    kodak_portra_400
    at authoring time) on that output, last, so its grain is sized for the delivered frame rather than resampled by a later resize.
  6. asset_display
    the result's
    firstFrame
    to confirm the look, then
    asset_download
    with no
    format
    .
以下所有
model_run
都使用
wait=false
启动,并在下一步读取其资产前通过
jobs_wait
等待任务完成。
  1. 调用
    asset_get
    获取主素材信息,读取
    properties.duration
    后再选择时间范围。
  2. 裁剪:使用
    model_scenario-video-cut
    ,参数为秒级的
    startTime
    和
    endTime
    。先做裁剪能降低后续所有步骤的成本。
  3. 调整尺寸:使用
    model_scenario-resize-video
    ,
    video
    参数为单元素数组,
    width
    和
    height
    设置为交付尺寸,
    videoOutputFormat: "mp4"
    。
    fit
    参数在这一步就确定了画面形状,而非后续步骤:如果可以接受边缘被裁剪,
    cover
    可以得到精确的比例;如果必须保留完整画面,则需要采用上文提到的重构图方案。
  4. 调色:调用
    model_schema_get
    ,然后使用LUT的视频孪生版本,
    lutIntensity
    设置在0.6左右。
  5. 添加质感:调用
    model_schema_get
    ,然后在调色后的输出上使用Grain(胶片颗粒)的视频孪生版本,参数为
    grainProfile
    (一个有22个值的枚举,编写本文时默认值为
    kodak_portra_400
    )。这一步放在最后,这样颗粒的大小是适配最终交付帧的,而不会被后续的缩放重新采样。
  6. 用
    asset_display
    查看结果的
    firstFrame
    确认效果,然后使用不带
    format
    参数的
    asset_download
    下载。

Common mistakes

常见错误

  • Grading each source clip and then concatenating: grade the finished master once, or the shots drift apart.
  • Reaching for local ffmpeg, or for an MCP tool named
    video_edit
    : the surface is
    model_run
    on tool models.
  • Polling
    job_get
    in a loop instead of
    jobs_wait
    , whose timeout is not an error.
  • Trusting a Grain profile to add grain: the 22 profiles are looks, not intensities, and some soften the picture instead. Compare a frame against the input.
  • 先对每个源片段调色再拼接:应该对最终的完整素材只做一次调色,否则不同镜头的色调会不一致。
  • 试图使用本地ffmpeg,或者名为
    video_edit
    的MCP工具:实际操作入口是工具模型上的
    model_run
    。
  • 循环调用
    job_get
    轮询而非使用
    jobs_wait
    :
    jobs_wait
    的超时并不是错误。
  • 误以为Grain配置文件只是添加颗粒:这22个配置文件是不同的风格效果,而非不同的颗粒强度,有些反而会让画面变柔和。请将输出帧与输入帧对比确认。