domain-modeling
Write a glossary, record ADRs, and clarify vague terms.
MAmattpocock/skills336k4,217 new stars in the last 7 days
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.
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).
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.useCustomSettings=1, timelineFrameRate, timelinePlaybackFrameRate.timelineResolutionWidth/Height and the output resolution, then input mismatch behaviour scaleToCrop ("scale full frame with crop"). The default scaleToFit letterboxes. Read it back.AppendToTimeline: endFrame is 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.seconds = ((h*3600+m*60+s)*round(fps) + f) / fps. Using 23.976 per second lost 16 frames on an 11-minute music bed.item.SetProperty("ZoomX", z) and "ZoomY" (centre anchored). Works in 21.Timeline.ApplyGradeFromDRX fails 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.SetClipColor("Green") on B-roll pieces.Timeline.NormalizeAudioLevel(items, {normalizationMode, targetLevel, targetLoudness, setLevelMode}) with resolve.NORMALIZE_AUDIO_SET_LEVEL_INDEPENDENT. See voice-and-audio for values.AudioVolume (dB), SetVoiceIsolationState({"isEnabled": True, "amount": 50}), Dialogue Leveler properties. EQ is not scriptable; Fairlight presets can be applied if the user saved some.When "there's no sound", don't guess. Render a few seconds of audio from Resolve and compare it with the source file:
SetCurrentRenderFormatAndCodec("mov", "ProRes422LT"), SetRenderSettings({SelectAllFrames: False, MarkIn, MarkOut, TargetDir, CustomName, ExportVideo: False, ExportAudio: True, AudioCodec: "lpcm"}), AddRenderJob().StartRendering([job], False) (isInteractiveMode False). Other forms return False and the job stays "Ready".GetRenderJobStatus(job) until "Complete", not on IsRenderingInProgress() (it can be False before rendering begins).AddRenderJob jumps to the Deliver page; SetTrackEnable only works on the Edit page (on other pages it returns True and does nothing). Go back with OpenPage("edit").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.MediaPool.AppendToTimeline with 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.-v2) and replace the clip.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.
Write a glossary, record ADRs, and clarify vague terms.
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
OBobra/superpowers331k5,030 new stars in the last 7 days