LosslessCut is a lifesaver for cutting segments out of my usually-unedited podcast[1].
The workflow to do a minor edit in a full editor like Final Cut Pro looks roughly like:
- open Final Cut Pro
- create a new proj... oh shoot no, a new library? Yeah that's right.
- click import and track down the videos on my hard drive
- now create a new project and drag the videos into the timeline
- use the blade tool to cut out a segment
- export the video which is... uh... oh yes under the share menu bar and then the format needs to be... hmmm... I think export for YouTube
- wait approximately `videoLength/5` for the video to export
- oh my goodness my hard drive somehow has `videoSize*4` less space
In LosslessCut that workflow looks like:
- open LosslessCut[2]
- drag and drop your videos in
- mark the start and end times of either the segments you want to keep or the ones you want to take out
- hit export and... wow, it's already done? How is that possible?! And it's just in the same format as my source video! Perfect. Oh man and it even saved a little xml file so if I happen to open the same file again I haven't lost my human work of marking the in and out points.
The cuts are usually slightly off from where I'd ideally like them to be, I think because LosslessCut can only cut on i-frames[3], but it's a totally fair tradeoff for my use case.
I liked the minimalist editor interface so much I copied the timeline part of it for a dedicated social media video clipper I'm working on[4].
If you'd like to try it out I strongly suggest installing it from GitHub and donating the amount you would've spent in the macOS app store. The macOS app store version has fewer disk permissions and adds an extra step asking for access to each folder you want to edit in.
1. makers.dev
2. frustratingly, right clicking a video and selecting "open in LosslessCut" doesn't work
3. i-frames in most video codecs are "key frames" that repaint the entire frame. Most frames are p-frames or "predicted frames" which just store a delta from the last frame.
> The cuts are usually slightly off from where I'd ideally like them to be, I think because LosslessCut can only cut on i-frames[3], but it's a totally fair tradeoff for my use case.
There is an experimental "smart cut" mode where it re-encodes the video between your cut and the next keyframe. It will of course not be entirely lossless though
> The cuts are usually slightly off from where I'd ideally like them to be
That is (probably) because the editor uses certain marks in the video (I don't remember how they are called) that "group" the frames together, and you can't use simple editors to re encode the video.
I had this issue some time I tried to cut videos from my gf. Then I moved to ShotCut, that cuts the videos exactly where you want, although the walkthrough is a little longer.
"“lossless” in Shotcut export does not imply the image goes through the engine untouched. It simply means that the codec is lossless or in lossless mode. The engine does not support every pixel format and color space in existence – only a few. Often sources get converted going through the engine. In your case, the source is RGB, but the engine defaults to yuv422 unless it has an mlt_image_format specified in Export > Other. For your 6SrK4.mp4, you would need mlt_image_format=rgb24 Also, in order to avoid image changes, you must use a Video Mode that matches the source and must not use any effecs (multiple video tracks, transitions, filters). (A mismatching video mode can cause automatic deinterlace, colorspace conversion, scaling, and padding)."
–source: https://forum.shotcut.org/t/lossless-annoyances/18344
Right, it will (by default) align the cut to the nearest I frame, which allows the cut to be "lossless." Doing the cut anywhere else requires re-encoding part of the video.
The workflow to do a minor edit in a full editor like Final Cut Pro looks roughly like:
- open Final Cut Pro
- create a new proj... oh shoot no, a new library? Yeah that's right.
- click import and track down the videos on my hard drive
- now create a new project and drag the videos into the timeline
- use the blade tool to cut out a segment
- export the video which is... uh... oh yes under the share menu bar and then the format needs to be... hmmm... I think export for YouTube
- wait approximately `videoLength/5` for the video to export
- oh my goodness my hard drive somehow has `videoSize*4` less space
In LosslessCut that workflow looks like:
- open LosslessCut[2]
- drag and drop your videos in
- mark the start and end times of either the segments you want to keep or the ones you want to take out
- hit export and... wow, it's already done? How is that possible?! And it's just in the same format as my source video! Perfect. Oh man and it even saved a little xml file so if I happen to open the same file again I haven't lost my human work of marking the in and out points.
The cuts are usually slightly off from where I'd ideally like them to be, I think because LosslessCut can only cut on i-frames[3], but it's a totally fair tradeoff for my use case.
I liked the minimalist editor interface so much I copied the timeline part of it for a dedicated social media video clipper I'm working on[4].
If you'd like to try it out I strongly suggest installing it from GitHub and donating the amount you would've spent in the macOS app store. The macOS app store version has fewer disk permissions and adds an extra step asking for access to each folder you want to edit in.
1. makers.dev
2. frustratingly, right clicking a video and selecting "open in LosslessCut" doesn't work
3. i-frames in most video codecs are "key frames" that repaint the entire frame. Most frames are p-frames or "predicted frames" which just store a delta from the last frame.
4. thevideoclipper.com