The Flashback clip library aggregates MP4 files from one or more directories on disk and exposes them to the frontend through a small set of Tauri commands. The library model is append-only: changing the active clips directory only redirects where new clips are saved — older directories continue to be scanned so no recordings are hidden after a directory change. This page documents every library command, theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CaramelHQ/Flashback/llms.txt
Use this file to discover all available pages before exploring further.
ClipInfo type they return, and TypeScript examples drawn from the real frontend code in src/lib/library.svelte.ts.
pick_folder uses the Windows COM IFileOpenDialog shell API and is Windows-only. All other library commands are cross-platform (though Flashback currently only ships on Windows).ClipInfo
Every command that returns clips produces objects of this shape.Listing Clips
list_clips
Scans all library directories and returns the full list of MP4 clips, sorted by last-modified time (newest first). Duplicate paths across directories are deduplicated (case-insensitive on Windows). Non-MP4 files and directories are silently skipped.
The scanned directories include: the active clips directory, the default Videos\Flashback\Clips location, the legacy AppData\Roaming\…\clips path (for backwards compatibility), the Clips-Edit directory for exported clips, and any additional directories added via set_clips_dir.
Returns ClipInfo[]
Directory Management
clips_dir
Returns the current active clips directory — the folder where new recordings are saved. This is either the user-configured directory (if one has been set) or the default Videos\Flashback\Clips path.
Returns string — absolute path to the active clips directory.
set_clips_dir
Changes the active clips directory to dir. Creates the directory if it does not exist. Adds dir to the library history so that clips already saved there continue to appear in list_clips even after the directory is changed again. Also updates the Tauri asset-protocol scope so the WebView can load media files from the new path.
Absolute path to the new clips directory. Use
pick_folder to let the user choose interactively.Result<void, string> — rejects if the directory cannot be created.
pick_folder
Opens the native Windows folder picker dialog (IFileOpenDialog) and returns the path the user chose, or null if the dialog was cancelled. Runs on a blocking thread to avoid blocking Tauri’s async runtime.
Returns Result<string | null, string>
pick_folder uses CoInitializeEx(COINIT_APARTMENTTHREADED) internally. It must be called from outside any MTA COM context. This is the case for all normal Tauri command invocations from the frontend.Clip Operations
rename_clip
Renames an MP4 clip and any associated sidecar files (.clip.json, .edit.json) in one atomic filesystem operation. Also re-keys the clip’s entry in the central edit index so that non-destructive edits survive the rename. Returns the new absolute path of the MP4.
Absolute path to the existing MP4 file.
New filename stem, without extension (e.g.
"Epic_Clutch_Round_14").Result<string, string> — the new absolute path of the renamed MP4, or an error message if the name is invalid or a file with the new name already exists.
delete_clip
Sends an MP4 clip and its sidecar files to the Windows Recycle Bin (SHFileOperationW with FOF_ALLOWUNDO). The deletion is reversible from the Recycle Bin. Also removes the clip’s entry from the central edit index.
Absolute path to the MP4 file to delete.
Result<void, string> — rejects if the shell operation returns a non-zero error code.
Export Destination Helper
edit_dest
Computes the canonical export destination path for a clip without writing anything. Exported clips are placed in the dedicated Clips-Edit directory (Videos\Flashback\Clips-Edit) with a _edit.mp4 suffix, keeping them separate from originals while still making them visible in the library.
This command is documented here because the library scans Clips-Edit automatically, but it is also used by the editor workflow. See Editor Commands for the full export flow.
Absolute path to the source MP4 clip.
string — the absolute destination path.
Full Library Refresh Example
The following pattern mirrors therefreshLibrary function in src/lib/library.svelte.ts:
Related pages
Clip Library
User-facing guide to the clip library and filtering.
Storage Configuration
How to configure the clips directory and manage library paths.
Editor Commands
Commands for editing clips once they are in the library.
Capture Commands
Commands for recording new clips into the library.
Game Detection
How the
source field is populated for library entries.Architecture
High-level overview of how the library integrates with the rest of Flashback.