
Show HN: LosslessCut – Cross-platform GUI tool for fast, lossless video cutting - mifino
https://github.com/mifi/lossless-cut
======
pritambaral
I guessed from the title it was going to be using ffmpeg, because I myself
have used ffmpeg's `-ss`, `-t`/`-to`, and `-codec copy` numerous times for
this exact purpose. 

Then I saw that this bundles its own piece of Chromium and ffmpeg and is ~70
MB in size.  Something is seriously wrong with today's app development
ecosystem if it takes 70 MB, even when I already have both Chromium and ffmpeg
on my system. 

EDIT: On the other end is QtAV, a cross-platform multimedia player and SDK
which took me only 1 MB of network download.  It uses Qt and ffmpeg, both of
which I already have on my system, so it doesn't have to redundantly bundle
anything. 

On OSes without Qt and ffmpeg in their package repos (OS X and Windows), the
players are ~ 20 MBs in size.  So even if one argues "cost of cross-platform
compatibility", it still doesn't make sense to bundle the entirety of a web
browser for something as simple as this. 

~~~
Sir_Cmpwn
I'm legitimately pissed off by this.  Electron apps are always annoying to see
but this one is genuinely offensive.  I hate the culture and ecosystem Electron
has allowed to flourish.  This project is an insult to computer science. 

~~~
tambourine_man
70MB is less then U$0.01

And for that, you get one hell of a text/layout engine, hardware accelerated
2D/3D graphics, integrated IDE, one the fastest interpreted runtimes around,
which happens to be the most popular programing language…

All Open Source, cross platform. 

Yeah, insulting indeed.  Who needs those damn Electron apps. 

~~~
Sir_Cmpwn
>you get one hell of a text/layout engine, hardware accelerated 2D/3D
graphics, integrated IDE, one the fastest interpreted runtimes around, which
happens to be the most popular programing language…

All so you can provide a graphical interface for two ffmpeg flags. 

~~~
syngrog66
> All so you can provide a graphical interface for two ffmpeg flags. 

"everything old becomes new again"

reminds me also of the hot new trend of chat based interfaces. ( hmmm, pretty
sure that was our default computer interface back in 60's/70's/80's)

------
tckr
Check out AviDemux,
[http://fixounet.free.fr/avidemux/](http://fixounet.free.fr/avidemux/) it
offers a simple UI and also lossless cutting. 

~~~
pkroll
Amusingly, AviDemux, which has a LOT more ability than just cutting... is
about 71 meg. 

------
revelation
So you're playing with version X of ffmpeg and cutting with version Y. It
seems that X+Y equals disaster. 

------
arjie
I think including everything is super cool because I had the app installed and
running in under 10 seconds.  What wasn't cool was that I asked to cut a short
15 s video to the first second, and there was no feedback but the spinning
gear for 5 minutes. 

~~~
mifino
That's a bug then: [https://github.com/mifi/lossless-
cut/issues](https://github.com/mifi/lossless-cut/issues) Edit: could you check
if ffmpeg was still running while it was spinning?  Maybe we need to kill it if
it takes too long. 

------
cm3
How do you deal with the fact that some video tracks do not provide the needed
cross-frame data or the times you're cutting are at unfortunate points which
would require a re-encoding because a quick byte copy of the existing stream
doesn't work or at the very least will complain later about missing things
like color info (although it's played back correctly by mpv)? 

~~~
mifino
I don't know what you mean by cross-frame data.  The program is using ffmpeg's
-ss, -t, and vcodec copy functionality, and I'm not sure how it handles these
issues.  I know that if you cut between keyframes (which is very likely to
happen), then the data before the next keyframe will be lost, so it is not an
exact cutting mechanism. 

~~~
cm3
That's another issue, but it can also lose other data which will cause
warnings but play most likely with correct color reproduction. 

I don't have such a source file handy to reproduce, but if you try enough ISO
MP4 containers with H246, you will hit one where this is the case. 

Is `-t` different from `-to` which I've been using? 

~~~
astrange
libavcodec tries to recover from missing frames (you need this for TV
broadcasts) but it's actually not very good at it for H.264.  You'd almost
always see major artifacts. 

Any idea what the exact warning text is?