resolve-scripting
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "resolve-scripting":https://skillpi.com/zh/skills/deepskill-3458bf6e5158fc19cc034e35268fde6908c60c897cae0a20c4f405e24b45572d。安装前核对上游来源和版本:https://github.com/appariciojunior/video-editor-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
针对 DaVinci Resolve Studio 的实用脚本编写知识:通过代码构建剪辑,包括基于模板生成时间线、逐帧精确追加操作、缩放、调色、自定义帧尺寸、字幕与渲染,以及指出在 Resolve 21 中可能导致静默失败或崩溃的陷阱。编写或调试任何与 Resolve 交互的脚本时可参考。
介绍来源: third_party · appariciojunior · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: resolve-scripting
description: Practical DaVinci Resolve Studio scripting knowledge for building edits from code - timelines from a template, frame-exact appends, zoom, grades, custom frame sizes, subtitles, renders, and the traps that silently fail or crash Resolve 21. Use when writing or debugging any script that talks to Resolve.Resolve scripting: what actually works (Resolve Studio 21)
Check the API for the installed version before trusting memory: the scripting docs ship with Resolve, and functions move (some changed between 20 and 21).
Golden rules
- Only add. New timelines (never overwrite: "name v2"), imports into bins, clips on free tracks. Never touch the creator's template or their timelines/media. Never switch/create/close projects.
- Verify every write by reading it back. Many setters return True and do nothing.
- Save the project at the end of each step.
Building the timeline
- Find bins by name recursively. Import files once (reuse the media pool item if the same path is already imported).
- Copy the template with
DuplicateTimeline(name), move it into the timelines bin, then empty every track (unlock locked tracks temporarily). The copy keeps the track FX chain (voice treatment on A1, music treatment on A2) - that's why we copy instead of creating. - Frame rate mismatch footage vs template: stop and ask. If they choose the footage rate:
useCustomSettings=1,timelineFrameRate,timelinePlaybackFrameRate. - Custom frame (e.g. 4:3 2880x2160): set
timelineResolutionWidth/Heightand the output resolution, then input mismatch behaviourscaleToCrop("scale full frame with crop"). The defaultscaleToFitletterboxes. Read it back. AppendToTimeline:endFrameis exclusive. For audio-only media, start/end frames count in the clip's own frame rate (a WAV reports 23.976), not the timeline's.- Audio duration from timecode: at 23.976, a timecode counts 24 frames per second.
seconds = ((h*3600+m*60+s)*round(fps) + f) / fps. Using 23.976 per second lost 16 frames on an 11-minute music bed. - Check after laying: piece count on V1 and A1, each duration, no gaps.
Picture
- Zoom:
item.SetProperty("ZoomX", z)and"ZoomY"(centre anchored). Works in 21. - Grades:
Timeline.ApplyGradeFromDRXfails in 21. Use each item's graph:item.GetNodeGraph().ApplyGradeFromDRX(path, 0). It occasionally fails on one piece and works on a retry: try twice, then count graded pieces (node count) and report. - Never put a log look on non-log footage. Read the profile from the camera's sidecar XML, not from luma guesses.
SetClipColor("Green")on B-roll pieces.
Audio
- Normalize:
Timeline.NormalizeAudioLevel(items, {normalizationMode, targetLevel, targetLoudness, setLevelMode})withresolve.NORMALIZE_AUDIO_SET_LEVEL_INDEPENDENT. Seevoice-and-audiofor values. - Per clip:
AudioVolume(dB),SetVoiceIsolationState({"isEnabled": True, "amount": 50}), Dialogue Leveler properties. EQ is not scriptable; Fairlight presets can be applied if the user saved some. - Silent track trap: a template's music track had a track-level AI Music Remixer switched on (and a Stereo Width insert). Anything placed on that track rendered as silence while the same file played on another track. The API can't read or toggle it; it's in the Edit page → select the track header → Inspector → Audio. If music is silent, check that first.
Diagnosing audio the reliable way
When "there's no sound", don't guess. Render a few seconds of audio from Resolve and compare it with the source file:
- Project render:
SetCurrentRenderFormatAndCodec("mov", "ProRes422LT"),SetRenderSettings({SelectAllFrames: False, MarkIn, MarkOut, TargetDir, CustomName, ExportVideo: False, ExportAudio: True, AudioCodec: "lpcm"}),AddRenderJob(). - From an external script, rendering only starts with
StartRendering([job], False)(isInteractiveMode False). Other forms return False and the job stays "Ready". - Render into a folder without spaces (a path with spaces left the job unstarted).
- Wait on
GetRenderJobStatus(job)until "Complete", not onIsRenderingInProgress()(it can be False before rendering begins). - Correlate the rendered audio with the source (mono, 8 kHz, best lag): ~0.9 = present, ~0.0 = missing. Least-squares gain tells how much of an SFX is in the mix.
- Restore the Deliver settings afterwards (format, whole timeline, video+audio on, output folder): your test changes the creator's export settings.
AddRenderJobjumps to the Deliver page;SetTrackEnableonly works on the Edit page (on other pages it returns True and does nothing). Go back withOpenPage("edit").- Timeline export (
Timeline.Export(path, EXPORT_DRT)) is a zip of XML with per-track fields; deeper mixer state is a compressed binary. Useful for diffing a working vs broken track.
Subtitles
MediaPool.AppendToTimelinewith an imported .srt ignores recordFrame and appends the subtitles after the end of the timeline. Passing start/end frames for it crashed Resolve 21.1.- Use File > Import > Subtitle in the UI (the creator clicks it, or computer-use). It places the first cue at the playhead and shifts the rest relative to it, so make the SRT's first cue start at 00:00:00,000, or everything lands early.
- Subtitle track style can't be set by script; read it from a DRT export if you need to record it.
Overlays and media cache
- Re-rendered files with the same name can keep playing stale cached frames: give each new render a new name (
-v2) and replace the clip. - Place overlays on the first free unlocked track from V2 up; never on V1.
Reading the timeline the creator edited
Before music, captions or graphics, map the timeline as it is now: walk V1 items (name, start, left offset) to find where each kept word and each B-roll landed. They trim and delete things; follow their version.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供 DaVinci Resolve Studio 脚本编写的深度实践指南
- 覆盖从时间线构建到渲染输出的完整工作流
- 针对 Resolve 21 版本特有的陷阱和静默失败提供解决方案
亮点
- 触发描述清晰准确,明确指向 Resolve 脚本开发与调试场景
- 关键词覆盖全面,边界定义合理
亮点
- 文档结构清晰,分模块阐述不同功能点
- 包含大量可操作的代码示例和最佳实践
- frontmatter 完整,内容组织良好
亮点
- 强调读写验证和异常重试机制
- 指出多个易导致静默失败的陷阱并提供规避方案
- 提供可靠的音频诊断方法和渲染状态检查策略
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。