dbd AI Video Editor — Portfolio Project by Muhammad Daffa Ashdaqfillah

An AI-assisted editor that turns footage, music, and a brief into a beat-synced timeline, with inspectable shot choices and frame-accurate vertical exports.

dbd AI Video Editor — Portfolio Project by Muhammad Daffa Ashdaqfillah

Published on July 7, 2026

Project Details

The dbd team’s one-pager showing the native prototypes, model choices, and editing pipeline.
The dbd team’s one-pager showing the native prototypes, model choices, and editing pipeline.

I built dbd to get from a folder of footage to a usable first cut. The inputs are a set of clips, a song, and a short brief about what the edit should show. The prototype produces a timeline with song positions, source ranges, and alternate shots, then renders that timeline as a vertical highlight. I developed the Python pipeline, the native clients, and the tools that let me inspect the intermediate decisions.

Demo

Watch on YouTube
Three frames from the 31.1-second demo export, showing the range of shots chosen for the edit.
Three frames from the 31.1-second demo export, showing the range of shots chosen for the edit.

Let the music set the cut points

The Python pipeline uses the pretrained Beat This! checkpoint for beats and downbeats. I built the section heuristics in Librosa from chroma, MFCCs, onset strength, and RMS energy, with section boundaries anchored to the downbeat grid. The cuts follow that grid. A high-energy section can subdivide the bar for quicker cuts, while a quiet passage gives shots longer to play. An optional short-form mode first scores fixed-length song windows using energy and spectral recurrence. The selected audio excerpt then determines the timeline's duration.

Meanwhile, I index the footage by splitting videos on rough luma changes and sampling frames from the resulting shots. The Python prototype uses Palmier’s Core ML export of SigLIP2 Base to encode sampled frames and text queries into a shared embedding space. The index stores each vector with its source file and time range, which lets changes to the story prompt reuse the same footage analysis.

Give the planner a brief and a shot library

The planner writes an ordered set of story chapters with visual queries. One Python path used a 4-bit Qwen3 4B Instruct checkpoint through MLX to draft chapters and CLAP HTSAT Fused to score audio descriptions against music sections while preserving story order. I also tried feeding the planner captions from representative shots so its queries could use the available footage. That version selected a diverse subset of shots for captioning and assigned contiguous slot ranges using chapter duration weights.

The planner sometimes wrote a plausible shot that did not exist in the footage. I validated the structured output and translated each chapter into shorter search queries. For each slot, I encode the query and compare it with normalized SigLIP2 vectors for shots long enough to fill the cut. The selector discounts overlapping source ranges, recent source reuse, and near-duplicate images. In the short-demo configuration, the visual penalty starts above 0.88 cosine similarity against the four most recent choices. The timeline records the chosen source range, similarity, penalties, and alternatives so a poor cut can be traced back to its query or ranking.

Beat-aligned slots, Qwen shot queries, and the SigLIP2 shot index feed shot selection. The output is a frame-quantized edit timeline.
Beat-aligned slots, Qwen shot queries, and the SigLIP2 shot index feed shot selection. The output is a frame-quantized edit timeline.

Validate the timeline before calling it an edit

Before trimming, I round each slot’s cumulative end time to an output frame and use the preceding end as the next start. Rounding boundaries this way avoids accumulating a separate rounding error for every clip. It checks that source ranges fit their slots and that the timeline is contiguous. After rendering, the report checks actual frame count, dimensions, audio streams, and duration against the plan. The frames above came from a demo with 165 input videos, 1,051 indexed shots, and 1,097 sampled frames.

Recorded runEdit slotsDurationFrames at 30 fpsOutput checked
Short demo1631.1 s9331080 × 1920, one audio stream, timing passed
Hook-window variant2130.0 s9001080 × 1920, one audio stream, timing passed
Full-song trip97198.0 s5,940 plannedSaved timeline

These runs tested indexing, selection, and export mechanics. Judging whether the edit tells the intended story still required watching it and reviewing the chosen shots.

What made it into the native prototypes

The SwiftUI phone prototype explored selecting memories from Photos and using Apple Music previews. Beat analysis and visual matching use Core ML, the on-device planner uses an MLC-packaged Qwen model, and AVFoundation handles video composition. The optional planning server works from compact memory summaries. Source photos and video remain on the device.

The macOS editor can import the Python timeline into a .dbdproject package. That path makes the edit available for review and manual adjustment with its source clips and trim boundaries intact.