14 ms·
VidCutter: A program for lossless video cutting
- deleted 3y ago[deleted]
- karmakaze 3y agoCool. I was wondering why this didn't exist.
- haunter 3y agoIt does https://avidemux.sourceforge.net/ https://avidemux.sourceforge.net/
- mintplant 3y agoThere's also LosslessCut: https://github.com/mifi/lossless-cut https://github.com/mifi/lossless-cut
- CharlesW 3y agoFun fact: The history of lossless editing goes back to the dawn of digital video on personal computers. For example, QuickTime Movies¹ have always been based on an EDL² model. Only when you "export" (vs. "save") is the content re-encoded. The most popular tool in this category that I know of is https://mifi.no/losslesscut/ https://mifi.no/losslesscut/. ¹ The object, vs. the QuickTime Movie file format ² https://en.wikipedia.org/wiki/Edit_decision_list https://en.wikipedia.org/wiki/Edit_decision_list
- CyberDildonics 3y agoOnly when you "export" (vs. "save") is the content re-encoded. That's the way video editing in general has always worked.
- jackhab 3y agoAvidemux is another alternative existing for many years. I've used it a lot to quickly edit videos without recompression - saved me tons of time.
- schemescape 3y agoYes, I recall using Avidemux for this purpose roughly 20 years ago.
- ShadowBanThis01 3y agoIt has existed for decades.
- Lucent 3y agoHow does it compare to https://github.com/mifi/lossless-cut https://github.com/mifi/lossless-cut?
- alexsantos201 3y ago[dead]
- pdntspa 3y agoIt's not an electron app, for one
- IshKebab 3y agoIt uses PyQt. I'm not sure I'd put much money on it being faster than an Electron app. The only other PyQt app I have used is Cura and that is ridiculously slow. Takes like a minute to start up and you can watch it loading the controls when there are a lot of them. I'd take Electron over that tbh.
- pdntspa 3y agoI've been writing some code in PyQT and it's been rather pleasant and performant. A lot of decent GUI apps are written in QT. Python is just slow. I will take that over some stupid app cramming an entire instance of Chromium down my throat any day.
- madeofpalk 3y agoI've been writing some code in React.js and its been rather pleasent and performant.
- pdntspa 3y agoYeah but it's web tech. Desktop apps should feel like desktop apps, not a glorified webpage
- ilaksh 3y agoTechnically a front end for ffmpeg which does the actual video cutting. Like most other tools like this.
- deleted 3y ago[deleted]
- josteink 3y agoThat’s not to say it doesn’t provide value. Using raw ffmpeg is a pretty technical task, with lots of pitfalls, and not for your average user.
- SparkyMcUnicorn 3y agoAnd it gives you nice drag/drop/seek/preview type stuff. That said, since I've been using an AI assisted terminal (warp.dev currently) my use of GUI wrappers for different tools has faded quite a bit. I like being able to "Clip 0:10 through 0:30 of file.mp4 and turn it into a web optimized gif", and this NLP workflow works as a "wrapper" for almost any CLI. It's a nice interface without the loss of any functionality.
- washadjeffmad 3y agoI was hired recently to author a set of DVDs (yes, I know!), discovered there's almost no commercial software still available outside of Scenarist and TMPGEnc, and tried a dozen modern projects while putting together a FOSS workflow, just in case I couldn't the conjure CDs, licenses, and keys for software I hadn't needed in a decade+. vidcutter ultimately didn't help in this process. I built it from source and then tried the flatpak, but for all of its beauty, it hung or crashed when importing common but dated formats and containers, handling more than a few clips, and didn't allow precise jogging for splitting (when it didn't hang or crash). It's good for trimming up a smartphone video, but it's not on par with an NLE. I ended up giving up and scripting out most of the project in ffmpeg and dvdauthor. If you know how to use core utilities, it's such an exercise in tedium struggling against underdeveloped front ends.
- 3y ago
- Kiro 3y agoWhat's the reason video editing is not lossless by default?
- CharlesW 3y agoNon-linear (i.e. normal) video (and audio) editing is lossless until you export the result. The neat thing that tools like this one, LosslessCut, Avidemux, etc. do is that they don't re-encode the video on save/export. There are a few caveats, though. Examples: (1) You're limited to cuts-only edits. (2) Because the base unit of video encoded for distribution is a GOP¹, edits either have to happen on GOP boundaries (i.e. at a keyframe) or the apps have to re-encode the GOP. ¹ https://en.wikipedia.org/wiki/Group_of_pictures https://en.wikipedia.org/wiki/Group_of_pictures
- _flux 3y agoE.g. MPEG4 videos are usually made of I-frames (full frames), P-frames (predictions based on older images) and B-frames (predictions based on older and future pictures), and from these Group Of Pictures are made, which always start with an I-frame. You cannot make frame-precise cuts within this sequence unless you wish to carry on the frames that won't be visible (and I don't think anyone tries to do these cuts by keeping some invisible frames), so you only get to make such edits that always include the first I-frame of the sequence. Therefore if you want to make completely lossless edits your editing precision is lost. For frame-precise editing one usually ends up re-encoding the stream. Of course, you could only re-encode only the GoPs that get broken while keeping the rest intact, and I guess this would be better and a lot faster than re-encoding everything. I don't know if any application tries to do this. But that is also a bit troublesome, as you'd like to use the same encoding parameters—and maybe the same encoder—as the other frames, to not have quality differences between the edits and original.
- darcien 3y ago>Of course, you could only re-encode only the GoPs that get broken while keeping the rest intact, and I guess this would be better and a lot faster than re-encoding everything. I don't know if any application tries to do this. LosslessCut does have experimental support for this partial re-encode called "smart cut" [1]. Since it's using ffmpeg internally, the challenge become how to instruct ffmpeg to do this[2]? [1]: https://github.com/mifi/lossless-cut/issues/126 https://github.com/mifi/lossless-cut/issues/126 [2]: https://github.com/mifi/lossless-cut/issues/1216 https://github.com/mifi/lossless-cut/issues/1216
- Rovanion 3y agoDoes anyone know of a software that can do motion detection and spit out timestamps in a video for use in ffmpeg or the like?
- sunlite99 3y agoHow about https://opencv.org/ https://opencv.org/ ?
- j45 3y agoWhat would you like ffmpeg to do with the timestamps, extract them?
- brucethemoose2 3y agoWhat do you mean by motion detection? Scene changes? But whatever you mean, the answer is probably VapourSynth. In fact, you can probably do whatever you are trying to do inside VapourSynth instead of ffmpeg.
- passion__desire 3y agohttps://github.com/roboflow/supervision https://github.com/roboflow/supervision
- pkkm 3y agoIf you mean scene changes, this library works: https://github.com/Breakthrough/PySceneDetect https://github.com/Breakthrough/PySceneDetect
- mifino 3y agoIf you mean scene change detecting, LosslessCut can do that (wrapper around ffmpeg filters)
- thot_experiment 3y agoDoes this do anything clever to enable actual frame perfect cutting, or is it just splitting on keyframes like avidemux or `ffmpeg -i input.mp4 -ss "START_TIME" -to "END_TIME" -c:v copy output.mp4`?
- izacus 3y agoThere's nothing "clever" you can do to losslessly cut outside the keyframe boundaries. Since reencoding is required, loss of quality for at least the cut GOP is a given.
- thot_experiment 3y agoI'm not sure about that, naively you could turn the entire cut GOP into i-frames couldn't you? I'm not super familiar with the nitty gritty of h264/h265 but intuitively I think you wouldn't even need to turn everything in the GOP into i-frames. You could trace out the inter-frame topology of the GOP and then replace only the "orphan" frames with i-frames, then the remaining p and b-frames would retain the necessary reference data for decoding. I would love it if someone who knows more about this than I do would confirm/deny since this is something I've been curious about for a long time now. (Though I would also love a tool for near-lossless cutting that just re-encodes the cut GOP, please link such a thing if it exists)
- ShadowBanThis01 3y ago"naively you could turn the entire cut GOP into i-frames couldn't you" Yes, but then you'd have to render the result into a truly uncompressed format and it would have to stay in that format perpetually. If you wanted to deliver in another lossy format, you'd actually lose quality across the entire file instead of just the one GOP. What I'm curious about is whether you can cut in the middle of GOPs, recompress the afflicted ones, and then concatenate the stream back together without recompressing all GOPs. If the file specifies a 12-frame GOP, cutting any GOPs is going to break that cadence. So can you have, say, a few thousand 12-frame GOPs... then an 8-frame GOP... then go back to 12-frame GOPs? Update: Did some research and you can have "adaptive" GOPs of varying lengths: https://docs.aws.amazon.com/mediaconvert/latest/ug/gop-structure.html https://docs.aws.amazon.com/mediaconvert/latest/ug/gop-struc...
- jamesfmilne 3y agoYou could cut on any frame if your container and decoder supported decoding two tracks at once, then switching the active track. You could decode two tracks in parallel, each from the last keyframe, then switch whenever your want. Scope-creep would of course require that to expand to include dissolves, transitions, etc until you've got a whole editor/compositor engine running just to playback a single composition. However this would be quite possible with technologies like WebCodecs+WebGPU.
- josteink 3y agoDecoding a single frame can be done a completely deterministic constant-time basis using hardware acceleration, common in embedded systems. Decoding two consecutive frames would obviously require two such cycles, which the hardware may or may not be spec’d for. With three, four or n skipped frames, you would require (at least) n frames prebuffering, rendering and graphics memory to guarantee smooth playback. I think it makes sense to differentiate between mastering formats and consumption formats. One does not, after all, ship studio masters of albums or songs people listen to.
- Scaevolus 3y agoYou don't even need to support multi-stream decoding, just fast seeking. Matroska supports a feature like this where it can link together multiple segments, letting you do something like having one file for a repeated opening sequence in a TV series.
- nico 3y agoA video in the readme would go a long way
- balou23 3y ago...or anything else in the readme describing the program in any way or form. The title of this post has more information about the program than the whole readme.
- xyzzy4747 3y agoSo just a big ffmpeg wrapper?
- santa_boy 3y agoOT: Are there any tools like LosslessCut (or extensions to it) that can do the following things? 1) Insert a few title slides in the video with a bit of text and image animation (like text and a logo showing up with some basic animation) 2) Add background music across various parts of the video
- sbt567 3y agoIs there any equivalent of losslesscut or vidcutter for images (jpeg, png)? The one I'm aware of is cropgui. Wondering if there is another alternative
- bick_nyers 3y agoFrame-accurate cut/concat in FFMPEG appears to me to be significantly less performant than it should be. I know that we need to re-encode to get frame-accuracy, but I've tried cut/concat say 300 clips from 3 source videos concat together for a total of 30 min. runtime as an experiment take days upon days (with no estimated time of completion), and swap memory usage exceeding 200GB. For something even somewhat complex, it's significantly faster to first export the frames to .png then reform the video, but I wish I didn't have to do that.
- qwerty456127 3y agoThis is a perfect app for this job. Finally, cropping a part of a video to share quickly has became convenient! Thank you an awful huge lot!! I used AviDemux in the past but that was a UX horror.