25 ms·
LosslessCut: lossless video/audio editing
- therealmarv 4y agonice, I needed a program like this. is there something similar for Android?
- ReptileMan 4y agoFinally. I have been longing for simple paint.net style video editor ...
- severak_cz 4y agoI use this cut begining and end of pirate radio broadcast recordings (read: big MP3 which I don't want to reencode). Works well for this purpose.
- christiangenco 4y agoLosslessCut 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. 4. thevideoclipper.com
- rand0mx1 4y agoLosslessCut is an electron based application. You can use Video Trimmer by Ivan Molodetskikh.
- thunderbong 4y agoIs it cross platform?
- jancsika 4y agoYes, let's lug around an entire Linux-based operating system to avoid the memory and harddrive footprint of Electron.
- snthd 4y ago>Video Trimmer by Ivan Molodetskikh https://gitlab.gnome.org/YaLTeR/video-trimmer https://gitlab.gnome.org/YaLTeR/video-trimmer
- ericol 4y ago> 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.
- TreeRingCounter 4y ago
- CharlesW 4y ago> …the editor uses certain marks in the video (I don't remember how they are called) that "group" the frames together… You almost had it! https://en.wikipedia.org/wiki/Group_of_pictures https://en.wikipedia.org/wiki/Group_of_pictures
- 4y ago
- brink 4y agoI think avidemux does the same thing. https://avidemux.sourceforge.net/ https://avidemux.sourceforge.net/
- RGamma 4y agoOr ffmpeg (with 'copy' codec) or mkvtoolnix
- idorube 4y agoor mpegstreamclip (select in, out & save as)
- TonyTrapp 4y agoAnd mp3DirectCut for MP3 / AAC: https://mpesch3.de/ https://mpesch3.de/ Or mp3splt for MP3 and Ogg Vorbis: https://mp3splt.sourceforge.net/mp3splt_page/home.php https://mp3splt.sourceforge.net/mp3splt_page/home.php
- iggldiggl 4y agoFor AAC/M4A there's also https://github.com/nu774/m4acut https://github.com/nu774/m4acut, which can split MPEG-4 based AAC audio and preserves gapless playback. (While mp3DirectCut can read AAC in MPEG-4 containers, it only ever spits back out the raw AAC stream, which lacks the necessary tagging for gapless playback.) I've found handy for splitting up the occasional concert regording off Youtube back into individual tracks, and things like that…
- penner_im_auto 4y agoCame to say that. I've modified avidemux it to drop the checks, since then I'm cutting in light speed, it's amazing +1
- joshschreuder 4y agoCan you elaborate?
- seba_dos1 4y agoProtip: for simple lossless cutting, ffmpeg is more than enough. To make a 2 second clip starting from the third second of input file: ffmpeg -ss 3 -t 2 -i in.mkv -c copy out.mkv [edited to put -ss and -t before -i]
- gyan 4y agoDon't do this. Place both ss and t before the input -i. As output options, ss waits till the first KF after the given value, it's not a seek. With a t of 2, that may very well result in an empty video stream.
- xienze 4y agoOf course (pretty sure LosslessCut using ffmpeg under the covers). But this is probably one of those instances where having a GUI comes in handy. You can quickly scrub the video for the exact point you want, see where the closest I frame is (read: the place where your cut is going to start), create multiple cut segments, etc.
- seba_dos1 4y agoFor simple cases where you just cut a single clip out of a longer file, I find CLI to be faster. For more complex stuff like joining several clips together or manipulating multiple files, GUI is usually the better option indeed.
- genericacct 4y agoLosslesscut is infact a front-end to ffmpeg afaik
- donio 4y agoYep, it's ffmpeg with 400MB more Electron.
- pestatije 4y ago> This app is not for exact cutting. Start cut time will be "rounded" to the nearest previous keyframe, which may be a fraction of a second before your desired cut point, or up to several seconds, depending on the encoding. I found this problem with all ffmpeg-based editors...does anybody know of an editor capable of cutting between inter-frames? The same happens with sound files, which is inconvenient.
- seba_dos1 4y agoThat's not "a problem with ffmpeg-based editors"; that's the only way to do it lossless. Some containers such as Matroska are able to store an offset (and ffmpeg does that), so it starts playing from exact wanted position even though the actual stream contains data since the last keyframe. Some players ignore that though.
- formerly_proven 4y agoDepending on the encoder the GOP size / keyframe interval can be more or less unbounded as well. Typically you'd only have a few seconds per, but for example CCTV cameras are happy to produce minute-long GOPs. Seeking backwards in a video player tends to not work so well at that point, and most NLEs are significantly unhappy with such a file.
- _flux 4y agoI wonder though if this could be solved with edit lists, supported e.g. by ISO BMFF. Not all players support them completely, though, for example I believe mpv only supports one edit, so I guess that's not useful for general purpose use..
- mizaru 4y agoWhen cutting with ffmpeg you can use "frame-accurate seeking", but you may run into issues down the road (e.g. audio/video being out of sync).
- Gordonjcp 4y agoYou can't do that at all in long-GOP formats without re-encoding. What happens is that every so often it sends a complete image - the intra frame - and then sends differences to show what changes from frame to frame. This is a complete and utter pain in the tits to edit with, so most people transcode to an intraframe codec like DNxHR or ProRes although there's absolutely nothing wrong with MJPEG or MPEG2 intra-only. If you don't re-encode, you're limited to cutting at an intra frame because that's where it starts drawing from. If you don't you get all this weird "ghost trail" stuff happening.
- bentt 4y agoI love LosslessCut for capturing game footage and making GIFs.
- josefresco 4y agoCan this be used for video compression or is there a better tool? Currently I use Handbrake or online tools.
- seba_dos1 4y agoThis is a tool for explicitly avoiding video compression.
- ww520 4y agoNice interface, simple and beautiful. For casual video audio editing, I usually use Avidemux. Its Copy mode is similar in cutting out portions of the video without the lengthy re-encoding process. LosslessCut looks nice. I’ll give it a try.
- dmos62 4y agoI've a semi-related question. What's your workflow for matching torrented videos with subtitles that have been provided in the same torrent? Often the directory structure is Some.video.mkv Subtitles/Some.video/English.0.srt and my players of choice (mpv and MPC) are unable to automatically make the match.
- SparkyMcUnicorn 4y agoMy solution was to use Sonarr, Radar, Bazarr, and Plex. Others are using Jellyfin. This setup eliminated 99% of the time I spent on all media management.
- open-paren 4y agoI generally follow the Plex format of Some.video.mkv Some.video.en.srt Some.video.en.forced.srt Some.video.en.cc.srt https://support.plex.tv/articles/200471133-adding-local-subtitles-to-your-media#toc-3 https://support.plex.tv/articles/200471133-adding-local-subt...
- bouvin 4y agomkvtoolnix to add the subtitles you want as well as remove the tracks that you don't need.
- amelius 4y agoNice, though I'm not a huge fan of the Snap store.
- suby 4y agoThere's also a Flatpak available, https://flathub.org/apps/details/no.mifi.losslesscut https://flathub.org/apps/details/no.mifi.losslesscut
- RunSet 4y agoVirtualdub downloads as a 1.81 MB zip file. This downloads as an 84.9 MB zip file. I sure hope this does something Virtualdub can't / anything better than Virtualdub, my current preferred lossless video / audio editing Swiss army knife. Can anyone confirm whether that is the case? BTW downloads that don't require approaching Lord Appstore cap in hand can be found here: https://github.com/mifi/lossless-cut/releases https://github.com/mifi/lossless-cut/releases
- wpietri 4y agoAre people who edit video all that concerned about 80 MB? At current prices, that's like $0.005 of disk space.
- ale42 4y agoI'm not about the 80 MB... but I'm rather concerned by the proliferation of Electron-based applications. They use way too much system resources. Like Chrome does... but for a browser (which is kind-of a "heavy" application) I still understand.
- lacrosse_tannin 4y agoIt runs on my not-windows computer so that's a good start
- kasabali 4y agoavidemux
- gauddasa 4y agoStatically linked FFMPEG executable is about 80 MB. As there is no need to ship entire FFMPEG when only lossless operations are to be used, I'm sure it can be reduced below 10 MB.
- iggldiggl 4y ago"Smart cutting" does some re-encoding work, so you couldn't throw out those parts of FFMPEG after all.
- noja 4y agoCan this fix videos where an orientation change happens partway through?
- mifino 4y agoIf you mean a video where the camera was rotated while recording, I believe no, that's not possible to do losslessly. I believe the orientation flag stored in the metadata cannot change over time. Correct me if I'm wrong. - author
- NelsonMinar 4y agoBeen using this for years, it's a very good and simple tool. There's a surprising amount of garbage in this space. SEO spam infects any searches you do for video editing software. Many "cut" tools actually just fiddle some start media timestamp in the file so the output file isn't smaller, just a video player will start at the right timestamp. Ie: not an actual cut. This one does the job. It's implemented in Javascript with Chromium and the HTML5 video player. Not the way I would have thought to do it but makes cross platform a lot easier. You can do the same with ffmpeg on the command line of course but having a GUI to pick the cut points makes all the difference.
- ripperdoc 4y agoLosslessCut is great, but I needed something quick when I cleaned up old GoPro videos. Just open an mp4/mov in QuickTime Player, trim it and save under a new name. It will create a lossless cut. If you need several from same video, you would need to repeat the process on the original file. (unfortunately, the trimmed video won't get the same metadata, so I also needed to use exiftool -TagsFromFile oldvid.mp4 -all:all newvid.mp4 )
- felixthehat 4y agoJust tried this on a screen recording I made, really simple way to cut out boring bits e.g loading/waiting times, mousing etc. Great, I'll use this again!
- eatbitseveryday 4y agoHas anyone had experience merging two video files with this tool?
- dopa42365 4y agoAs long as the files are the same codec and resolution and stuff, it works just fine (I just used this earlier today to combine 20 short instagram stories into one video).
- AareyBaba 4y agoMerging works great. Drag multiple files to the main window. A dialog pops up to allow you to select the order of the files. Then merge and a new merged file is created.
- wolrah 4y agoI do it all the time, first cutting up my long GoPro videos in to the actually interesting segments and then merging those all together. Works great.
- jtbayly 4y agoFor lossless audio only editing, and a very polished experience, check out https://www.rogueamoeba.com/fission/ https://www.rogueamoeba.com/fission/
- Pr0ject217 4y agoMac only =/
- jtbayly 4y agoSorry. Meant to mention that.
- staindk 4y agoBeen using this for a while to cut down gameplay footage I want to share with friends. It works well but I wish they implemented a simple way to combine multiple audio streams into one stream for upload to youtube/elsewhere. From what I can tell, FFMPEG does support actions like that. Perhaps it's not "lossless enough" for the app author.
- at_a_remove 4y agoI'll keep an eye on this. I have a very technically interesting project soon which will require quite a lot of cuts; my thought was just "re-encode everything as I-frames" (all of the source material consists of clips under four minutes long). This might help.
- datagram 4y agoIf you'd prefer something command-line-based, I'd recommend mkvmerge: https://mkvtoolnix.download/ https://mkvtoolnix.download/ FFmpeg also works of course (it's what LosslessCut uses internally), but in my experience I've occasionally run into files where FFMpeg doesn't properly cut on keyframes and I end up with a few seconds of no image at the start of the video. No such problems with mkvmerge, and the API is much simpler.
- Mojave3 4y agoUsed this for ages. People will bring up various alternatives (including just strictly using FFmpeg) and I have to wonder if the only use case they can fathom is clipping 1 segment out of a longer video. All suggested alternatives would involve such a garbage workflow and unintuitive experience for any real project. I dislike Electron as much as anyone else but it works fine here, and does the job better than anything else I've tried. I am very comfortable with FFmpeg and have used pretty much any tool you can name, I still use Losslesscut daily.
- chungy 4y agoSeems it uses ffmpeg on the backend anyway :) Best tool for the job. I'll probably keep using ffmpeg to clip out a single segment, but it gets hairy when you have more complicated edits.
- bscphil 4y agoNot sure exactly what your use case is, but I use vidcutter for lossless clip extraction and it works great and does not require Electron (it's QT based I believe). https://github.com/ozmartian/vidcutter https://github.com/ozmartian/vidcutter To answer a point that's been brought up elsewhere in the thread, one nice feature of vidcutter is that you can either cut fully losslessly (on keyframes) or cut frame-perfect while only encoding the frames before and after the first and last keyframes in the cut. The Arch Linux package for vidcutter is only 4 MB. It has dependencies, of course, but I already have all of them installed for other things. (There's nothing uncommon.) All praise to dynamic linking.
- irjustin 4y ago> Only macOS Catalina and below is currently supported. Big Sur is unstable until further notice. Sadly a massive blocker[0] [0] https://github.com/ozmartian/vidcutter/issues/311 https://github.com/ozmartian/vidcutter/issues/311
- Mojave3 4y agoVidcutter is good but no where near as customizable as Losslesscut (specifically in terms of keybinds) and using the timeline is nowhere near as smooth. Its being developed in a way I approve of much more but I still prefer using Losslesscut by a large margin. If it ever catches up I'll be thrilled because I do like what its about a lot more but I don't really think it currently competes in terms of user experience. Still if it works well for you then there's a lot to appreciate.
- laszlov 4y agoLosslessCut looks awesome! I also created a lossless video trimming tool a couple of months ago: https://videotrim.app https://videotrim.app LosslessCut seems to be more featureful but mine works in the browser without having to install it. It also has the same limitations since cutting times are rounded to the closest keyframes, but this way there's no need to re-encode anything.
- ddevault 4y agoThis project has been my go-to example of the absurdity of Electron since its inception. This is a thin wrapper around ffmpeg, which does all of the real work here and is a much more powerful and versatile tool. Why does this ship an entire web browser? Why does this even exist? The world may never know.
- deleted 4y ago[deleted]
- wolrah 4y ago> This is a thin wrapper around ffmpeg, which does all of the real work here and is a much more powerful and versatile tool. Why does this ship an entire web browser? Why does this even exist? The world may never know. You answered "Why does this even exist?" yourself, it's a thin wrapper around ffmpeg. It provides a reasonably usable and friendly GUI to perform the kind of basic cuts a lot of people want to do with their video. When I have two hours of GoPro footage I want to chop up in to a quick and dirty highlight reel, which one do you think I'm going to choose? 1. Fire up my favorite video player, scrub through every file noting the start and end times of every segment, turn each of those segment times in to a ffmpeg command line, and throw all those in a script. 2. Fire up LosslessCut, scrub through every video clicking "start segment" and "end segment" as appropriate, click "Export" It ships a whole web browser because unfortunately that's the easiest way to make a cross platform GUI app these days, and they get video playback support "for free" (though this does result in some limitations with codecs other than H.264). Yes it's heavier than it could be, but I'm editing video here, I don't really care about megabytes of hard disk space or RAM. There's nothing else like it as far as I'm aware. AviDemux only does one cut at a time, VirtualDub doesn't even run on non-Windows platforms.
- akerl_ 4y agoIt’s odd, because you’re framing these questions rhetorically, but you might be well served by asking them earnestly. There are plenty of parallel comments on this page that describe why people like LosslessCut. It exists because its authors saw a niche they wanted to fill, and the userbase suggests they aren’t alone. How strange to look at that and call it “absurd”.
- TheRealPomax 4y agoNever realised the site was so bad... It's a fantastic tool, but it'd be nice if the site opened with why you'd want to use it, and what it can do, rather than jumping straight into user testimonials from people who mean nothing to you, followed by a complete nonsense "them vs us" image set. In what universe does a reencode-on-save using any of the dozens of normal tools that people use turn a normal video file into a 7 bit palette gif?
- dang 4y agoRelated: Lossless-cut: The swiss army knife of lossless video/audio editing - https://news.ycombinator.com/item?id=24883030 https://news.ycombinator.com/item?id=24883030 - Oct 2020 (10 comments) LosslessCut – Save space by quickly and losslessly trimming video files - https://news.ycombinator.com/item?id=22026412 https://news.ycombinator.com/item?id=22026412 - Jan 2020 (1 comment) Show HN: LosslessCut – Cross-platform GUI tool for fast, lossless video cutting - https://news.ycombinator.com/item?id=12885585 https://news.ycombinator.com/item?id=12885585 - Nov 2016 (33 comments)
- bouvin 4y agoLosslessCut is a magnificent tool. I use it as the final step for my lecture recordings, which have been disassembled with ffmpeg, edited with Audacity, encoded with Handbrake, and finally reassembled using ffmpeg. LosslessCut combines the speed of ffmpeg with a quick and pleasingly minimal UI.
- existingone 4y agoSort of related - anyone know of an open source tool that can repair video streams that get broken during the download process (using youtube-dl) due to internet interruption. Everything I've researched into this says that it cannot be done because there is final metadata that gets added at the end of the stream that is missing. This does not seem right - if you have already download frames of video there should be some way to recreate any metadata instead of being left with an unplayable broken mpg file. The internet has many shady third party paid products that claim to do this but I don't trust them.
- swyx 4y agowhy do you still need to edit with Audacity when you have lossless? i dont undersatnd what is disassembled vs reassembled
- smcleod 4y agoLooks neat - $30AUD is pretty pricey for the average user though.
- e1ghtSpace 4y agoIts free if you get it from their github repo. https://github.com/mifi/lossless-cut#download https://github.com/mifi/lossless-cut#download
- smcleod 4y agoOh that's awesome, I'll get it from there and flick them a donation :)
- veesahni 4y agoAny tool like this that can handle HEVC? Most seem to only be designed for H.264
- joshschreuder 4y agoI’m not sure whether this linked on does or doesn’t handle HEVC. But Avidemux in copy mode should handle it, I’ve been using it for a while in a similar lossless manner to this tool and it’s great.
- wolrah 4y agoLosslessCut does work with HEVC, but the GUI doesn't support playing them so it generates a low-res H.264 video to use as a stand-in for previewing and then does the actual cuts on the real file. I mostly use it for cutting up clips from an older GoPro so I don't run in to this often but I did borrow a Hero9 recently and it worked fine, it just was a bit less streamlined.
- mifino 4y agoHEVC is supported in the latest beta version, if your computer has a hardware HEVC decoder. It's a WIP as HEVC support was just recently introduced into Chromium (source: author)
- simple10 4y agoHN saves the day again. This is exactly what I needed to edit some videos on a deadline today. Thanks for posting it! I usually use ffmpeg from command line to trim a video but needed to do some more complex edits that LosslessCut makes easy.
- theobr 4y agoI haven't fallen in love with a piece of software this quickly in so long
- fevangelou 4y agoFinally, a cross-platform VirtualDub!
- dataflow 4y agoIs there any tool that can cut between key frames and ONLY re-encode that small portion?
- codazoda 4y agoThis tool (LosslessCut) actually has an experimental feature that you can turn on to do just that.
- nop_slide 4y agoThis looks nice. I've been cutting all the videos I make for my skateboarding "wordle" site by using ffmpeg and its scene detection. Some times the scene detection isn't perfect and I have to shave off a few milliseconds to get the clip just right. Also scene detection doesn't do well with fade transitions or with night time skate clips where there's a camera with a flash. I also learned how to put clips back together with ffmpeg too. I've definitely been doing this the hard way, but it's been fun learning ffmpeg and its crazy incantations. Here's my site: https://skateboardle.com https://skateboardle.com
- mifino 4y agoI just discovered this post, and I'm really happy to see a lot of satisfied long time users as well as excited new users who recently discovered this. I think the most common criticism is that the app is large and uses a lot of memory (compared to Notepad?:P) due to it being Electron based. Somewhat unpopular opinion, but here goes: Developing an app using Electron gives such tremendous benefits that it far outweighs any downsides. It lets you easily build a cross-OS app on a super optimised, stable and secure platform that's being battle tested by billions of people around the world every day (Chromium). It gives you all the features of the web, and it "just works" on almost any popular OS. The web has all the big tech pushing new features and improvements all the time and it maintains really good backwards compatibility. I don't think I ever had the LosslessCut app actually crash on me. CI, automatic building and releasing to all different kinds of channels is a breeze due to tools like `electron-builder`. I think if you compare it to most other lossy video editors, you'll find that the CPU usage is much lower (especially per minute of produced video!), and the memory footprint is probably lower than many other popular video editors. Storage is cheap, and what is 500mb when working with 4K video anyways, so optimising for size is mostly a waste of time and doesn't really benefit 99% of users. Counter arguments are welcome :) -Mikael Author of LosslessCut
- spindle 4y agoI totally agree. I object to Electron apps when they use a lot of my CPU cycles AND they're for functions that I want to run all the time, like chat programs. Not a problem for a video editor.
- mrcrumb1 4y agoI understand why devs choose Electron and the benefits seems worth it overall and I'm glad it exists (and as you point out, a video editor might be an especially appropriate application for electron). That being said, it has a cost, and part of that cost is that there are certain users who don't like the experience of using electron apps. You may not agree with how big a deal this is for them, but the tone of this seems to be that they are wrong for having that preference. As a dev you don't really get to decide what users do and don't like; it's of course your prerogative to make whatever tradeoffs you wish, but I'd be careful about denying people's experience of your software.
- behel 4y agoLosslessCut works great if the keyframes of the video are not too far apart and if you already know where you want to cut. I posted something similar (a web app for automatic silence removal) a few months ago in Show HN: https://www.savvycut.com https://www.savvycut.com. We also use keyframe based cutting for lossless cuts and a smart-cut mode that only re-encodes parts around keyframes (at least for h264 and vp8 codecs). I see that you also experiment with a similar smart-cut feature: https://github.com/mifi/lossless-cut/issues/126 https://github.com/mifi/lossless-cut/issues/126. That seems to work quite well if you re-encode with the same parameters as the original but I guess there are a lot of edge cases.
- paraknight 4y agoIt's rare that I come across software with such thoughtfully designed UI and great UX where everything just works™, including things you didn't know you needed. I felt like I immediately knew where everything was (even without toggling the simplified mode). I use LosslessCut from time to time to make small looping videos for my blog, and after my first use I immediately went to donate to the developer. I remember even writing some detailed paragraphs about why it's so good in the PayPal message, but something went wrong and PayPal lost it, so it was a silent donation in the end. Definitely in my global top 5.
- causi 4y agoFantastic. I've wanted a program exactly like this for a couple of decades now.
- whatswrong 4y agoNice project, I'll give it a try if I feel at some point that the mpv script that I use and modified a bit (webm.lua) isn't enough.
- Maursault 4y agoIf lossless, why doesn't LosslessCut export the original media codec and wrapper? Seems to have its own unique file format. What I want is a 64-bit version of Quicktime 7 Pro. Q7P has interface issues (handles are too small, and it is clumsy to get to specific time index), but otherwise it is a Swiss Army Knife of clipping. Apple's 64-bit Quicktime X is absolutely worthless (I don't want to re-encode, and I don't want to share anything!).