# LosslessCut User Guide

LosslessCut is the swiss army knife of **lossless** video and audio editing — a cross‑platform desktop application built on top of FFmpeg. Its headline feature is **lossless trimming and cutting**: it extracts the parts of a video or audio file you want to keep by performing an almost direct data copy, with no slow re‑encode and **no loss of quality**. This lets you discard gigabytes of unwanted footage from cameras, GoPros, drones, screen recordings and TV captures in seconds rather than minutes.

This guide covers everything you need to use LosslessCut productively: installing it, the core concepts of segments and tracks, every common task, keyboard‑driven workflows, automation through the CLI and HTTP API, and a thorough troubleshooting reference.

> [!NOTE]
> LosslessCut is **not** a non‑linear editor like Adobe Premiere, and not a linear editor like Avidemux — it sits in between. You define **segments** on a timeline, and those segments determine which portions of the file get exported. Advanced edits are done in multiple passes.

---

## 1. Quick Start

Here is the fastest path from a raw file to a trimmed export.

1. **Open a file** — drag and drop a video or audio file onto the player, or press <kbd>⌘</kbd>/<kbd>Ctrl</kbd> + <kbd>O</kbd>.
2. **Find your start point** — press <kbd>Space</kbd> to play/pause, or use <kbd>←</kbd> <kbd>→</kbd> / <kbd>,</kbd> <kbd>.</kbd> or the mouse wheel to seek.
3. **Set the segment start** — move the timeline cursor and press <kbd>I</kbd>.
4. **Set the segment end** — move the cursor forward and press <kbd>O</kbd>.
5. **Export** — press <kbd>E</kbd> (or the **Export** button) to open the export overview, then confirm.

LosslessCut writes a **new file** in the same folder as the source, with the from/to timestamps in the file name. Your original file is never modified.

```text
Beach Trip.mp4   →   Beach Trip-00.00.05.000-00.00.42.000-seg1.mp4
```

> [!TIP]
> Press <kbd>Shift</kbd> + <kbd>/</kbd> at any time to open the **Keyboard & mouse shortcuts** dialog. It lists every available action and lets you rebind keys.

---

## 2. Installation

### 2.1 There is no installer

