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.

Exporting in WannaCut is a three-phase pipeline that goes from your timeline to a finished MP4 file entirely on your local machine — no cloud upload required. Phase 1 renders every video frame through the same Three.js WebGL engine used for live preview, so the export is pixel-accurate. Phase 2 mixes all audio offline using the Web Audio API’s OfflineAudioContext, which runs faster than real-time. Phase 3 hands the frame sequence and the mixed audio WAV to a bundled FFmpeg binary running in Rust, which assembles the final MP4 with H.264 encoding.

Starting an Export

1

Finish your edit

Make any final adjustments to your clips, effects, and keyframes. WannaCut auto-saves your project continuously, so you do not need to manually save before exporting.
2

Trigger the export

Click the Export button (↑ arrow icon) in the top header toolbar, or press Ctrl + Enter. The export process begins immediately after you choose an output location.
3

Choose an output path

A native OS Save dialog opens. Navigate to the destination folder, enter a filename, and confirm. WannaCut enforces the .mp4 extension automatically — any other extension in the filename is replaced.
4

Monitor the progress bar

An export progress overlay appears over the editor showing a percentage bar and the current phase label. The bar advances through three distinct ranges corresponding to the three render phases described below.
5

Export completes

When the bar reaches 100%, the overlay closes and your MP4 file is ready at the path you chose. You can immediately open it in any media player.

The Three Export Phases

Phase 1 — Video Rendering (0% → 70%)

WannaCut creates a dedicated offscreen THREE.WebGLRenderer at the project’s configured resolution (e.g. 1920 × 1080). The renderer uses powerPreference: "high-performance" to request the highest-performance GPU available on the system. For every frame in the project — computed as Math.ceil(duration × fps) total frames — WannaCut:
  1. Seeks the render engine to the frame’s timestamp (frameIndex / fps).
  2. Calls the same drawFrame function used for live preview, applying all clip effects, keyframe interpolations, blend modes, and transitions.
  3. Reads the pixel buffer from a THREE.WebGLRenderTarget and flips it vertically to correct WebGL’s bottom-up Y axis.
  4. Encodes the corrected frame as a Base64 PNG and sends it to Rust via the save_export_frame Tauri command, which writes frame_XXXXX.png files to a temporary folder inside the project directory.
Progress increments from 0% to 70% as frames are written.

Phase 2 — Audio Mixing (70% → 85%)

After all frames are on disk, WannaCut mixes the audio track using the renderAudioOffline function from the render engine. This function replicates the full audio signal chain from the live preview — including:
  • Volume keyframes (sampled every 10 ms for smooth automation)
  • Speed adjustments (time-stretched per the speed ramp keyframes)
  • Audio effects: Pitch shift, Alien voice, and Microphone simulation
Because it uses OfflineAudioContext, the mix runs significantly faster than real-time regardless of project duration. Muted clips (.mute === true) are excluded automatically. The result is written as a WAV file alongside the frame sequence. Progress moves from 70% to 85% when the audio render completes.

Phase 3 — FFmpeg Assembly (85% → 100%)

With video frames and a mixed WAV file ready, WannaCut calls the assemble_exported_video Tauri command, which runs the bundled FFmpeg binary to:
  1. Read the frame image sequence at the correct FPS.
  2. Mux in the WAV audio track.
  3. Encode everything to H.264 MP4 and write the output file to the path you selected.
FFmpeg receives the project FPS, width, height, and total duration so the output container’s metadata is accurate. Progress reaches 100% when FFmpeg exits cleanly.

The ExportOptions Interface

The full set of parameters passed to the export engine — sourced directly from renderBridge.tsx:
export interface ExportOptions {
  targetPath: string;
  fps: number;
  projectConfig: { width: number; height: number };
  currentProjectPath: string;
  clips: any[];
  sceneRef: React.MutableRefObject<THREE.Scene | null>;
  rendererRef: React.MutableRefObject<THREE.WebGLRenderer | null>;
  cameraRef: React.MutableRefObject<any>;
  groupsRef: React.MutableRefObject<Map<string, THREE.Group>>;
  getInterpolatedValueWithFades: (time: number, clip: any, prop: string) => any;
  settingsFolder?: string;
  onProgress?: (percent: number) => void;
  onError?: (msg: string) => void;
}
onProgress is called after each frame (Phase 1) and after each phase boundary (70%, 85%, 100%), so the UI percentage bar updates smoothly throughout the entire export.

Cancelling an Export

To stop an in-progress export at any time, click the Abort Mission button in the export overlay. WannaCut calls the cancel_export Tauri command, which signals Rust to kill the running FFmpeg process. The progress bar resets to 0% and the editor returns to the normal editing state.
Partial frame files written to the temporary folder before cancellation are cleaned up automatically the next time an export starts for the same project.

Output Format

WannaCut currently exports to MP4 (H.264) only. The output path and filename are chosen via the system Save dialog and cannot be changed after the export starts. Support for additional codecs and containers (WebM, ProRes) is planned for a future release.
GPU acceleration applies to the Three.js frame rendering stage (Phase 1). The powerPreference: "high-performance" flag on the offscreen WebGL context hints to the OS to use the discrete GPU when one is available. You can influence GPU selection in Settings → System.
Large projects — especially those with many layered effects rendered at high frame rates and resolutions (e.g. 60 fps, 4K) — can take a significant amount of time because frames are rendered one-by-one sequentially in Phase 1. Plan accordingly for long-form projects. Lowering the FPS or resolution in Project Settings before exporting is the fastest way to speed up a test render.
Before starting a final export, review your FPS and canvas resolution in Project Settings. Changing these settings after export is not possible without re-exporting, and they directly determine both output quality and total export time.

Build docs developers (and LLMs) love