Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ter-9001/WannaCut/llms.txt

Use this file to discover all available pages before exploring further.

Everything visible on the WannaCut timeline is built from two fundamental primitives: clips and tracks. A track is a horizontal lane that holds clips of a particular media type. A clip is a reference to a segment of a media asset — it records where on the timeline the segment starts, how long it plays, and what portion of the source asset it draws from. Understanding this model is essential for working efficiently and for predicting how WannaCut composes your final video.
Clips reference assets by filename. The actual media file is stored once inside the project’s videos/ folder. Multiple clips on the timeline can point to the same file, enabling reuse without any disk duplication.

Track Types

WannaCut supports four distinct track types, each accepting only compatible clips:

Video

Holds video files (.mp4, .mkv, .avi, .mov) and images (.jpg, .jpeg, .png, .webp). Video tracks are rendered in the main canvas preview and are composited together using each clip’s blend mode and opacity settings. Images on video tracks behave like still frames with infinite duration.

Audio

Holds audio files (.mp3, .wav, .ogg) as well as the audio channel of video clips after using Separate Audio. Audio tracks are always rendered below video tracks in the composition order. A muted audio track renders with a reddish tint in the timeline UI.

Effects

A specialized video-type lane for clips that carry visual effect data (e.g., glitch, blur, camera shake). Effects clips are composited in the same pipeline as video tracks and follow the same render ordering rules.

Text

Holds text clips created by dragging a font from the font library onto the timeline. Text clips store their own font family, font size, color, background color, shine settings, and dimensions directly inside the clip object — no separate asset file is required.

The Clip Data Model

Every clip on the timeline is represented by the Clip interface. The fields below are the ones you will interact with most directly:
interface Clip {
  id: string;
  name: string;
  start: number;
  duration: number;
  color: string;
  trackId: number;
  maxduration: number;
  beginmoment: number;
  originalduration: number;
  blendmode?: 'normal' | 'overlay' | 'screen' | 'multiply' | 'lineardodge' | null;
  mute?: boolean;
  fadein?: number;
  fadeout?: number;
  fadeinAudio?: number;
  fadeoutAudio?: number;
  effects?: Object[];
  transitions?: Object[];
  keyframes?: {
    volume?: Keyframe[];
    opacity?: Keyframe[];
    speed?: Keyframe[];
    rotation3d?: Keyframe[];
    position?: Keyframe[];
    zoom?: Keyframe[];
  };
  type?: string | null;
}

Key Fields Explained

start
number
The position of the clip’s left edge on the timeline, measured in seconds from the beginning of the sequence. A clip with start: 5 begins playing 5 seconds into the composition.
duration
number
How many seconds the clip occupies on the timeline. This is the length of the block you see on the track. When speed keyframes are active, duration is recalculated automatically by mediaToCompositionTime() to account for time-remapping.
beginmoment
number
The start offset inside the source asset, in seconds. When you trim the left edge of a clip, beginmoment increases — the clip starts later in the source file. When you drag from the Source Monitor with an In point set, beginmoment is pre-populated with that In point. This allows non-destructive trimming: the original file is never modified.
originalduration
number
The untrimmed duration of the source footage in seconds. WannaCut uses this as the media-time anchor when speed keyframes remap the clip’s composition duration. For example, if a clip has originalduration: 10 and a 2× speed ramp, the composition duration will be recalculated to roughly 5 seconds.
maxduration
number
The full duration of the source asset in seconds, as returned by the get_duration Tauri command at clip-creation time. This is the hard ceiling for right-edge expansion: no matter where beginmoment is set, WannaCut will not let you pull the right edge beyond the total length of the source file. Images have an effective maxduration of Infinity since they are static.
blendmode
'normal' | 'overlay' | 'screen' | 'multiply' | 'lineardodge' | null
The compositing blend mode applied when this clip is rendered on top of clips below it. Follows standard digital compositing conventions:
  • normal — No blending; the clip simply renders on top.
  • overlay — Combines multiply and screen for contrast-preserving blending.
  • screen — Lightens by inverting, multiplying, and inverting again. Good for light flares.
  • multiply — Darkens by multiplying pixel values. Good for shadows.
  • lineardodge — Adds pixel values together (also known as Add). Useful for light effects.
mute
boolean
When true, the clip’s audio channel is silenced during playback and excluded from the export. The clip itself remains on the timeline and its video channel is unaffected. This is distinct from muting the entire track — a muted clip on an unmuted track is still silent.

Rendering Order

The order in which tracks are composited determines what appears on top in the final video. WannaCut uses the order_tracks() function to produce the sorted rendering stack every time the preview or export runs:
const order_tracks = () => {
  const tracks_order = tracks.sort((a, b) => {
    // Video and Effects tracks come before Audio tracks
    const priority = (type: string) => (type === 'audio' ? 1 : 0);
    const pA = priority(a.type);
    const pB = priority(b.type);

    if (pA !== pB) return pA - pB;  // Different types: video/effects first
    return a.id - b.id;             // Same type: lower ID rendered on top
  });
  return tracks_order;
};
The key rules are:
  • Video and Effects tracks are always rendered before (on top of) Audio tracks.
  • Within the same type, lower track ID = higher in the visual stack — track ID 0 renders on top of track ID 1, which renders on top of track ID 2, and so on.
  • The visual track order in the timeline UI mirrors this rendering order: the topmost row in the interface corresponds to the topmost layer in the composition.

Clip Colors

When a clip is first created, WannaCut randomly assigns it a color from a fixed palette of seven options. The color is purely cosmetic — it helps you distinguish clips visually on a busy timeline, especially when multiple clips from the same asset are in use.
Color ClassHexName
bg-blue-600#2563ebOcean
bg-emerald-600#059669Forest
bg-violet-600#7c3aedRoyal
bg-amber-600#d97706Gold
bg-rose-600#e11d48Wine
bg-cyan-600#0891b2Sky
bg-indigo-600#4f46e5Galaxy

Source Monitor & Sub-clips

The Source Monitor is the small preview panel on the left side of the main preview area. It lets you inspect any asset and mark a sub-range before committing it to the timeline.
1

Open an asset in the Source Monitor

Click any asset in the Media Library sidebar. It loads into the Source Monitor canvas, and WannaCut fetches its duration via the get_duration Tauri command.
2

Set In and Out points

Play or scrub the Source Monitor to the desired start frame, then press I to set the In point. Seek to the desired end frame and press O to set the Out point. The marked range is highlighted on the Source Monitor’s progress bar in indigo.
3

Drag to the timeline

Drag directly from the Source Monitor preview canvas onto the timeline. WannaCut creates a new clip with:
  • beginmoment set to your In point (seconds into the source asset).
  • duration set to outPoint - inPoint.
Only the marked range plays — the rest of the source asset is non-destructively excluded.
You can also drag the same asset from the Source Monitor multiple times with different In/Out points to create multiple non-overlapping sub-clips, all referencing the same single file in videos/.

Build docs developers (and LLMs) love