Communitygithub.com

Drum Performance Video Editor

Syncs a person performing drumming with separately recorded drum audio to create a polished drum cover video. Suitable for selecting the correct recording take, preserving song intro, aligning drum hits with visuals, removing setup or device operation footage, checking drift, and applying mild brightening.

What is Drum Performance Video Editor?

This AI agent skill transforms raw footage of a drummer performing into a professional drum cover video by synchronizing the video with separately recorded drum audio. It is designed for workflows using a DJI Action camera and Roland TD-17 KVX2 module (though adaptable to other gear), ensuring accurate alignment by mapping visual drum strikes to corresponding audio transients while preserving song intros and removing unwanted sections like setup or false starts. The skill handles independent clock drift by checking sync at the beginning, middle, and end of long recordings, applying fixed offsets for consistent errors or gradual drift correction as needed. Output uses only the external audio track, completely muting the camera's built-in audio, and may apply mild brightness enhancement to dark footage. Before finalizing, the agent performs a full playback review of the rendered video to confirm sync quality, then follows standard publishing or cover creation steps only after user approval.

Works with~Claude Code~Codex CLI~Cursor
npx skills add zhaoxuan0205-sys/drum-performance-video-editor

Ask in your favorite AI

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

Documentation

What does Drum Performance Video Editor do?

Cut a person's performance video with separately recorded drum audio into a natural, accurately synced continuous performance video.

Currently common equipment: DJI Action for video, Roland TD-17 KVX2 built-in recorded audio. The device models are used to determine sample rate, independent clock drift, and audio source type, but these do not limit the skill from handling other cameras or drum modules.

Core Workflow

  1. Inspect clip duration, frame rate, audio tracks, and number of takes.
  2. Select the user-specified correct take based on pauses, phone interaction, and repositioning.
  3. Identify separately: music start, first visual drum strike, and corresponding first drum sound.
  4. Align using "drumstick contact frame with drum head or cymbal ↔ drum sound transient"; if the song has an intro, it must be preserved — do not mistake the music start for the first drum hit.
  5. Check sync at the beginning, middle, and end. Apply a fixed offset if errors are consistent; only apply drift correction if errors increase continuously.
  6. Remove setup, incorrect takes, and device operation footage. Keep the final hit and approximately 1–2 seconds of natural silence at the end.
  7. The final output may only use the external audio recording; the camera's original audio must be completely muted and must not be mixed with the external audio. If the footage is too dark, apply only mild brightening.
  8. Watch the final output in full, confirm sync of the first drum hit, middle section, and ending, before proceeding to cover creation or publishing.

For detailed judgment and acceptance methods, see references/workflow.md.

Rendering

After determining the video in-point, audio in-point, and duration, run:

python scripts/render_edit.py \
  --video camera.mp4 \
  --audio recorder.wav \
  --video-in 6.300 \
  --audio-in 10.684 \
  --duration 188.800 \
  --output final.mp4 \
  --brighten

For each set of footage, parameters must be re-measured; do not reuse values from a previous song.

Key Rules

  • Full waveform correlation may only be used as an auxiliary check; it cannot determine the initial sync point on its own — it might align only with the backing track.
  • Only the actual contact of the drumstick with the drum head or cymbal counts; do not use the start of arm motion or rebound as the moment of the drum hit.
  • When rendering, map only the video track from the camera footage and the audio track from the external recording file; do not map or mix the camera audio track.
  • DJI Action and TD-17 KVX2 have independent clocks; for long songs, check three anchor points (beginning, middle, end) to confirm whether clock drift exists.
  • Do not quantize small natural timing errors in the actual performance, and do not arbitrarily change the video speed.
  • Do not execute public publishing without final user confirmation.

Related Skills