layer-video-looks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Layer Video Looks

Layer 视频视觉风格

Overview

概览

A look is the finish that makes separate shots read as one piece. On Layer it lives in the timeline: every video and image item in
render_video_timeline
takes an
effects
list plus its own
blur
,
brightness
,
saturation
,
hue
and
opacity
fields. No model runs to apply them, so a look is exact to repeat; the render is still priced by
estimate_video_timeline_price
.
Assembly itself (sequence, transitions, overlays, audio) is
layer-video-timeline
. This skill covers the finish on top of it. A look the timeline cannot make, such as relighting a shot or restyling its content, is a generation: see
layer-video-fixes
.
If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add layerai/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
视觉风格是让不同镜头看起来像同一部作品的最终处理效果。在 Layer 中,它通过时间线实现:
render_video_timeline
中的每个视频和图像项目都接受一个
effects
列表,并且各自带有
blur
、
brightness
、
saturation
、
hue
和
opacity
字段。应用这些效果时不会运行模型,因此视觉风格可以精确复现; 渲染价格仍由
estimate_video_timeline_price
估算。
时间线本身的组装(序列、过渡、叠加、音频)属于
layer-video-timeline
。本 skill 涵盖叠加在其上的最终处理效果。 如果视觉风格无法由时间线实现,例如重新布光或重塑镜头内容风格,则属于生成任务:参见
layer-video-fixes
。
如果这里提到的某个同级 skill 未安装在你可用的 skills 中,请要求用户安装 (
npx skills add layerai/skills --skill <name>
);无人值守模式下,则根据 tool schemas 继续操作,并标记该 缺失项。

Quick reference

快速参考

LookEffects, in this order
Brand wash
duotone
with
darkColor
and
lightColor
in brand colours, or
tint
with
amount
Retro CRT
scanlines
, then
noise
, then a light
chromaticAberration
Film
noise
(grain),
vignette
,
lightLeak
Glitch hit on a cut
tvSignalOff
or a strong
chromaticAberration
on a short item at the cut
Green or blue screen
colorKey
first, with
keyColor
set to the screen
Cut-out logo or character
dropShadow
or
outline
on an image that has transparency
Dreamy highlights
glow
with a
threshold
so only the bright parts bloom
Plain gradeItem fields:
brightness
,
saturation
,
hue
;
contrast
,
exposure
,
vibrance
effects
Every effect is
{type: "<name>", ...params}
with camelCase params, and every param has a default, so
{type: "vignette"}
alone is valid. Colours are
{red, green, blue, alpha}
objects, 0 to 255.
blur
,
brightness
,
saturation
,
hue
and
opacity
are item fields, not effects:
brightness
and
saturation
are multipliers from 0 to 2 (1 unchanged),
hue
rotates -180 to 180 degrees.
render_video_timeline
takes
{workspace_id, template, videos, images, audios}
.
template
is
{width, height, fps, tracks: [{id, name, items, transitions}]}
; an item is
{id, type, start_frame, duration_in_frames}
plus
file_id
or
slot
, and optionally
layout {left, top, width, height}
,
effects
,
start_from_in_seconds
to trim a clip's head, and
volume
; a
solid
takes
color
{red, green, blue, alpha}
. The render returns a
generation_id
for
get_generation_run
.
视觉风格效果(按此顺序)
品牌色罩染
duotone
,其中
darkColor
和
lightColor
使用品牌色;或使用带
amount
的
tint
复古 CRT
scanlines
,然后
noise
,然后轻微的
chromaticAberration
胶片
noise
(颗粒)、
vignette
、
lightLeak
剪切点上的故障冲击
tvSignalOff
,或在剪切处的短项目上使用较强的
chromaticAberration
绿幕或蓝幕先使用
colorKey
,并将
keyColor
设置为屏幕颜色
抠像 logo 或角色对带透明度的图像使用
dropShadow
或
outline
梦幻高光使用带
threshold
的
glow
,让只有明亮部分产生泛光
基础调色项目字段:
brightness
、
saturation
、
hue
;以及
contrast
、
exposure
、
vibrance
effects
每个 effect 都是
{type: "<name>", ...params}
,params 使用 camelCase,并且每个参数都有默认值, 因此仅写
{type: "vignette"}
就是有效用法。颜色是
{red, green, blue, alpha}
对象,取值范围为 0 到 255。
blur
、
brightness
、
saturation
、
hue
和
opacity
是项目字段,而不是 effects:
brightness
和
saturation
是 0 到 2 的乘数(1 表示不变),
hue
以 -180 到 180 度进行旋转。
render_video_timeline
接收
{workspace_id, template, videos, images, audios}
。
template
是
{width, height, fps, tracks: [{id, name, items, transitions}]}
;item 是
{id, type, start_frame, duration_in_frames}
,再加上
file_id
或
slot
,还可选择包含
layout {left, top, width, height}
、
effects
、用于裁剪片段开头的
start_from_in_seconds
以及
volume
;
solid
接受
color
{red, green, blue, alpha}
。渲染会返回
generation_id
,供
get_generation_run
使用。

