5 ms·
> 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
by 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.
- j1elo 4y agoAs has been said, this happens because of cutting on the closest keyframe, which is the only point where the cut can be done losslessly. This is how it's been done traditionally, since basically forever as far as I can remember. To be honest, I think modern tools could do better. If you happen to want a cut just 20 frames after a keyframe, those 20 frames could be computed (decoded) in order to create a new keyframe right in the spot you wanted. There are a myriad tools to do the typical lossless easy cut, but no idea of one that goes the extra mile to do this more advanced technique. UPDATE: Navigating the GitHub issues I found out that this is indeed an in-progress experimental feature! That's amazing -- https://github.com/mifi/lossless-cut/issues/126 https://github.com/mifi/lossless-cut/issues/126
- oefrha 4y ago> If you happen to want a cut just 20 frames after a keyframe, those 20 frames could be computed (decoded) in order to create a new keyframe right in the spot you wanted. All the P-frames and B-frames in between two I-frames have to be recomputed. That’s by definition re-encoding and not lossless. You could re-encode just that small segment though.
- maria2 4y agoThis would obviously be codec dependent, but I'm surprised it's impossible to losslessly re-encode a video given I, P, and B frames. Mentally, I think of P frames as containing "changes" in the frame. The changes would be the same regardless of whether or not the previous frame was an I or P frame.
- oefrha 4y ago> I'm surprised it's impossible to losslessly re-encode a video It is possible, it will just be a ridiculously large video. > Mentally, I think of P frames as containing "changes" in the frame. The changes would be the same regardless of whether or not the previous frame was an I or P frame. P-frames in modern codecs use multiple previously decoded frames, not just the previous frame. And I'm not getting into the complexity of frame ordering (decoded frames and presented frames can be ordered differently).
- QuantumGood 4y agoShotcut.org cuts the videos exactly where you want
- jgtrosh 4y agoBut not losslessly
- btdmaster 4y agoCould someone check whether avoid_negative_ts[0] would work? [0] https://video.stackexchange.com/a/18285 https://video.stackexchange.com/a/18285
- behnamoh 4y ago> I believe software should be available to everyone, and LosslessCut will always be free for anyone to use and look at the code. Costs $18.99 on App Store!
- deleted 4y ago[deleted]
- mig39 4y agobrew install losslesscut is free :-)
- danny8000 4y agoIf you click on the words "always be free", you will be taken to the GitHub project, from there click on the release in the right column, and then download it for your platform. The store links are for the "donation" purchase process.
- ilyt 4y agoThat's the price of devs having to deal with shitty Apple ecosystem
- smallstepforman 4y ago> does anybody know of an editor capable of cutting between inter frames? https://github.com/smallstepforman/Medo https://github.com/smallstepforman/Medo
- andrewia 4y agoThere's a beta feature to exactly cut, and re-encode just the affected "block".