LosslessCut, the Swiss army knife for lossless video and audio editing

https://ubunlog.com/en/losslesscut-swiss-army-knife-lossless-audio-video-edition

198 points · 26 comments · view on lemmy.world

26 Comments

aBundleOfFerrets@sh.itjust.works · 70 pts · 2y (3 replies)

The swiss army knife for lossless video and audio editing is ffmpeg

aleph@lemm.ee · 83 pts · 2y (2 replies)

And LosslessCut is a ffmpeg frontend, so that checks out.

brbposting@sh.itjust.works · 29 pts · 2y

Neat, love me a GUI

Shyfer@ttrpg.network · 6 pts · 2y

Oh hell ya. I won't have to Google to find the specific ffmpeg command I need anymore with this?

xapr@lemmy.sdf.org · 8 pts · 2y

I've been using LosslessCut for a few years now. It's really easy and smooth. It does exactly what I want and what the name says, and I couldn't ask for more.

JustUseMint@lemmy.world · 6 pts · 2y

I'll never need this but I want to hoard all FOSS software regardless

fmstrat@lemmy.nowsci.com · 4 pts · 2y (3 replies)

Or Shotcut, which can trim and so much more?

I mean, they all use ffmpeg.

MangoPenguin@lemmy.blahaj.zone · 3 pts · 2y (1 reply)

It can trim without re-encode? I always thought it was more like a standard NLE.

gila@lemm.ee · 1 pts · 2y

It's a slightly different use case, I default to Losslesscut and switch to Shotcut when I need a vfilter or if I'm just generally willing to concede to making a lossy cut.

Shotcut is way more flexible but I can make a quick clip in Losslesscut with probably 1/3 the number of user effort/inputs. Let alone trying to remember every ffmpeg parameter under the sun just to get consistent usable output

theamigan@lemmy.dynatron.me · 4 pts · 2y (4 replies)

lol@typescript and appImage. Yuck. Just use mpv to find cutpoints and man ffmpeg

ryannathans@aussie.zone · 9 pts · 2y (1 reply)

What did ffplay do to you

theamigan@lemmy.dynatron.me · 3 pts · 2y

Nothing, I just never think to use it since mpv has more features for general use.

mranderson17@infosec.pub · 2 pts · 2y (1 reply)
PipedLinkBot@feddit.rocks · 3 pts · 2y

Here is an alternative Piped link(s):

https://piped.video/watch?v=9kaIXkImCAM

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

nutbutter@discuss.tchncs.de · 4 pts · 2y (9 replies)

It is a good tool, but for me it only trims from the keyframes. To trim precisely, it has to re-encode, which, unfortunately, does not work on my machine for some reason. So, I just stick to ffmpeg cli.

eceforge@iusearchlinux.fyi · 12 pts · 2y (6 replies)

I suppose that makes sense given that information is encoded as a series of key frames interspersed by 'I-frames" that simply encode the delta to the previous key-frame when using most compressed video algorithms. So cutting in-between key-frames doesn't really make sense since the I-frame would no longer have anything to reference it's delta to.

ryannathans@aussie.zone · 2 pts · 2y (3 replies)

Except if it's lossless so there's no harm in reencoding to accurately clip files

mudeth@lemmy.ca · 3 pts · 2y (2 replies)

You're confusing cause and effect. It's lossless because it cuts at keyframes and does not re-encode.

If it did what you're suggesting it wouldn't be lossless anymore.

ryannathans@aussie.zone · 0 pts · 2y (1 reply)

Lossless codecs can be decoded and reencoded without effect

mudeth@lemmy.ca · 2 pts · 2y

LosslessCut doesn't only use lossless codecs. It losslessly cuts video files encoded in lossy codecs.

Hadriscus@lemm.ee · 1 pts · 2y (1 reply)

This has always bothered me, I suspect it's the same underlying reason most video players can't do reverse frame-by-frame. But Quicktime allowed it twenty years ago, so it's possible. I suppose you'd have to actually decode the entire keyframe interval and use the resulting frames as new "baked-in" keyframes so to say. I suppose that's more or less what djv and other frame checkers do under the hood. But I don't know what I'm talking about so...

gila@lemm.ee · 2 pts · 2y

That's what I've always assumed it does since back when quicktime player barely even ran on my PC yet for timeline operations it was significantly more responsive than WMP/MPC.

For Losslesscut I just get around this by encoding my input from source using keyint=n:scenecut=0 in ffmpeg where n is a manually set keyframe interval.

So e.g. if my expected cut occurs on a frame that occurs at t+10 seconds of footage, n can be the same as the fps and then there'll always be a keyframe exactly at timestamp 00:00:01, 00:00:02 and so on. I can then open it in losslesscut and easily snap to the frame I want and make the cut losslessly.

Yeah the first encode generally means a lossy transcode by the time I get to my final video but being realistic that'd be a part of my workflow either way and this way it's less

MangoPenguin@lemmy.blahaj.zone · 1 pts · 2y (1 reply)

That's due to the source codec using keyframes, you can only cut without re-encode on those specific points.

nutbutter@discuss.tchncs.de · 1 pts · 2y

They allow re-encoding, but that is in experimental state. It never works for me.

helenslunch@feddit.nl · 1 pts · 2y (1 reply)
[ removed ]
folak@lemmy.world · 2 pts · 2y

Different tool, different usage. There are things impossible to do with losslesscut such as upscaling, editing colors...