Order is the look

顺序决定视觉风格

Effects apply in list order, each on the result of the one before. Order changes the picture:
  • Key first.
    colorKey
    must see the screen's true colour. A
    tint
    or
    exposure
    ahead of it shifts the green and the key leaves patches behind.
  • Grade before texture. Put
    tint
    ,
    duotone
    and
    contrast
    ahead of
    noise
    and
    scanlines
    , so the grain sits on top of the colour instead of being recoloured by it.
  • Distortion last.
    wave
    ,
    fisheye
    and
    zoomBlur
    bend whatever reaches them; place them after the texture so the scanlines bend with the picture.
effects 按列表顺序应用,每一项都作用于前一项的结果。顺序会改变画面:
  • 先抠像。
    colorKey
    必须看到屏幕的真实颜色。在它之前应用
    tint
    或
    exposure
    会改变绿色,导致抠像后残留色块。
  • 先调色,后加纹理。 将
    tint
    、
    duotone
    和
    contrast
    放在
    noise
    和
    scanlines
    之前,让颗粒叠在色彩之上,而不是被色彩重新着色。
  • 失真最后。
    wave
    、
    fisheye
    和
    zoomBlur
    会扭曲到达它们的画面;将它们放在纹理之后,让扫描线随画面一起弯曲。

One list, every clip

一份列表应用到所有片段

A look holds only if every clip that shares it carries the same
effects
list with the same params. Build the list once and copy it onto each item. A second clip with a slightly different
tint
amount
reads as a mismatch, which is worse than no look at all.
Grade toward the shots, not away from them. Shots generated at different times differ in exposure and saturation; level them first with the item's
brightness
and
saturation
fields, then apply the shared list.
只有共享同一视觉风格的每个片段都带有完全相同的
effects
列表和相同参数时,风格才能保持一致。 先构建一次列表,然后将其复制到每个项目上。第二个片段的
tint
amount
只要稍有不同,就会显得不匹配, 甚至比完全不使用视觉风格更糟。
调色应贴近镜头,而不是背离镜头。不同时间生成的镜头在曝光和饱和度上会有差异;先用项目的
brightness
和
saturation
字段将它们拉平,再应用共享列表。

Params are fixed for the whole item

参数在整个项目内保持不变

The timeline has no keyframes. An effect's params hold for the item's whole span: a
shine
with
progress: 0.5
is a sheen parked in the middle, not one that sweeps across, and
lightLeak
progress
is one phase of the leak, held.
Two ways to get movement:
  • Stepped items. Split the span into several short items of the same file on one track, each with
    start_from_in_seconds
    continuing where the last stopped, and raise
    progress
    on each. Four to six steps read as motion on a short sheen.
  • Generate it. A sweep that must be smooth is a video generation with the motion in the prompt (
    layer-video
    ), not a timeline effect.
The same split confines an effect to a moment: cut the clip into before, hit and after items on one track, and give only the few-frame hit item
tvSignalOff
. Do not stack the pieces on separate tracks; items on one track must not overlap in time.
时间线不支持关键帧。effect 的参数会在项目整个时长内保持不变:
shine
的
progress: 0.5
表示光泽停在中间, 而不是扫过画面;
lightLeak
的
progress
也表示漏光停留在某个阶段。
获得运动的两种方式:
  • 拆分项目。 将时长拆成同一文件在一条轨道上的若干短项目,每个项目的
    start_from_in_seconds
    从上一段结束处继续,并逐步提高
    progress
    。对于短光泽效果,四到六个步骤就能呈现出运动感。
  • 直接生成。 必须平滑扫过的效果属于视频生成,应在提示词中描述运动(
    layer-video
    ),而不是使用时间线 effect。
同样的拆分方式也可将 effect 限制在某个时刻:在一条轨道上将片段拆成前段、冲击段和后段,并且只给几帧长的冲击段应用
tvSignalOff
。不要把这些片段堆叠到不同轨道上;同一轨道上的项目在时间上不得重叠。

Keying a screen

对屏幕进行抠像

colorKey
defaults to green (
{red: 0, green: 255, blue: 0}
); set
keyColor
to
{red: 0, green: 0, blue: 255}
for a blue screen. Tune in the order the schema gives: raise
similarity
when patches of the screen remain, lower it when the subject's edges get eaten, and raise
spillSuppression
when a coloured fringe stays on the subject.
smoothness
softens the keyed edge.
Tracks composite in reverse order, so Track 1 is on top. The keyed clip goes on a track above the background it should reveal.
colorKey
默认使用绿色(
{red: 0, green: 255, blue: 0}
);要处理蓝色屏幕,请将
keyColor
设为
{red: 0, green: 0, blue: 255}
。按照 schema 给出的顺序调节:当仍有屏幕色块残留时,提高
similarity
;当主体边缘被误抠时,降低它;当主体上仍有彩色边缘时,提高
spillSuppression
。
smoothness
可柔化抠像边缘。
轨道按反向顺序合成,因此 Track 1 位于最上层。抠像片段应放在其应显露背景的轨道之上。

