← Back to context

Comment by hn_submit

17 hours ago

I've supported OpenShot financially in the past, but I'm currently leaning towards LosslessCut and Shortcut.

Most people want a video editor to splice and concatenate video files without any loss or transcoding. I believe this behavior (lossless) should be default on all of these editors.

> Most people want a video editor to splice and concatenate video files without any loss or transcoding

You can do this with mpv. It's an open source cross platform media player.

For example, here's how I set up a tiny Lua script extension[0] to be able to visually cut videos in an intuitive way. It does it in seconds without re-rendering the video by shelling out to ffmpeg.

Years ago I did the same thing with a shell script CLI tool[1], but mpv's visual aspect makes it so much faster and easier to make clips out of a longer video.

[0]: https://nickjanetakis.com/blog/visually-create-video-clips-w...

[1]: https://nickjanetakis.com/blog/create-video-clips-with-ffmpe...

You have to make a lot of sacrifices for lossless editing, so it’ll probably always be a specialized app or at least a separate tool within an all-purpose NLE. For instance, you’re limited to compatible input streams and you can only cut on specific intervals, depending on encoder settings etc.

I guess an NLE could import clips in a locked mode by default that only supports lossless operations, and you’d have to specifically enable the rest. Could be interesting.

  • Note on the specific intervals: that's where the clever optimization comes in: leave as-is (passthrough) all not affected sections of the video (basically everything) and only recode the tiny fraction that needs recoding due to the cut being set on a non-keyframe.

    That one, I do believe should get more research and implementations. Currently I only know of LosslessCut's "Smart" mode, but I'd like to see other big players of the video editing space improving the state of the art in that direction for simple cuts.

    • I wonder, rather than re-encoding when starting on a B- or P- frame, could you preserve the entire GOP losslessly but make the earlier content "disappear" on playback by shifting PTS, or bundling several frames into a single frame's payload? Maybe it causes too many problems with players.

      1 reply →

LosslessCut is great, but I've had issues with the final export like timing being off, having cut sequence etc. I think it is very particular about encoding/container.

Shotcut is my default video editor, if anyone's trying it on Linux please use their AppImage as it solved most of my headaches when I was using Flatpak version.

  • If it's lossless, it may change the cut position to enable lossless. If you want cut at an exact place, then all apps need to re-encode which will never be lossless.

    For your particular requirement, you can't get lossless quality all the time by any software.

    • LosslessCut gives you the option to cut at the nearest keyframe, or to re-encode the small portion from the chosen timestamp to the next key frame (at most a few seconds). Sounds lossless enough to me.

For that kind of functionality, I would always recommend Avidemux[0]. It's quite a light package (which I like), and it allows you to do that and some other useful things too.

[0] http://fixounet.free.fr/avidemux/