Drum Performance Video Editor
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
- Inspect clip duration, frame rate, audio tracks, and number of takes.
- Select the user-specified correct take based on pauses, phone interaction, and repositioning.
- Identify separately: music start, first visual drum strike, and corresponding first drum sound.
- 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.
- Check sync at the beginning, middle, and end. Apply a fixed offset if errors are consistent; only apply drift correction if errors increase continuously.
- Remove setup, incorrect takes, and device operation footage. Keep the final hit and approximately 1–2 seconds of natural silence at the end.
- 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.
- 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.