LosslessCut is distributed as a compressed archive that you download and extract — there is no setup wizard. Download the latest build from the [GitHub releases page](https://github.com/mifi/lossless-cut/releases).

=== "Windows"

    Download the `.7z` archive and extract it with [7‑Zip](https://www.7-zip.org/download.html). Run `LosslessCut.exe` from the extracted folder.

=== "macOS"

    Mount the `.dmg` and drag the app into your `Applications` folder.

=== "Linux"

    Download the `tar.bz2`, AppImage, or Snap build and run the executable (`losslesscut`).

> [!WARNING]
> On Windows, do **not** move the LosslessCut folder after extracting it, run it from the `C:` drive (not a network drive), and avoid folder paths containing special characters (Chinese, Japanese, emoji). These cause blank‑window or crash‑on‑launch problems.

### 2.2 App Store vs. GitHub builds

LosslessCut is also available from the **Mac App Store** and **Microsoft Store**. These editions have exactly the same in‑app features but differ in two ways:

- They are usually a few versions **behind** the GitHub release (the GitHub build is effectively a public beta).
- They run in an OS **sandbox**, which adds limitations: the Apple App Store version cannot open `.vob` files, and must prompt you for an output directory before writing files.

| Edition | Source | Notes |
|---|---|---|
| GitHub release | github.com/mifi/lossless-cut | Newest features, may contain bugs |
| Mac App Store | Apple App Store | Sandboxed, no VOB, prompts for output dir |
| Microsoft Store | Microsoft Store | Sandboxed (AppContainer) |
| Snap / Flatpak / others | Third parties | Community‑maintained, **not officially supported** |

> [!NOTE]
> Because LosslessCut is open source (GPL), third parties publish their own variants (e.g. portableapps.com). These are fine to use, but the maintainer does not provide support for them.

### 2.3 Supported operating systems

LosslessCut is based on Electron, which periodically drops support for old OS versions. Older LosslessCut releases continue to work on older systems.

| Dropped support | Version that dropped it |
|---|---|
| macOS 11 | v3.66 |
| macOS 10.14 and older | v3.58.0 |
| Windows 8.1 and older | v3.52.0 |
| macOS 10.12 and older | v3.48.2 |
| 32‑bit Linux | v3.48.2 |

### 2.4 Where settings and files are stored

LosslessCut is **not** a portable app. Settings, keyboard shortcuts, logs and temporary cache files are stored in your operating system's `appData` folder.

| OS | `appData` folder |
|---|---|
| Windows | `%APPDATA%\LosslessCut` |
| Windows (MS Store) | `C:\Users\%USERNAME%\AppData\Local\Packages\57275mifi.no.LosslessCut_eg8x93dt4dxje\LocalCache\Roaming\LosslessCut` |
| macOS | `~/Library/Application Support/LosslessCut` |
| macOS (App Store) | `~/Library/Containers/no.mifi.losslesscut/Data/Library/Application Support/LosslessCut` |
| Linux | `$XDG_CONFIG_HOME/LosslessCut` or `~/.config/LosslessCut` |

Settings and keyboard shortcuts live in a single `config.json` file inside that folder.

> [!TIP]
> **Semi‑portable setup (Windows):** create a `config.json` file containing `{}` next to `LosslessCut.exe`, and LosslessCut will read/write settings there instead of in `appData`. You can also point at any folder with the [`--config-dir`](#82-command-line-options) CLI option. To uninstall, simply delete the folder you extracted.

---

## 3. Core Concepts

Understanding four concepts — formats vs. codecs, segments, markers, and tracks — makes everything else in LosslessCut click.

### 3.1 Formats vs. codecs (and why it matters)

A common mistake is confusing a file's **format** with its **codec**.

- A **container format** (e.g. `MP4`, `MOV`, `Matroska/MKV`, `WAV`) is a wrapper that holds one or more streams.
- A **codec** (e.g. `H264`, `H265/HEVC`, `AAC`, `VP9`) is the actual encoding of a video, audio, or subtitle stream **inside** that container.

A file named `My video.mp4` most likely has the MP4 format and might contain an `H264` video track and an `AAC` audio track — but the extension alone guarantees nothing.

**Remuxing** is changing the container format without touching the codecs. In LosslessCut, selecting a different output format and exporting *remuxes* the streams into a new container — losslessly, though some format‑specific metadata may not survive the conversion.

> [!IMPORTANT]
> To losslessly reduce a file's size you must remove *something*: shorten the duration (cut start/end) or remove a track. You **cannot** losslessly re‑compress media. For quality‑reducing re‑encodes, use a tool like [HandBrake](https://handbrake.fr/).

### 3.2 Segments

**Segments are the first‑class citizens of LosslessCut.** A segment is a time slice of your source file defined by a *start time* and an *end time*. Each segment has a number (its export order) and can optionally carry a **label** and **tags**. Segments are the basis of what gets exported.

By default every segment you create is **preserved** and exported as a new file. You can invert this behavior with the **Yin‑Yang** ☯️ button so that LosslessCut instead **skips** your segments and exports the parts *between* them — perfect for cutting commercials out of the middle of a recording.

### 3.3 Markers

A segment with **no end time** is called a **marker**. It has no length and is excluded from exports, but otherwise behaves like a segment. Markers appear on the timeline as a vertical line with a number on top. Convert a marker into a segment by setting its out‑point with <kbd>O</kbd>, or use a tool such as "Invert all segments" to convert many at once.

### 3.4 Tracks (streams)

**Tracks run in parallel** — a typical video has one video track and one audio track. When cutting, LosslessCut cuts all enabled tracks equally. Open the **Tracks** panel to:

- Enable or disable individual tracks for export.
- Add tracks from other files (e.g. add a music or subtitle track to a video).
- Edit file metadata, per‑track metadata, and per‑track disposition.
- Extract individual tracks to separate files.

> [!NOTE]
> Some tracks cannot be cut by FFmpeg. If an export has the wrong duration or black parts, disabling problem tracks in the Tracks panel is usually the fix (see [Troubleshooting](#15-troubleshooting)).

### 3.5 Simple vs. advanced view

LosslessCut starts in **Simple mode**. Many functions are hidden until you click the **advanced view** (baby icon 👶) in the bottom‑left corner. If you can't find a button or function described in this guide, switch to advanced view first.

---

## 4. The Typical Workflow

This is the canonical end‑to‑end editing flow.

1. **Drag and drop** a video file into the player (or <kbd>⌘</kbd>/<kbd>Ctrl</kbd> + <kbd>O</kbd>).
2. <kbd>Space</kbd> to play/pause; <kbd>←</kbd> <kbd>→</kbd> <kbd>,</kbd> <kbd>.</kbd> or the mouse wheel to seek.
3. Press <kbd>I</kbd> to set the current segment's **start**, then move forward and press <kbd>O</kbd> to set the **end**. You can also hold <kbd>Shift</kbd> and drag a segment with the mouse to move or resize it.
4. Press <kbd>+</kbd> to add another marker/segment and repeat.
5. Press <kbd>B</kbd> to split the segment at the cursor; <kbd>Backspace</kbd> to remove a cutpoint/segment.
6. *(optional)* To merge all selected segments into one file, change **Export mode** from `Separate files` to `Merge cuts`.
7. *(optional)* Press the **Working dir** button to choose a different output folder (defaults to the source folder).
8. *(optional)* Press the **rotation** button to change orientation; use the **Tracks** button to customise tracks; select a new **output format** to remux.
9. *(optional)* In the right‑hand **Segments** panel, right‑click a segment for options, or drag to reorder. The order here is the order segments appear in a merged output.
10. Press **Export** (or <kbd>E</kbd>) to see the export overview, adjust options, optionally change the [output file‑name template](#7-naming-your-output-files), then press **Export** again to confirm.
11. *(optional)* Press the **Camera** button (or <kbd>C</kbd>) to take a JPEG/PNG snapshot at the current time; press the **trash** button to send the original to the trash.

> [!TIP]
> For the best lossless result you may need to trial‑and‑error: try a different output format (Matroska holds nearly everything), toggle keyframe cut mode, or disable troublesome tracks.

---

## 5. Everyday Tasks

### 5.1 Lossless cutting and trimming

Set a segment's start (<kbd>I</kbd>) and end (<kbd>O</kbd>), then export. This is the core operation. Note that **start cut times are not always frame‑accurate** because lossless cutting must align to keyframes — see [Keyframe cutting](#61-keyframe-cutting-vs-smart-cut).

### 5.2 Cutting out the middle (removing commercials)

Create segments around the parts you want to **remove**, then click the **Yin‑Yang** ☯️ button to invert. LosslessCut now exports everything *except* your segments.

### 5.3 Merging / concatenating files

To losslessly join multiple files (e.g. clips from the same camera with identical codec parameters):

1. Drag‑drop all source files into LosslessCut to populate the **batch list**.
2. Sort them into the desired order.
3. Open **Tools → Merge/concatenate files**, or set **Export mode** to `Merge cuts`.

> [!WARNING]
> Merging only works losslessly when the files share **identical codec parameters**. Mismatched files produce corrupt or broken joins. See the [merge troubleshooting](#154-merge--concat-produces-corrupt-or-broken-parts) for fixes.

### 5.4 Remuxing to a different container

Open a file, select a different **output format**, and export *without* creating any segments. The streams are copied into the new container losslessly. This is how you convert an MKV to MP4/MOV for iPhone/QuickTime playback, or "clean up" a problematic file.

### 5.5 Multi‑track / stream editing

Use the **Tracks** panel to:

- Combine arbitrary tracks from multiple files (add music or a subtitle to a video).
- Remove unneeded tracks.
- Replace or re‑encode only some tracks.
- Extract all tracks from a file into separate files (video, audio, subtitle, attachments, data).
- Select which video/audio tracks play back; play multiple audio tracks simultaneously.

### 5.6 Taking snapshots and exporting frames

- **Single snapshot:** press the **Camera** button or <kbd>C</kbd> to save a full‑resolution JPEG/PNG of the current frame. <kbd>Shift</kbd> + <kbd>C</kbd> copies it to the clipboard instead.
- **Frame ranges:** export ranges of frames to images — every *n*th frame, every *n* seconds, by scene change, or the best thumbnails. You can restrict export to a selected segment and optionally include the original timestamps in the file names.

### 5.7 Editing metadata, rotation, and chapters

- Change **rotation/orientation** metadata (fixes videos with the wrong orientation flag).
- Edit file‑level and per‑track metadata, including author, title, GPS position, and recording time.
- Edit embedded **MKV/MP4 chapter marks**.
- View subtitles and the embedded (DJI) **GPS track on a map**.

### 5.8 Detecting scenes automatically

Under the **Tools** menu, LosslessCut can analyse the media and create segments automatically:

| Tool | What it does |
|---|---|
| **Detect black scenes** | Finds black‑frame intervals |
| **Detect silent scenes** | Finds silent‑audio intervals |
| **Detect scene changes** | Finds visual scene‑change points |
| **Create segments from keyframes** | Makes one segment per keyframe |
| **Read all keyframes** | Loads every keyframe onto the timeline |

### 5.9 Downloading media over HTTP

LosslessCut can losslessly download a video over HTTP — including HLS `.m3u8` streams — via **File → Open URL**.

> [!CAUTION]
> Downloading and update checks require network access. Launch with [`--disable-networking`](#82-command-line-options) to make the app completely offline; this disables URL download, update checks, and opening external links.

---

## 6. Cutting Modes & Accuracy

### 6.1 Keyframe cutting vs. Smart Cut

Lossless cutting can only place cuts on **keyframes**, so a segment's *start* is normally rounded to the nearest **previous** keyframe. This is why cuts are sometimes not frame‑accurate.

- **Keyframe cut mode** (default on) — corresponds to FFmpeg's `-ss` *before* `-i`. Most common video files need this enabled, but some need it off; trial and error helps.
- **Smart Cut** (experimental 🧪) — re‑encodes only the few frames between your cutpoint and the nearest keyframe so the cut can be frame‑accurate. It does not work for many files; only use it when keyframe cut isn't precise enough.

You can see keyframes as vertical lines on the timeline (zoom in to reveal them). If there are no keyframes before your cutpoint, a lossless cut at that exact point is not possible.

> [!TIP]
> If cuts start from the wrong keyframe, shift all segment start times forward a few frames via **Edit → Segments → Shift all segments on timeline** (e.g. enter `00:00:00.200`), or enable the export option **Shift all start times**.

### 6.2 Timeline navigation and zoom

- **Timeline zoom** and **frame/keyframe jumping** let you cut precisely around keyframes.
- Toggle **video thumbnails** and the **audio waveform** for visual navigation.
- Apply a per‑file **timecode offset** (and auto‑load timecode from the file).

### 6.3 Manual cutpoint entry

You can type cutpoint times manually instead of seeking, and jump directly to a timecode with <kbd>G</kbd> (Go to timecode).

---

## 7. Naming Your Output Files

When exporting segments, you control the output file names with a **template**, evaluated as a JavaScript template string. Edit it in **Export options → Output file names**.

The available variables (a selection of the most common):

| Variable | Type | Meaning |
|---|---|---|
| `${FILENAME}` | string | Original filename without extension (e.g. `Beach Trip`) |
| `${EXT}` | string | File extension including the dot (e.g. `.mp4`) |
| `${SEG_NUM}` | string | Padded segment index (`01`, `02`, `42`) |
| `${SEG_NUM_INT}` | number | Segment index as an integer (for arithmetic) |
| `${SEG_LABEL}` | string | The segment's label |
| `${SEG_SUFFIX}` | string | Label prefixed with `-`, else `-seg<N>` |
| `${CUT_FROM}` / `${CUT_TO}` | string | Segment start/end as `hh.mm.ss.sss` |
| `${CUT_DURATION}` | string | Segment duration as `hh.mm.ss.sss` |
| `${EXPORT_COUNT}` | number | Exports since launch (starts at 1) |
| `${FILE_EXPORT_COUNT}` | number | Exports since the file was opened |
| `${EPOCH_MS}` | number | Milliseconds since epoch (for unique names) |
| `${SEG_TAGS.XX}` | object | Value of segment tag `XX` (use `${SEG_TAGS.foo ?? ''}` to avoid `undefined`) |

Because the template is JavaScript, you can transform values inline, for example padding a number:

```text
${FILENAME} - ${String(SEG_NUM_INT).padStart(3, '0')}${EXT}
```

> [!IMPORTANT]
> Your template must include at least one **unique** identifier (such as `${SEG_NUM}` or `${CUT_FROM}`) and should end in `${EXT}`, or media players may not recognise the files. If a template would produce two identical names, LosslessCut reverts to the default template.

> [!TIP]
> Using `/` or `\` in a template creates a **folder structure** for your exported segments. If you do this, turn **off** "Sanitize" in the Output file names editor so the slashes are preserved.

---

## 8. Automation: CLI & HTTP API

LosslessCut was not designed as a batch toolkit, but it offers basic automation. See also [Batch processing](#10-batch-processing-with-ffmpeg) for the recommended script‑based approach.

### 8.1 Running from the command line

```bash
LosslessCut [options] [files]
```

If LosslessCut is not on your `PATH`, run the executable directly:

```bash
# Linux
./LosslessCut arguments
# Windows
./LosslessCut.exe arguments
# macOS
./LosslessCut.app/Contents/MacOS/LosslessCut arguments
```

Open one or more files:

```bash
LosslessCut file1.mp4 file2.mkv
```

### 8.2 Command‑line options

| Option | Purpose |
|---|---|
| `--http-api [port]` | Start the [HTTP API](#84-http-api-) server (default port `8080`) |
| `--keyboard-action <name>` | Run a keyboard action in a running instance |
| `--settings-json '<json>'` | Override settings (JSON or JSON5) 🧪 |
| `--config-dir <dir>` | Folder to store/load `config.json` from (folder only, not the file) |
| `--locales-path <dir>` | Custom path to translation files |
| `--disable-networking` | Make the app completely offline |

Override settings example (see the full settings list in [§13](#13-settings-reference)):

```bash
LosslessCut --settings-json '{captureFormat:"jpeg", "keyframeCut":true}'
```

Override the bundled FFmpeg/FFprobe path:

```bash
LosslessCut --settings-json '{customFfPath:"/path/to/folder/containing/ffmpeg_and_ffprobe"}'
```

> [!CAUTION]
> `--settings-json` is experimental. Specifying incorrect values **can corrupt your configuration file**. The exact setting keys may change between versions.

### 8.3 Controlling a running instance

If you enable **"Allow multiple instances"** in settings, you can drive an already‑running LosslessCut from the command line. Only keyboard actions and opening files are supported, and this is experimental.

```bash
# Open a file in the running instance
LosslessCut file.mp4
sleep 3            # wait for the file to load
# Trigger the "export" keyboard action
LosslessCut --keyboard-action export
```

```bash
# Seek to a specific time
LosslessCut --keyboard-action goToTimecodeDirect '{"time": "12.23"}'
```

> [!NOTE]
> `--keyboard-action` returns **immediately**. To run several actions in sequence, `sleep` between them — or use the HTTP API, which can wait for an action to finish. The full list of action names is in the **Keyboard shortcuts** dialog (you don't need to bind an action to a key to call it).

### 8.4 HTTP API 🧪

Start LosslessCut with `--http-api` to expose a local HTTP server (default `http://localhost:8080`, bound to `127.0.0.1`).

**Run an action** — `POST /api/action/:action` executes a keyboard action. Unlike the CLI, most actions wait for completion before responding.

```bash
# Export the currently open file
curl -X POST http://localhost:8080/api/action/export

# Seek to a time
curl -X POST http://localhost:8080/api/action/goToTimecodeDirect --json '{"time": "09:11"}'

# Open one or more files
curl -X POST http://localhost:8080/api/action/openFiles --json '["/path/to/file.mp4"]'
```

**Await an event** — `POST /api/await-event/:eventName` hangs until the named event fires, then returns JSON. Supported events:

| Event | Returns |
|---|---|
| `export-start` | `{ path: string }` when an export begins |
| `export-complete` | `{ paths: string[] }` when an export finishes |

```bash
# Print each exported file path as exports complete
while true; do
  echo 'Exported:' $(curl -s -X POST http://localhost:8080/api/await-event/export-complete | jq -r '.paths[0]')
done
```

> [!WARNING]
> The HTTP API is experimental and may change at any time. It listens only on localhost, but anything that can reach `127.0.0.1:8080` on your machine can control LosslessCut while the API is enabled.

---

## 9. Importing & Exporting Projects

LosslessCut's native project file is the `.llc` file — a JSON5 document describing the segments on your timeline. These are created automatically (unless disabled) so you can close and reopen LosslessCut and continue where you left off.

> [!NOTE]
> The `.llc` files you see appearing next to your media exist to save your segments between sessions. You can turn them off in settings.

Beyond `.llc`, LosslessCut imports and exports segment data in many formats via the **File → Import project** and **File → Export project** menus.

| Direction | Supported formats |
|---|---|
| **Import** | LLC, CSV (seconds), CSV (frame numbers), Cutlist, EDL (CMX3600/mplayer), Text chapters / YouTube, DaVinci Resolve / Final Cut Pro XML (XMEML), Final Cut Pro FCPX (FCPXML), CUE sheet, PotPlayer Bookmarks (`.pbf`), Subtitles (SRT), DV Analyzer Summary, OpenTimelineIO |
| **Export** | LLC, CSV (seconds), CSV (timestamps), CSV (frame numbers), TSV/TXT (timestamps), Subtitles (SRT), YouTube Chapters |

### 9.1 CSV project format

CSV import/export uses one segment per line with three columns: `segment start`, `segment end`, `label`. Times are in **seconds**; an empty end makes a marker. Use commas (not semicolons) to separate fields.

```csv
,56.9568,First segment starting at 0
70,842.33,"Another quoted label"
1234,,Last marker starting at 1234 seconds
```

TSV is identical but tab‑separated.

### 9.2 Embedded chapters

LosslessCut can import/export **MP4/MKV chapter marks**, and can create chapters from your merged segments — useful for generating YouTube chapter timestamps (see the [recipe](#111-export-cut-times-as-youtube-chapters)).

---

## 10. Batch Processing with FFmpeg

LosslessCut cannot itself run the *same* operation across many files automatically. The recommended approach is a small script:

1. Install [FFmpeg](https://ffmpeg.org/) so that typing `ffmpeg` (or `ffmpeg.exe`) in a terminal prints its version.
2. Perform your operation once in LosslessCut, then open **Tools → Last ffmpeg commands** and copy the exact command it ran.
3. Paste that command into a shell script (`myscript.sh` / `myscript.bat`), adapting it to loop over your files.

> [!TIP]
> LLMs (e.g. ChatGPT) are excellent at turning a single FFmpeg command into a batch script. Paste the command from **Last ffmpeg commands**, state your OS, and describe the folder of files and what you want — then iterate with any error messages it produces.

For multi‑file *and* multi‑segment workflows, you can combine the batch list with a file‑name template that orders output by export and segment number — see [the recipe](#114-cut-multiple-files-and-merge-them-all).

---

## 11. Recipes

### 11.1 Export cut times as YouTube Chapters

1. Export with **Merge** and **"Create chapters from merged segments"** enabled.
2. Open the exported file and select **"Import chapters"** in the dialog.
3. **File → Export project → YouTube Chapters.**

### 11.2 Re‑encode only the audio, keeping the lossless video

1. Export each video/audio track to individual files (Tracks panel).
2. Re‑encode the audio file in HandBrake or similar (for MP4/MOV, encode as AAC).
3. Open the extracted video stream in LosslessCut, then open your encoded audio and choose **"Include all tracks from the new file"**.
4. Export.

### 11.3 Trim individual tracks separately (multi‑pass)

1. Open a file and export all tracks as individual files.
2. Open each track file independently and cut as desired.
3. Add the tracks back together and combine into one output video.

### 11.4 Cut multiple files and merge them all

1. Drag‑drop source files (same camera/source) to open them in the batch list, then sort them.
2. Open the first file, edit it, and open **Export options → Output file names**.
3. Set a template that orders by export and segment, e.g.:
   ```text
   my-movie-${String(EXPORT_COUNT).padStart(3, '0')}-${String(SEG_NUM_INT).padStart(3, '0')}${EXT}
   ```
4. Export. Repeat for each file in the batch in your desired order.
5. Close the batch list, drag‑drop all exported segments back in, sort by name, and **Merge**.

### 11.5 Export all keyframes as images

1. **Tools → Create segments from keyframes.**
2. Right‑click a segment → **Edit segments by expression** → convert segments to markers → **OK**.
3. Right‑click a segment → **Extract frames from selected segments as image files.**

### 11.6 Efficient repeated single‑file operation

Bind these actions to hotkeys, then repeat per file:

1. `toggleStripAll` — deselect all tracks.
2. *(once)* Click **Filter tracks** and enter `track.codec_type === 'video' || track.codec_type === 'audio'`.
3. `toggleStripCurrentFilter` — select only audio/video tracks.
4. `deselectAllSegments`, then `selectSegmentsByExpr` with e.g. `segment.label === 'My label' && segment.duration < 5`.
5. `export`.

---

## 12. JavaScript Expressions

Several dialogs accept JavaScript expressions, giving you a full base JavaScript environment.

### 12.1 Select segments by expression

You receive a `segment` variable and return `true`/`false`:

```js
segment.duration < 5
```

### 12.2 Edit segments by expression

You receive a `segment` for each selected segment and return a new segment with modified properties. In‑app examples show the available fields.

### 12.3 Select tracks by expression

Open the **Tracks** dialog → **Track info** for a track to see every variable you can use in a filter (e.g. `track.codec_type`).

### 12.4 Expressions in name templates

Output name templates are also expressions, so you can write `${FILENAME.toLowerCase()}` and similar.

---

## 13. Settings Reference

Settings live in **Settings** (or <kbd>⌘</kbd>/<kbd>Ctrl</kbd> + <kbd>,</kbd>) and are stored in `config.json`. The most useful user‑facing options:

| Setting | Default | What it controls |
|---|---|---|
| `keyframeCut` | `true` | Keyframe cut mode (see §6.1) |
| `enableSmartCut` | `false` | Experimental frame‑accurate smart cut |
| `captureFormat` | `jpeg` | Snapshot image format (`jpeg`/`png`/`webp`) |
| `captureFrameQuality` | `0.95` | Snapshot quality (0–1) |
| `autoMerge` | `false` | Default export mode to "Merge cuts" |
| `exportConfirmEnabled` | `true` | Show the export options dialog before each export |
| `invertCutSegments` | `false` | Yin‑Yang: export between segments instead |
| `autoSaveProjectFile` | `true` | Write `.llc` project files automatically |
| `simpleMode` | `true` | Start in simple (vs. advanced) view |
| `darkMode` | `true` | Dark UI theme |
| `playbackVolume` | `0.3` | Default playback volume |
| `language` | `en` | UI language |
| `enableUpdateCheck` | `true` | Check GitHub for new versions on launch |
| `allowMultipleInstances` | `false` | Allow more than one running instance |
| `enableAskForFileOpenAction` | `true` | Ask what to do when opening a file |
| `enableAutoHtml5ify` | `true` | Auto‑convert unsupported files for preview |
| `enableNativeHevc` | `true` | Hardware HEVC decoding for preview |
| `ffmpegHwaccel` | `none` | FFmpeg hardware acceleration for detection/export |
| `movFastStart` | `true` | Enable MOV faststart on export |
| `avoidNegativeTs` | `make_zero` | FFmpeg `avoid_negative_ts` behaviour |
| `preserveMetadata` | `default` | How much metadata to keep on export |
| `preserveChapters` | `true` | Keep chapters on export |
| `customFfPath` | *(unset)* | Use a custom FFmpeg/FFprobe folder |

> [!NOTE]
> This is a selection. The complete, authoritative list of keys and defaults lives in the application's configuration store; some keys are experimental and may change between versions. See the Admin Guide for the full configuration reference.

---

## 14. Keyboard Shortcuts

Open the full, editable list with <kbd>Shift</kbd> + <kbd>/</kbd>. Default bindings for the most common actions:

### 14.1 Playback & seeking

| Keys | Action |
|---|---|
| <kbd>Space</kbd> | Play/pause (reset speed) |
| <kbd>K</kbd> | Play/pause (keep speed) |
| <kbd>J</kbd> / <kbd>L</kbd> | Slow down / speed up playback |
| <kbd>←</kbd> / <kbd>→</kbd> | Seek backward / forward |
| <kbd>,</kbd> / <kbd>.</kbd> | Previous / next frame |
| <kbd>Alt</kbd>+<kbd>←</kbd> / <kbd>Alt</kbd>+<kbd>→</kbd> | Seek to previous / next keyframe |
| <kbd>Ctrl</kbd>+<kbd>←</kbd> / <kbd>Ctrl</kbd>+<kbd>→</kbd> | Seek by percent |
| <kbd>G</kbd> | Go to timecode |
| <kbd>Ctrl</kbd>+<kbd>Home</kbd> / <kbd>Ctrl</kbd>+<kbd>End</kbd> | Jump to timeline start / end |

### 14.2 Segments & cutpoints

| Keys | Action |
|---|---|
| <kbd>I</kbd> / <kbd>O</kbd> | Set segment start / end |
| <kbd>+</kbd> (<kbd>Shift</kbd>+<kbd>=</kbd>) | Add segment |
| <kbd>B</kbd> | Split current segment at cursor |
| <kbd>Backspace</kbd> | Remove current cutpoint/segment |
| <kbd>Enter</kbd> | Label current segment |
| <kbd>↑</kbd> / <kbd>↓</kbd> | Jump to previous / next segment |
| <kbd>PageUp</kbd> / <kbd>PageDown</kbd> | Jump to first / last segment |
| <kbd>Shift</kbd>+<kbd>←</kbd> / <kbd>Shift</kbd>+<kbd>→</kbd> | Jump to current segment start / end |

### 14.3 Editing, export & view

| Keys | Action |
|---|---|
| <kbd>E</kbd> | Export |
| <kbd>C</kbd> | Capture snapshot |
| <kbd>Shift</kbd>+<kbd>C</kbd> | Capture snapshot to clipboard |
| <kbd>R</kbd> | Increase rotation |
| <kbd>T</kbd> / <kbd>Shift</kbd>+<kbd>T</kbd> | Toggle strip all tracks / current filter |
| <kbd>Z</kbd> | Toggle timeline comfort zoom |
| <kbd>Ctrl</kbd>+<kbd>↑</kbd> / <kbd>Ctrl</kbd>+<kbd>↓</kbd> | Timeline zoom in / out |
| <kbd>F</kbd> | Toggle fullscreen video |
| <kbd>M</kbd> | Toggle mute |
| <kbd>Alt</kbd>+<kbd>↑</kbd> / <kbd>Alt</kbd>+<kbd>↓</kbd> | Volume up / down |
| <kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>Z</kbd> | Undo |
| <kbd>Ctrl</kbd>+<kbd>Y</kbd> / <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Redo |
| <kbd>Shift</kbd>+<kbd>/</kbd> | Toggle keyboard shortcuts dialog |

### 14.4 Batch (multi‑file)

| Keys | Action |
|---|---|
| <kbd>Shift</kbd>+<kbd>↑</kbd> / <kbd>Shift</kbd>+<kbd>↓</kbd> | Select previous / next file in batch |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>↑</kbd> / <kbd>↓</kbd> | Open previous / next file in batch |
| <kbd>Shift</kbd>+<kbd>Enter</kbd> | Open selected batch file |

> [!IMPORTANT]
> Undo/redo do **not** work from the top menu — this is a known limitation. Always use the keyboard shortcuts above for undo/redo.

---

## 15. Troubleshooting

> [!TIP]
> Before troubleshooting, re‑read [Formats vs. codecs](#31-formats-vs-codecs-and-why-it-matters) — most "broken export" problems come from a format/codec mismatch. Open **Tools → Toggle Developer Tools** to inspect errors.

### 15.1 The exported video has a problem (plays back wrong)

If export succeeds with no error but the result looks wrong:

- Try **Keyframe cut mode** both on and off (don't use Smart Cut while debugging).
- In the **Tracks panel**, disable all tracks except the main one (e.g. video); if that works, re‑enable tracks one by one to find the culprit.
- Choose a more permissive **output format** (`matroska` or `mov`).
- Test the same operation on a different file to isolate whether it's file‑specific.
- Enable the **Experimental Flag** in Settings and retry.

### 15.2 Cutting times are not accurate

Start cut times round to the nearest **previous** keyframe, so cuts aren't always frame‑accurate:

- Move the **start cutpoint a few frames after** the desired keyframe.
- Try toggling **Keyframe cut mode**.
- Adjust `avoid_negative_ts` in export options.
- For VP9 files from yt‑dlp, set the output format to **MP4** instead of Matroska if start keyframes are ignored.

### 15.3 Start cut is ignored / cut file has the same length as input

- Check that there are **keyframes** before your cutpoint (zoom in on the timeline). No keyframes → no lossless cut at that point; try Smart Cut or disable keyframe cut.
- Disable all tracks except video and re‑export — some tracks can't be cut and skew the duration.
- Adjust `avoid_negative_ts`. For files you produce yourself (e.g. OBS), reduce the keyframe interval at the source.

### 15.4 Merge / concat produces corrupt or broken parts

Files must have **identical codec parameters** to merge losslessly. If they do and it still fails, "clean up" each file first:

1. Open each file, change format to **MP4** (fixes `Non-monotonous DTS`) **or TS** (`mpegts`, gives a common timebase), and export without cutting.
2. Merge the cleaned files. Also try adjusting `avoid_negative_ts` and disabling extra tracks.

### 15.5 Smart Cut not working

Smart Cut is experimental. If it produces duplicate segments, enable the **Shift all start times** export option. Remuxing the source to MP4 first often helps.

### 15.6 Playback / preview problems

LosslessCut previews with the same engine as Google Chrome, so unsupported files (e.g. some 10‑bit content) may show black, blank, or corrupted preview:

- **"File must be converted":** use **File → Convert to supported format** for FFmpeg‑assisted software‑decoding playback (this does **not** affect your export).
- **Black/blank preview:** open the file in Chrome to confirm; for H265/HEVC, toggle **Hardware HEVC decoding** in Settings; otherwise use Convert to supported format.
- **Low‑quality/blurry preview:** LosslessCut fell back to software decoding for playback only — Convert to supported format for a better preview.

### 15.7 Output file name is missing characters

Special characters (Chinese, accents) replaced by `_` mean the **Sanitize** option is on. Turn it off in the Output file names editor — but note this also preserves `/` and `\` (which create folders), and some characters are illegal on some operating systems.

### 15.8 Platform‑specific issues

=== "Linux"

    - Crash on startup with a `setuid_sandbox_host` / SUID sandbox error → run `./lossless-cut --no-sandbox`.
    - For the Snap/Flatpak builds, prefer the GitHub download if you hit issues.

=== "Windows"

    - Blank/white window on launch → keep the folder on `C:` with no special characters in the path; try launching with `--disable-gpu` and/or `--disable-features=VizDisplayCompositor`; whitelist LosslessCut in your anti‑virus.
    - `KERNEL32.dll` error → you're on Windows 7/8/8.1, which is no longer supported.

### 15.9 Known limitations

- **Undo/redo** work only via keyboard shortcuts, not the menu.
- **MP4/MOV** are nearly the same format; if export as MP4 fails, choose MOV (or rename the extension afterward).
- **MPEG‑TS/MTS** files are problematic — remux to MP4/MKV first, then edit.
- **Metadata** (EXIF) is not always preserved by FFmpeg; use `exiftool` afterward if needed.
- **Proprietary data tracks** (GoPro `tmcd`/`fdsc`/`gpmd`) can't be processed but can be extracted to separate files.
- **Multiple instances** is experimental (Electron limitation).
- **Very large files (>10 GB)** may appear stuck at ~100% for several minutes during merge/cut — wait, or enable **MOV Faststart**.
- You **cannot overwrite the input file** in place (forbidden by design); you can export and auto‑delete the input.

---

## 16. Frequently Asked Questions

**Q: Is there a keyboard shortcut for X?**
Check the Keyboard shortcuts dialog (<kbd>Shift</kbd>+<kbd>/</kbd>) first; any action can be bound to a key.

**Q: Can I edit multiple files in one timeline?**
No. LosslessCut is not a non‑linear editor. Edit multiple files in separate passes (see [the multi‑pass recipes](#11-recipes)).

**Q: Can it crop, resize, add text, change volume, create GIFs, burn subtitles, or re‑encode?**
No — those are *lossy* operations requiring a re‑encode, which is outside LosslessCut's core purpose. Use a tool like HandBrake.

**Q: Can I batch the same operation over many files?**
Not directly inside the app — copy the command from **Last ffmpeg commands** into a script (see [Batch processing](#10-batch-processing-with-ffmpeg)).

**Q: Can I export and replace the input file in place?**
No, but you can export and automatically delete the input.

**Q: What are the `.llc` files that appear?**
They save your segments so you can resume editing later. Disable them in settings if you don't want them.

**Q: Is LosslessCut a portable app?**
No. See [where settings are stored](#24-where-settings-and-files-are-stored) for semi‑portable setups.

**Q: How do I uninstall it?**
Delete the folder you extracted. To also remove settings/logs/caches, delete the `appData` folder.

**Q: Why is some UI text in English even though I picked another language?**
That text may not be translated yet. You can contribute translations via Weblate.

**Q: How do I make the app completely offline?**
Launch with `--disable-networking`.

**Q: Where can I get help?**
Search [existing issues](https://github.com/mifi/lossless-cut/issues), ask in [Discussions](https://github.com/mifi/lossless-cut/discussions), or join the [Discord](https://discord.gg/fhnEREfUJ3).

---

_Generated June 2026 from mifi/lossless-cut at 260605a. AI-generated documentation. The library is checked by sampling (three repositories so far); this guide was not individually reviewed. Verify against the project before relying on it. Unofficial; not affiliated with or reviewed by the project._
