The swiss army knife of lossless video/audio editing
Docs: corrections from review
Claude23288e2f9e41
diff --git a/docs/cli.md b/docs/cli.mdindex 5e87ba67..4e24ecd4 100644--- a/docs/cli.md+++ b/docs/cli.md@@ -101,7 +101,7 @@ Instead, to create segments from a script, write a [project file](index.md#impor}```-Then open the file and export using `--keyboard-action export`, or better the [HTTP API](api.md), which waits for most actions to finish before responding. You can also open an `.llc` file directly: `LosslessCut /path/to/video-proj.llc`.+Then open the file and export it using `--keyboard-action export`, or better the [HTTP API](api.md), which waits for most actions to finish before responding. Note that by default `export` first opens the export options dialog, so either turn that dialog off (`--settings-json '{exportConfirmEnabled:false}'`) or send `export` twice. You can also open an `.llc` file directly (`LosslessCut /path/to/video-proj.llc`), see the [batch example](api.md#batch-example).### HTTP APIdiff --git a/docs/index.md b/docs/index.mdindex bf7c2c06..24ebbc71 100644--- a/docs/index.md+++ b/docs/index.md@@ -24,7 +24,7 @@ Please read the documentation before creating an issue. Thank you π- **A:** Because lossless cuts start from the keyframe before the cut point. See [Export starts a few seconds before my cut point](troubleshooting.md#export-starts-a-few-seconds-before-my-cut-point).- **Q:** File not supported, black preview or playback stutters?- **A:** See [Preview / playback problems](troubleshooting.md#preview--playback-problems). The preview does not affect the exported file.-- **Q:** My merged file only plays the first part, or later parts have only audio or are corrupt.+- **Q:** Why does my merged file only play the first part, or have later parts with only audio or corrupt video?- **A:** The files must have identical codec parameters. See [Merge / concat results in corrupt or broken parts](troubleshooting.md#merge--concat-results-in-corrupt-or-broken-parts).- **Q:** How can I export all segments with the same label into their own file, or quickly select many segments?- **A:** See [Export segments with the same label into their own file](recipes.md#export-segments-with-the-same-label-into-their-own-file).@@ -76,7 +76,7 @@ If you have a problem with the app or with a file, please see the [π€ Troubles- <kbd>BACKSPACE</kbd> to remove cutpoint/segment.- If you create segments without an end time, it is a [marker](#markers) instead of a segment.- Note that when exporting, all segments you create will be **preserved** and exported as new files. You can change this behavior with the **Yin Yang** symbol β―οΈ, in which case the behaviour is inverted and LosslessCut will instead **skip** all selected segments and export the parts **between** segments as files.- - Also note that start times will not be accurate, see [Known issues](troubleshooting.md#export-starts-a-few-seconds-before-my-cut-point).+ - Also note that start times will not be accurate, see [Export starts a few seconds before my cut point](troubleshooting.md#export-starts-a-few-seconds-before-my-cut-point).- *(optional)* <kbd>+</kbd> to add another segment at the current cursor time. Then select the segment end time with <kbd>O</kbd>.- *(optional)* If you want to merge all the selected segments into one file after cutting, change the `Export mode` from `Separate files` to `Merge cuts`.- *(optional)* If you want to export to a certain output folder, press the `Working dir unset` button (defaults to same folder as source file).diff --git a/docs/recipes.md b/docs/recipes.mdindex 7105582d..3f8ce4a1 100644--- a/docs/recipes.md+++ b/docs/recipes.md@@ -75,6 +75,6 @@ For example you have labelled segments `Sound Bite`, `Interview` etc. and you wa1. Right click a segment in the segment list -> *Deselect all segments*.2. Right click a segment -> *Select segments by label* and enter the label, e.g. `Sound Bite`. Or use *Select segments by expression* with e.g. `segment.label === 'Sound Bite'` (see [expressions](expressions.md#select-segments-by-expression)).3. Set export mode to *Merge cuts* (or *Separate files* if you want one file per segment) and export. Only the selected segments are exported.-4. Repeat from step 1 for each label. Include the label in the [output file name template](file-name-template.md) so that each run gets a different file name, e.g. `${SEG_LABEL[0]}` when merging (it's an array of the merged segments' labels).+4. Repeat from step 1 for each label. To tell the files apart, include the label in the [output file name template](file-name-template.md): `${SEG_LABEL[0]}` in *Merge cuts* mode (an array of the merged segments' labels), or `${SEG_LABEL}` in *Separate files* mode (a string). If only one segment has a label, it's exported as a separate file even in *Merge cuts* mode.-Note that the selection is *added* to the existing selection, which is why you deselect all first. To do this faster, bind `deselectAllSegments`, `selectSegmentsByLabel` and `selectSegmentsByExpr` to keys in the Keyboard shortcuts dialog. See also [Efficient workflow for repeated single file operation](#efficient-workflow-for-repeated-single-file-operation).+Note that the selection is *added* to the existing selection, which is why you deselect all first. To do this faster, bind `deselectAllSegments`, `selectSegmentsByLabel` and `selectSegmentsByExpr` to keys in *Help* -> *Keyboard & mouse shortcuts*. See also [Efficient workflow for repeated single file operation](#efficient-workflow-for-repeated-single-file-operation).diff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex 1a35a80e..8d0d96dd 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -29,7 +29,7 @@ Each segment's *start cut time* will normally (but not always) be "rounded" to tThis is expected with lossless cutting, and it applies to both *Separate files* and *Merge cuts*. Video is stored as *keyframes* (complete pictures) followed by frames that only store the changes since the previous frame. A lossless cut cannot start on a non-keyframe, so with *Keyframe cut mode* enabled (the default), LosslessCut starts the cut from the nearest keyframe **before** your start cutpoint. If the file has few keyframes (e.g. one every 5-10 seconds), the export may start several seconds early.What you can do:-- **Place your start cutpoints on keyframes.** Keyframes are shown as vertical lines on the timeline (zoom in to see them). Use the *Seek previous keyframe* / *Seek next keyframe* buttons in the bottom bar, the keyboard shortcuts <kbd>ALT</kbd>+<kbd>β</kbd> / <kbd>ALT</kbd>+<kbd>β</kbd>, or hold <kbd>SHIFT</kbd> while scrolling the mouse wheel to jump between keyframes, then press <kbd>I</kbd>. To move existing segments, use *Segments* -> *Align segment times to keyframes*.+- **Place your start cutpoints on (or a few frames after) a keyframe.** Keyframes are shown as vertical lines on the timeline (zoom in to see them). Use the *Seek previous keyframe* / *Seek next keyframe* buttons in the bottom bar, the keyboard shortcuts <kbd>ALT</kbd>+<kbd>β</kbd> / <kbd>ALT</kbd>+<kbd>β</kbd>, or hold <kbd>SHIFT</kbd> while scrolling the mouse wheel over the timeline to jump between keyframes, then press <kbd>I</kbd>. To move existing segments, use *Segments* -> *Align segment times to keyframes*. If the export still starts from the keyframe before, see [Cut starts from wrong keyframe](#cut-starts-from-wrong-keyframe).- **Try Smart cut** (*Smart cut (experimental)* in the *Export options* dialog). It re-encodes only the part from the cutpoint to the next keyframe. It does not work for all files, see [Smart cut not working](#smart-cut-not-working).- **Re-encode** the file (or just that part) with a different tool. Frame accurate cuts at any position are not possible without re-encoding.@@ -58,7 +58,7 @@ If you are trying to cut a FLAC file but your output has the same duration as in## Merge / concat results in corrupt or broken parts-Typical symptoms: the merged file plays only the first part, later parts have only audio (no video), or are corrupt/glitchy. This can happen when trying to merge files that are not compatible. Make sure they have the exact same codec parameters (codec, resolution, frame rate, audio sample rate, channels etc.) before merging. Enable *Check compatibility* in the *Merge/concatenate files* dialog, and LosslessCut will warn you if it detects a mismatch between the files. Files from the same camera/app with the same settings usually work. If you are sure they are the same, you can try to first running each of the files separately through LosslessCut before merging the outputs:+Typical symptoms: the merged file plays only the first part, later parts have only audio (no video), or are corrupt/glitchy. This can happen when trying to merge files that are not compatible. Make sure they have the exact same codec parameters (codec, resolution, pixel format, profile, frame rate, audio format, sample rate, channels etc.) before merging. Enable *Check compatibility* in the *Merge/concatenate files* dialog to have LosslessCut warn you about many (but not all) mismatches. Files from the same camera/app with the same settings usually work. If you are sure they are the same, you can try to first running each of the files separately through LosslessCut before merging the outputs:1. First open each file separately and just export without cutting anything, but before exporting- change the format to `mp4` is [known to fix certain issues like `Non-monotonous DTS in output stream`](https://github.com/mifi/lossless-cut/issues/1713#issuecomment-1726325218)- change the format to TS (`mpegts`) is [known to give the files a common timebase](https://github.com/mifi/lossless-cut/issues/455), which sometimes makes it possible to merge them, or fixes incorrect output duration, sped up or slowed down segments.@@ -107,7 +107,7 @@ Some formats or codecs are not natively supported by LosslessCut's built in play### Playback stutters or is slow-LosslessCut's player is the same as Chrome's (Chromium), so files that Chrome cannot play smoothly will have the same problem. If the *FFmpeg-assisted playback* label is shown on top of the video, the preview is being decoded by FFmpeg in software, which can be slow for large or high resolution files. Click the quality label next to it to switch between `HD`, `SD` (lower resolution and frame rate, smoother) and `OG` (original). For a smoother preview, use *File* -> *Convert to supported format* and choose one of the slower (encode) options. None of this affects the export. For H265/HEVC files, also try toggling *Enable HEVC / H265 hardware decoding* in Settings, and see [Windows specific issues](#windows-specific-issues) if you have an NVIDIA GPU.+LosslessCut's player is the same as Chrome's (Chromium), so files that Chrome cannot play smoothly will have the same problem. If the *FFmpeg-assisted playback* label is shown on top of the video, the preview is being decoded by FFmpeg in software, which can be slow for large or high resolution files. Click the quality label next to it to switch between `HD`, `SD` (lower resolution and frame rate, faster to decode) and `OG` (original resolution and frame rate, slowest). For a smoother preview, use *File* -> *Convert to supported format* and choose one of the slower (encode) options. None of this affects the export. For H265/HEVC files, also try toggling *Enable HEVC / H265 hardware decoding* in Settings (*Show advanced settings*), and see [Windows specific issues](#windows-specific-issues) if you have an NVIDIA GPU.### Auto convert to supported format on certain timestamp