This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -32,7 +31,7 @@ The main feature is lossless trimming and cutting of video and audio files, whic
- Remove unneeded tracks
- Replace or re-encode only some tracks
- Extract all tracks from a file (extract video, audio, subtitle, attachments and other tracks from one file into separate files)
-Batch view for fast multi-file workflow (note: no mass export yet)
-Fast multi-file workflow (note: no mass/batch export yet)
- Keyboard shortcut workflow
- Losslessly remux video/audio into a different container (file) format
- Take full-resolution snapshots from videos in JPEG/PNG format (low or high quality)
Expand All
@@ -57,7 +56,8 @@ The main feature is lossless trimming and cutting of video and audio files, whic
- Customizable keyboard hotkeys
- Black scene detection, silent audio detection, and scene change detection
- Divide timeline into segments with length L or into N segments or even randomized segments!
-[Basic CLI support](cli.md)
- Speed up / slow down video or audio file ([changing FPS](https://github.com/mifi/lossless-cut/issues/1712))
- Basic [CLI](cli.md) and [HTTP API](api.md)
## Example lossless use cases
Expand All
@@ -83,6 +83,7 @@ The main feature is lossless trimming and cutting of video and audio files, whic
- Losslessly split a video into one file per scene (note you probably have to shift segments, see [#330](https://github.com/mifi/lossless-cut/issues/330).)
- Cut away silent parts of an audio/video
- Split video into segments to for example respect Twitter's 140 second limit
- Annotate each segment with one or more tags, then use those tags to organize your segments or use it to create an output folder structure or hierarchy for your segments.
### Export cut times as YouTube Chapters
1. Export with Merge and "Create chapters from merged segments" enabled
Expand All
@@ -102,7 +103,7 @@ First export each track as individual files. Then use Handbrake or similar to re
## Download
If you want to support my continued work on LosslessCut, and you want the advantage of a secure and simple installation process with automatic updates, consider getting it from your favorite store:
If you want to support my continued work on LosslessCut, and you want the advantage of a secure and simple installation process with automatic, stable updates, consider getting it from your favorite store:
@@ -112,28 +113,26 @@ For Linux these are some alternatives:
If you prefer to download the executables manually, this will of course always be free:
- Mac OS X: [Intel DMG](https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-mac-x64.dmg) / [Apple Silicon DMG](https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-mac-arm64.dmg)
- Mac OS X: [Intel DMG](https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-mac-x64.dmg) / [Apple Silicon DMG](https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-mac-arm64.dmg) (note that universal.pkg **does not work**)
- Windows: [7zip](https://github.com/mifi/lossless-cut/releases/latest/download/LosslessCut-win-x64.7z) (Windows 7, 8 and 8.1 is **no longer supported** after [v3.50.0](https://github.com/mifi/lossless-cut/releases/tag/v3.50.0))
-[More releases](https://github.com/mifi/lossless-cut/releases) (note that APPX for Windows and PKG for MacOS **do not work**)
If you find LosslessCut useful, I'm very thankful for [donations](https://github.com/mifi/lossless-cut#donate-).
### Difference between App Stores and GitHub download
If you find LosslessCut useful, I'm very thankful for [your support](https://github.com/mifi/lossless-cut#donate-).
They have exactly the same in-app features, except for a few platform limitations. Apple doesn't allow opening VOB files with App Store apps. Apple App Store apps need to prompt for output directory. LosslessCut version in the App Stores is a few versions behind the GitHub version, because I want to be sure that the new versions work perfectly before releasing in the App Stores. GitHub version can contain new, untested features and may contain some bugs. I consider the newest GitHub versions to be a public "beta" test.
**What's the difference between App Storesand GitHub download?**[Please see FAQ](issues.md#app-stores-and-github-difference)
### Nightly builds 🧪
If you want to test the very latest and greatest bleeding-edge version. 1. Go to [Actions](https://github.com/mifi/lossless-cut/actions/workflows/build.yml), 2. click on the latest *Build/release*, 3. scroll all the way down to *Artifacts*. **Note:** these builds may be totally broken!
Since LosslessCut is based on Chromium and uses the HTML5 video player, not all FFmpeg supported formats will be supported smoothly.
The following formats/codecs should generally work: MP4, MOV, WebM, MKV, OGG, WAV, MP3, AAC, H264, Theora, VP8, VP9
For more information about supported formats / codecs, see https://www.chromium.org/audio-video.
LosslessCut uses Chromium's HTML5 video player, and not all FFmpeg supported formats and codecs are natively supported. Generally, the following formats should work: `MP4`, `MOV`, `WebM`, `Matroska`, `OGG` and `WAV`. The following audio codecs: `FLAC`, `MP3`, `Opus`, `PCM`, `Vorbis` and `AAC`. Video codecs: `H264`, `AV1`, `Theora`, `VP8`, `VP9` and `H265` (needs hardware decoder). More information about [Chromium supported formats / codecs](https://www.chromium.org/audio-video). [What's the difference between a codec and a format?](./issues.md#primer-video--audio-formats-vs-codecs)
Unsupported files can still be converted to a supported format/codec from the `File` menu. (Try the "fastest" option first.) A low quality version of the file (with/without audio) will then be created and opened in the player. The actual cut/export operation will still be performed on the original file, so it will be lossless. This allows for potentially opening any file that FFmpeg is able to decode.
Codecs and formats not listed above can still be converted to a supported format/codec from the `File` menu. (Try the `fastest` option first.) A low quality version of the file (with/without audio) will then be created and opened in the player. The actual cut/export operation will still be performed on the original file, so it will be lossless. This allows for potentially opening any file that FFmpeg is able to decode.
## Video demos
Expand DownExpand Up
@@ -162,16 +161,18 @@ Unsupported files can still be converted to a supported format/codec from the `F
- Press the **Camera** button (or <kbd>C</kbd>) if you want to take a JPEG/PNG snapshot from the current time
- If you want to move the original file to trash, press the **trash** button
- For best results you may need to trial and error with another output format (Matroska takes nearly everything), change keyframe cut mode or disable some tracks (see [known issues](issues.md)).
- Press <kbd>H</kbd> to view help and all keyboard shortcuts.
- Press <kbd>SHIFT</kbd> + <kbd>/</kbd> to view all keyboard & mouse shortcuts.
-**Note:** The original video file will not be modified. Instead, a file is created file in the same directory as the original file with from/to timestamps in the file name.
## [Import / export](import-export.md)
## [Command line interface (CLI)](cli.md)
## [Command line interface (CLI)](cli.md) & [HTTP API](api.md)
- Are you using LosslessCut for some interesting project and want your link here? Reach out!
<imgsrc="https://api.star-history.com/svg?repos=mifi/lossless-cut&type=Date"alt="Star History Chart"width="400px" />
## Attributions
- App icon made by [Dimi Kazak](http://www.flaticon.com/authors/dimi-kazak"Dimi Kazak") from [www.flaticon.com](http://www.flaticon.com"Flaticon") is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/"Creative Commons BY 3.0")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LosslessCut can be controlled via a HTTP API, if it is being run with the command line option `--http-api`. See also [CLI](./cli.md). **Note that the HTTP API is experimental and may change at any time.**
## Programmatically opening a file
This must be done with [the CLI](./cli.md).
## Enabling the API
```bash
LosslessCut --http-api
```
## API endpoints
### `POST /api/shortcuts/action`
Execute a keyboard shortcut `action`, similar to the `--keyboard-action` CLI option. This is different from the CLI in that most of the actions will wait for the action to finish before responding to the HTTP request (but not all).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LosslessCut has limited support for automation through the CLI. Note that these examples assume that you have set up LosslessCut in your `PATH` environment. Alternatively you can run it like this:
LosslessCut has basic support for automation through the CLI. See also [HTTP API](./api.md).
```bash
LosslessCut [options] [files]
```
Note that these examples assume that you have set up the LosslessCut executable to be available in your `PATH` (command line environment). Alternatively you can run it like this:
```bash
# First navigate to the folder containing the LosslessCut app
See [available settings](https://github.com/mifi/lossless-cut/blob/master/public/configStore.js). Note that this is subject to change in newer versions. ⚠️ If you specify incorrect values it could corrupt your configuration file. You may use JSON or JSON5:
See [available settings](https://github.com/mifi/lossless-cut/blob/master/src/main/configStore.ts). Note that this is subject to change in newer versions. ⚠️ If you specify incorrect values it could corrupt your configuration file. You may use JSON or JSON5. Example:
-`--locales-path` Customise path to locales (useful for [translators](./translation.md)).
-`--disable-networking` Turn off all network requests.
-`--http-api` Start the [HTTP server with an API](./api.md) to control LosslessCut, optionally specifying a port (default `8080`).
-`--keyboard-action` Run a keyboard action (see below.)
-`--config-dir` Path to a directory where the `config.json` file will be stored and loaded from.
## Controlling a running instance (experimental)
If you have the "Allow multiple instances" setting enabled, you can control a running instance of LosslessCut from the outside, using for example a command line. You do this by issuing messages to it through the `LosslessCut` command. Currently only keyboard actions are supported, and you can open files. *Note that this is considered experimental and the API may change at any time.*
### Keyboard actions, `--keyboard-action`
Simulate a keyboard press action in an already running instance of LosslessCut. Note that the command will return immediately, so if you want to run multiple actions in a sequence, you have to `sleep` for a few seconds between the commands. Alternatively if you want to wait until an action has finished processing, you can use the [HTTP API](./api.md) instead. Note that the HTTP API does not support opening files, and it is currently not possible to wait for a file to have finished opening.
### Available keyboard actions
A list of the available action names can be found in the "Keyboard shortcuts" dialog in the app. Note that you don't have to bind them to any key before using them.
Example:
```bash
# Open a file in an already running instance
LosslessCut file.mp4
sleep 3 # hopefully the file has loaded by now
# Export the currently opened file
LosslessCut --keyboard-action export
```
### Open files in running instance
By default, only a single running instance of LosslessCut is allowed. If you start a new LosslessCut instance from the command line, it will instead pass the list of files onto the already running instance. You can override this behavior by passing this option via the CLI:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You are welcome to help translate the app at [Weblate](https://hosted.weblate.org/projects/losslesscut/losslesscut/). Weblate will automatically push translations as a Pull Request in this repo, but this PR is not merged immediately by maintainers.
Master language is english.
### Testing translations locally
To test new weblate translations you made in the app itself, you need to:
1. Download the translation for your language from Weblate: **Files -> Download translation**
2. Rename the downloaded `.json` file to: `translation.json`
3. Create a [folder structure](https://github.com/mifi/lossless-cut/tree/master/public/locales) somewhere on your computer that looks like this:
```
translations/locales/localeCode
```
You can find a list of the available [`localeCode`s here](https://github.com/mifi/lossless-cut/tree/master/public/locales). In our example we will use `nb_NO` (Norwegian) with this path:
```
/Users/mifi/Desktop/translations/locales/nb_NO
```
4. Now move your `translation.json` file into the folder:
5. Now run LosslessCut from the [command line](cli.md), with the special command line argument `--locales-path`. Use the path to the **folder containing the locales folder**, e.g.:
Windows store version is built as a Desktop Bridge app (with `runFullTrust` capability). This means the app has access to essentially everything the user has access to, and even `internetClient` is redundant.
Expand All
@@ -106,13 +66,23 @@ For per-platform build/signing setup, see [this article](https://mifi.no/blog/au
### Release new version
- Commit changes
- If Mac App Store / Windows Store
- Checkout branch `stores`
- Merge `master` into `stores`
-`npm version ...`
-`git push && git push --tags`
-`git push --follow-tags`
- Wait for build and draft in Github actions
- Release draft at github
- Open draft in github and add Release notes
- For files `LosslessCut-mac-universal.pkg` and `LosslessCut-win-x64.appx` add prefix `-DO-NOT-DOWNLOAD`
- If intended as Github, release the draft
- If store-only release, release the draft as **pre-release**
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LosslessCut has support for normal JavaScript expressions. You will be given a variable `segment` and can create an expression that returns `true` or `false`. For example to select all segments with a duration of less than 5 seconds use this expression:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When exporting multiple segments as separate files, LosslessCut offers you the ability to specify how the output files will be named in sequence. The following variables are available to customize the filenames:
When exporting multiple segments as separate files, LosslessCut offers you the ability to specify how the output files will be named in sequence using a *template string*. The template string is evaluated as a [JavaScript template string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals), so you can use JavaScript syntax inside of it. The following variables are available in the template to customize the filenames:
| Variable | Output |
| -------------- | - |
| `${FILENAME}` | The original filename without the extension (e.g. `Beach Trip` for a file named `Beach Trip.mp4`)
| `${EXT}` | The extension of the file (e.g.: `.mp4`, `.mkv`)
| `${SEG_NUM}` | Number of the segment (e.g. `1`, `2` or `3`)
| `${SEG_LABEL}` | The label of the segment (e.g. `Getting_Lunch`)
| `${SEG_SUFFIX}` | If a label exists for this segment, the label will be used, prepended by `-`. Otherwise, the segment number prepended by `-seg` will be used (e.g. `-Getting_Lunch`, `-seg1`)
| `${CUT_FROM}` | The timestamp for the beginning of the segment in `hh.mm.ss.sss` format (e.g. `00.00.27.184`)
| `${CUT_TO}` | The timestamp for the ending of the segment in `hh.mm.ss.sss` format (e.g. `00.00.28.000`)
| `${SEG_TAGS.XX}` | Allows you to retrieve the tags for a given segment by name. If a tag is called foo, it can be accessed with `${SEG_TAGS.foo}`
| `${FILENAME}` | The original filename *without the extension* (e.g. `Beach Trip` for a file named `Beach Trip.mp4`).
| `${EXT}` | The extension of the file (e.g.: `.mp4`, `.mkv`).
| `${SEG_NUM}` | Number of the segment, padded string (e.g. `01`, `02` or `42`).
| `${SEG_NUM_INT}` | Number of the segment, as a raw integer (e.g. `1`, `2` or `42`). Can be used with numeric arithmetics, e.g. `${SEG_NUM_INT+100}`.
| `${EPOCH_MS}` | Number of milliseconds since epoch (e.g. `1680852771465`).
| `${SEG_LABEL}` | The label of the segment (e.g. `Getting_Lunch`).
| `${SEG_SUFFIX}` | If a label exists for this segment, the label will be used, prepended by `-`. Otherwise, the segment number prepended by `-seg` will be used (e.g. `-Getting_Lunch`, `-seg1`).
| `${CUT_FROM}` | The timestamp for the beginning of the segment in `hh.mm.ss.sss` format (e.g. `00.00.27.184`).
| `${CUT_TO}` | The timestamp for the ending of the segment in `hh.mm.ss.sss` format (e.g. `00.00.28.000`).
| `${SEG_TAGS.XX}` | Allows you to retrieve the tags for a given segment by name. If a tag is called foo, it can be accessed with `${SEG_TAGS.foo}`. Note that if the tag does not exist, it will return the text `undefined`. You can work around this as follows: `${SEG_TAGS.foo ?? ''}`
Your files must always include at least one unique identifer (such as `${SEG_NUM}` or `${CUT_FROM}`), and they should end in `${EXT}` (or else players might not recognise the files). For instance, to achieve a filename sequence of `Beach Trip - 1.mp4`, `Beach Trip - 2.mp4`, `Beach Trip - 3.mp4`, your format should read `${FILENAME} - ${SEG_NUM}${EXT}`
Expand All
@@ -34,6 +36,10 @@ LosslessCut also allows importing/exporting your project (segments) in a variety
1234,,Last segment
```
### TSV
Same as CSV but `<tab>` instead.
### More formats?
See https://github.com/mifi/lossless-cut/issues/1340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Always open this dialog when opening multiple files": "Vis dette vindauga kvar gong du opnar fleire filer",
"An error has occurred.": "Eit mistak har hendt.",
"Are you sure you want to close the current file?": "Lat att noverande fil?",
"Are you sure you want to close the current file?": "Lat att den noverande fila?",
"Are you sure you want to quit?": "End appen?",
"Ask about what to do when opening a new file when another file is already already open?": "Spør om kva som skal verta gjort ved opning av ei ny fil når ei anna alt er open?",
"Ask before closing": "Spør før ending",
Expand All
@@ -29,7 +29,7 @@
"CUE files": "CUE-filer",
"CUE sheet file": "CUE-arkfil",
"Cancel": "Avbryt",
"Capture frame": "Tak bilete",
"Capture frame": "Ta biletet",
"Capture frame format": "Biletetaksformat",
"Change order of segment": "Brigd bitrekkjefylgd",
"Change rotation": "Snu",
Expand All
@@ -44,12 +44,12 @@
"Bind new key to action": "Bind ny tast til gjerda",
"Change segment order": "Brigd bitrekkjefylgd",
"Clear working directory": "Tøm verkamappa",
"Close file and clean up": "Steng fil og reins opp",
"Close file and clean up": "Steng fila og reins opp",
"Click to toggle track inclusion when exporting": "Klikk for å slå av/på medtaking av spor under utføring",
"Close current screen": "Steng denne visinga",
"Defaults to same format as input file. You can losslessly change the file format (container) of the file with this option. Not all formats support all codecs. Matroska/MP4/MOV support the most common codecs. Sometimes it's even impossible to export to the same output format as input.": "Forvalet vert satt til same format som gjeven fil. Du kan utan tap byta filformatet (karet) til fila med dette valet. Ikkje alle format stør alle omkodarar. Matroska/MP4/MOV stør dei mest nytta omkodarane. Nokre gongar er det jamvel umogleg å utføra i same format som vert mata inn.",
"Delete source file": "Slett kjeldefil",
"Depending on your specific file/player, you may have to try different options for best results.": "Ut ifrå kva for ein fil/avspelar du nyttar, kan ulike val gje deg betre verknadar.",
"Depending on your specific file/player, you may have to try different options for best results.": "Ut ifrå kva for ei fil/avspelar du nyttar, kan ulike val gje deg betre verknadar.",
"Create fixed duration segments": "Lag bitar med fast lengd",
"Are you sure?": "Er du viss?",
"Ask about chapters": "Spør om hovudbolkar",
Expand DownExpand Up
@@ -83,7 +83,7 @@
"Confirm quit": "Stadfest utgang",
"Convert current file to supported format": "Lag om noverande fil til eit stødd format",
"Convert to supported format": "Lag om til stødd format",
"Converting to supported format": "Omlagar til eit stødd format",
"Converting to supported format": "Lagar om til eit stødd format",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"View and edit segment tags in JSON5 format:": "Xem và chỉnh sửa các thẻ phân đoạn ở định dạng JSON5:",
"Whether or not to sanitize output file names (sanitizing removes special characters)": "Có hay không khử sạch tên tệp đầu ra (khử sạch xóa các ký tự đặc biệt)",
"You are running version {{version}}": "Bạn đang chạy phiên bản {{version}}"
"You are running version {{version}}": "Bạn đang chạy phiên bản {{version}}",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LosslessCut is based on Electron which routinely drops support for old OS versions, and therefore LosslessCut will also do so. [More info](https://github.com/mifi/lossless-cut/discussions/1476#discussioncomment-5012521).
- v3.58.0 [dropped support](https://www.electronjs.org/docs/latest/breaking-changes#removed-macos-1013--1014-support) for MacOS 10.14 and older.
- v3.52.0 dropped support for Windows 8.1 and older.
- v3.48.2 dropped support for MacOS 10.12 and older.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters