The swiss army knife of lossless video/audio editing
Recipe cookbook 📝
Here you can find many common use cases that can help you effectivize your workflow. 🏎️
You can often bind actions to hotkeys to make it faster. ⌨️
Export cut times as YouTube Chapters ▶️
- Export with Merge and "Create chapters from merged segments" enabled.
- Open the exported file and select "Import chapters" in the dialog.
- File -> Export project -> YouTube Chapters.
Re-encode only the audio track, keeping the lossless video track 🔊
- Export each video/audio track to individual files.
- Use Handbrake or similar to re-encode the audio file (if MP4/MOV file, encode it as AAC.)
- Open the extracted video stream in LosslessCut. The open your encoded audio file and select "Include all tracks from the new file".
- Export.
Advanced multi-step workflows 🔢
Use LosslessCut in multiple passes in order to achieve separate trimming of individual tracks:
- Open a file an export all tracks as individual files.
- Open the exported track files independently and cut them as desired.
- Add the track back to the video and combine them to one output video.
Cut multiple files and merge them all
See also #2631.
- Drag-drop source files (from the same camera/source) into losslesscut to open them in the batch list.
- Sort them as needed.
- Open the first file and edit it as needed.
- Open the export options dialog.
- Open "Output file names", edit the template and set it to e.g.:
my-movie-all-segments-${String(EXPORT_COUNT).padStart(3, '0')}-${String(SEG_NUM_INT).padStart(3, '0')}${EXT}- This will make sure that output file names will be created in the order of export and order of segment, e.g.:
my-movie-all-segments-001-001.mp4
- Export.
- Now open each of the rest of the files in the batch list in the order that you want them, edit and export.
- Once done exporting all, close the batch list.
- You will have a folder with all the ordered segments, now drag drop them into LosslessCut and sort by name in the batch list.
- Merge
Export all keyframes as images
- Segments -> Create segments from keyframes
- Right click on a segment in the segment list
- Edit segments by expression
- Convert segments to markers
- OK
- Right click on a segment in the segment list
- Extract frames from selected segments as image files
See also #2692.
Efficient workflow for repeated single file operation
If you need to e.g. always select certain tracks, then always select certain segments.
- Run ⌨️
toggleStripAllto deselect all tracks - (Only once:) Click "Filter tracks" (top left), enter the expression:
track.codec_type === 'video' || track.codec_type === 'audio' - Run ⌨️
toggleStripCurrentFilterto select only audio and video tracks - Run ⌨️
deselectAllSegmentsto deselect all segments - Run ⌨️
selectSegmentsByExpr - Paste the expression
segment.label === 'My label' && segment.duration < 5(from your clipboard) - Press Enter
- ⌨️
export
Now for every file you want to do this, you repeat the steps. See also #2699.
Export segments with the same label into their own file
For example you have labelled segments Sound Bite, Interview etc. and you want one merged file per label.
- Right click a segment in the segment list -> Deselect all segments.
- 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). - Set export mode to Merge cuts (or Separate files if you want one file per segment) and export. Only the selected segments are exported.
- Repeat from step 1 for each label. To tell the files apart, include the label in the output file name template:
${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 Help -> Keyboard & mouse shortcuts. See also Efficient workflow for repeated single file operation.