Filling around a contained clip

填充包含式片段周围的区域

A 16:9 clip in a 9:16 frame leaves bars. The schema's own fix: put a second copy of the clip on a lower track with a full-frame
layout
,
is_auto_layout: false
,
content_fit: "cover"
, a high
blur
,
volume: 0
, and its
brightness
lowered, then show the clip above it with
content_fit: "contain"
. The frame fills with the clip's own colours instead of black.
在 9:16 画框中使用 16:9 片段会留下黑边。schema 本身提供的修复方法是:在较低轨道上放置该片段的第二份副本,设置全画框
layout
、
is_auto_layout: false
、
content_fit: "cover"
、较高的
blur
、
volume: 0
,并降低其
brightness
;然后在上层显示原片段并设置
content_fit: "contain"
。这样画框会由片段自身的颜色填满,而不是黑色。

Worked example

实例

"Give these four approved gameplay shots a retro arcade look, and put our presenter, shot on green screen, over the last one."
  1. All five clips came from earlier runs, so each has a
    file_id
    ; nothing is uploaded.
  2. Build one list for the gameplay clips:
    [{type: "contrast", amount: 1.15}, {type: "scanlines", amount: 0.2, spacing: 4}, {type: "noise", amount: 0.12}, {type: "chromaticAberration", amount: 3}]
    . Copy it unchanged onto all four gameplay items on Track 2.
  3. The presenter goes on Track 1, spanning the last shot, with
    [{type: "colorKey"}, {type: "scanlines", amount: 0.2, spacing: 4}, {type: "noise", amount: 0.12}]
    : key first, then the same texture so the presenter sits in the same world.
  4. A three-frame
    tvSignalOff
    item at the cut into the last shot, split from the clip as above.
  5. estimate_video_timeline_price
    with the full input. Present the table; above 20 CUs wait for an explicit yes.
  6. render_video_timeline
    with the same input. Poll
    get_generation_run
    with the returned
    generation_id
    at the interval it gives, never a fixed sleep.
  7. Watch it end to end. If green patches remain on the presenter, raise
    similarity
    a step and re-render; if the hair edge is eaten, lower it.
“为这四段已获批准的游戏画面赋予复古街机风格,并将我们在绿幕上拍摄的主持人叠加到最后一段画面上。”
  1. 五个片段都来自之前的运行,因此每个都有
    file_id
    ;无需上传。
  2. 为游戏画面构建一份 list:
    [{type: "contrast", amount: 1.15}, {type: "scanlines", amount: 0.2, spacing: 4}, {type: "noise", amount: 0.12}, {type: "chromaticAberration", amount: 3}]
    。将其原样复制到 Track 2 上的所有四个游戏画面项目中。
  3. 主持人放在 Track 1 上,时长覆盖最后一个镜头,并应用
    [{type: "colorKey"}, {type: "scanlines", amount: 0.2, spacing: 4}, {type: "noise", amount: 0.12}]
    : 先抠像,再添加相同纹理,让主持人融入相同的视觉环境。
  4. 在切入最后一个镜头的剪切点放置一个三帧的
    tvSignalOff
    项目,并按照上述方式从片段中拆分。
  5. 使用完整输入调用
    estimate_video_timeline_price
    。呈现表格;如果价格超过 20 CU,等待用户明确同意。
  6. 使用相同输入调用
    render_video_timeline
    。按照返回的间隔,使用返回的
    generation_id
    轮询
    get_generation_run
    ,切勿使用固定休眠时间。
  7. 从头到尾观看成片。如果主持人身上残留绿色斑块,将
    similarity
    提高一级并重新渲染;如果头发边缘被误抠,则降低该值。

Common mistakes

常见错误

  • A different effect list, or different params, on clips meant to share a look.
  • A
    tint
    or
    exposure
    ahead of
    colorKey
    , so the screen no longer matches the key colour.
  • Expecting
    shine
    or
    lightLeak
    to move across a clip; params are fixed per item.
  • Putting the keyed clip on a lower track than its background.
  • dropShadow
    or
    outline
    on a clip with no transparency; the schema says they work best on cut-outs.
  • Glitching a whole clip when the hit belongs on a few frames at the cut.
  • Reaching for a generation to recolour footage the timeline can already grade.
  • Uploading clips that Layer generated and that already carry a
    file_id
    .
  • 为本应共享同一视觉风格的片段使用不同的 effects 列表或不同参数。
  • 在
    colorKey
    之前应用
    tint
    或
    exposure
    ,导致屏幕颜色不再匹配抠像颜色。
  • 期望
    shine
    或
    lightLeak
    扫过片段;参数在整个项目内保持固定。
  • 将抠像片段放在背景轨道下方。
  • 对不带透明度的片段使用
    dropShadow
    或
    outline
    ;schema 指出这些效果最适合抠像素材。
  • 故障冲击只应出现在剪切处几帧内,却对整个片段应用 glitch。
  • 时间线已经可以完成片段的重新着色,却仍使用生成任务。
  • 上传 Layer 已经生成且带有
    file_id
    的片段。