Communitygithub.com

doc-video-editor

End-to-end documentary and interview video editing workflow in DaVinci Resolve Studio using local Python scripting, faster-whisper word timestamps, Vision/audio cross-camera sync, MDX-Net vocal/instrumental separation, continuous underscore audio mastering with Voice Isolation, and BT.2020 HLG-to-Rec.709 3D LUT + ROI color matching. Use when editing interviews, mini-docs, or studio profiles mixing main camera footage, external audio recorders, smartphone B-roll/2nd-cam clips, and music tracks in DaVinci Resolve Studio.

What is doc-video-editor?

doc-video-editor is a Claude Code agent skill that end-to-end documentary and interview video editing workflow in DaVinci Resolve Studio using local Python scripting, faster-whisper word timestamps, Vision/audio cross-camera sync, MDX-Net vocal/instrumental separation, continuous underscore audio mastering with Voice Isolation, and BT.2020 HLG-to-Rec.709 3D LUT + ROI color matching. Use when editing interviews, mini-docs, or studio profiles mixing main camera footage, external audio recorders, smartphone B-roll/2nd-cam clips, and music tracks in DaVinci Resolve Studio.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/pedrodantas36975-design/doc-video-editor-skill/tree/HEAD/skills/doc-video-editor

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Documentary Video Editor (DaVinci Resolve Studio)

Complete, non-destructive workflow for turning raw multi-camera interview shoots, external audio, smartphone B-rolls/2nd-camera shots, reference color photos, and music tracks into a polished documentary timeline in DaVinci Resolve Studio.

Core Safety Rules

  1. Never overwrite the user's original synced project or template timeline. Always clone the project (SaveProject -> export/import or duplicate) or duplicate Timeline 1 before editing.
  2. Never edit raw media files in place. All audio stems, LUTs, and mastered WAVs go into a working directory or Resolve's custom LUT subfolder.
  3. Never skip visual and numeric verification. After building or grading, export stills directly from Resolve, verify clip >= 240/250 == 0.0% and consistent R/B balance, and inspect the stitched contact sheet visually before reporting success.
  4. Read reference guides before scripting Resolve or DSP:

Step-by-Step Pipeline

1. Inspect Raw Media & Sync (scripts/sync_media.py)

  • Probe all video/audio streams with PyAV (av): check pixel formats, color_primaries, color_trc (flag trc=18 / Rec.2100 HLG smartphone footage), FPS, and audio channels.
  • If camera audio is silent (0x00 LPCM bytes), sync external audio using mouth-openness energy vs RMS envelope cross-correlation at timeline FPS.
  • Sync 2nd-camera smartphone clips (30 fps) to the external recorder using 10ms RMS audio cross-correlation (check both head and tail windows to confirm drift ~ 0.000s).
  • Sync intro room music (clip_t) to the downloaded MP3 (song_t) via 5ms envelope cross-correlation.

2. Local Transcription & Silence Map (scripts/transcribe_and_silence.py)

  • Transcribe external dialogue locally with faster-whisper (small, int8, word_timestamps=True) to transcript_words.json and readable_transcript.txt.
  • Compute 10ms RMS silence intervals (silences.json) for clean breath-boundary snapping.

3. Editorial Curation & Pacing (scripts/plan_cut.py)

  • Present/curate a thematic keep.json (segments list with from/to word indices, scene_start, lead_in, tail) cutting retakes, mic checks, and dead air while preserving key stories and thematic flow (even reordering topics if helpful).
  • Enforce MAX_PAUSE splitting with minimum chunk size (>= 8 words and >= 4.0s) so tiny shards never get dropped.
  • Build plan.json with:
    • 15-frame J-cuts on scene_start boundaries
    • Alternating A1 / A2 speech tracks with 6/8 frame fades
    • Subtle 1.075x / 1.12x jump/punch-in zooms
    • Strict max duration budget (e.g., <= 13:00 including intro and outro).

4. Music Stems, Score Bed & Dialogue Mastering (scripts/master_voice_and_music.py)

  • Dialogue Mastering (GRAVACAO_MASTER.wav, 48 kHz mono):
    • Measure 240 silence blocks (psd_noise) and active speech PSD.
    • Apply zero-phase lav-mic EQ: 75 Hz 4th-order HPF, -3.0 dB @ 215 Hz & -1.8 dB @ 415 Hz chest/hum tame, gentle +1.6 dB @ 2700 Hz clarity, -2.5 dB @ 5600 Hz de-harsh, 12 kHz LPF roll-off.
    • Gentle 2.1:1 RMS compression + slow phrase leveler (+/- 2.5 dB) + 30ms lookahead limiter capped at -5.0 dBFS (tanh soft knee, zero flat-top clipping).
    • Keep offline Wiener NR subtle (GAIN_FLOOR = 0.72) and enable Resolve Studio AI Voice Isolation (amount = 50..55) on A1 & A2 to eliminate impulsive animal/background noise without crunching the voice.
  • Music Intro, Gradual Vocal->Instrumental Transition & Full Underscore:
    • Separate instrumental via UVR-MDX-NET-Inst_HQ_3.onnx (Sain_instrumental.wav).
    • Transcribe song lyrics with word_timestamps=True so vocal fades finish cleanly at the end of a full lyric phrase (never splice mid-word or break BPM!).
    • Render phase-locked vocals_intro.wav + uncut inst_intro.wav (-18 dBFS solo intro -> 5s gradual S-curve fade/duck to -38..-41 dBFS under speech).
    • Build a continuous chapter-matched score bed (full_doc_bed.wav, drum-transient compressed, -4.5 dB vocal pocket at 1.8 kHz, -37 dBFS base set to -41 dBFS in Resolve) filling the entire body seamlessly into the closing montage vocals.

5. Cross-Camera Color Pipeline (scripts/generate_hlg_lut.py)

  • For Rec.709 main camera, sample clean neutral wall ROIs per clip and compute non-clipping SetCDL values (Slope <= 1.18, Offset = -0.015, Power = 1.06) matched to the user's reference photo while capping estimated p99 <= 232.
  • For iPhone Rec.2100 HLG (BT.2020) clips inside a davinciYRGB (Rec.709) timeline, generate and apply the 33x33x33 .cube LUT (HLG_BT2020_to_Rec709_Natural.cube: inverse HLG OETF + 3x3 BT.2020->Rec.709 matrix + filmic shoulder knee) via SetLUT(1, ...) plus per-clip fine SetCDL.

6. Build Timeline & Verify (scripts/audit_resolve_stills.py)

  • Assemble V1 (intro + doc + gradual closing montage), V2 (rotated 90° + reframed Cam 2 + B-rolls), and A1..A5 cleanly (always cleaning spatial-audio track spill on A4+ after placing iPhone audio).
  • Normalize A1+A2 to -19.0 LUFS / -4.5 dBFS true-peak limit.
  • Verify track counts, zero frame mismatches, 0.0% highlight clipping across exported stills (v_audit_sheet.jpg), reset playhead to 01:00:00:00 on Edit page, and pm.SaveProject().

Related Skills