lossless-cut icon indicating copy to clipboard operation
lossless-cut copied to clipboard

[Feature Request] Playback Speed adjustment per segment for time-lapse and slow-mo clips

Open NoahIles opened this issue 5 years ago • 9 comments

  • [ * ] I have tested the newest version from GitHub: https://github.com/mifi/lossless-cut/releases/latest
  • [ * ] I have checked readme and Known issues / Troubleshooting
  • [ * ] I have searched for similar issues

Hey love the app, it's the best I have found for cutting up footage. If I could ask for anything it would be this. Thanks for making such an amazing app!

NoahIles avatar Jan 07 '21 14:01 NoahIles

That would require re-incoding which misses the point of the app of lossless editing /cutting, thus I'd be surprised this would be included.

At least for changing the speed per say, unless we could find a way to create slow-mo's by duplicating frames to keep it lossless and faster to export (over re-incoding) and removing frames for shorter slow-mo's / speed up clips that way. Whether end results look good enough is another question and due to the challenge of keyframe cut makes it only more difficult if not even impossible.

I love the app too and the more we can do tasks we are used in NLE's the more we stay in LC. :)

markusd1984 avatar Jan 07 '21 23:01 markusd1984

I did some googling before I made this post originally and found out that ffmpeg could "change the speed of a video stream using setpts video filter", I don't fully understand when re-encoding is necessary, using ffmpeg. When is re-encoding is necessary? Is it not when exporting and merging multiple segments? There is a lot to this project that is new to me.

I definitely want to do more research into electron, react, and ffmpeg and try to figure out if I could at all contribute. I have a lot to learn. What do you mean by NLE's? In my experience with video editing exporting would involve encode a file.

NoahIles avatar Jan 08 '21 03:01 NoahIles

The whole point of losslesscut is that it cuts segments out or merges them without re-encoding, so that one doesn't loose any quality compared to traditional video editors (NLE = Non-Linear Editors) which creating an entirely new video thus need to use encoding, also LC is way faster (seconds/minutes vs hours).

markusd1984 avatar Jan 08 '21 12:01 markusd1984

Makes some sense, thanks for the reply! Maybe I should just look into ffmpeg's documentation more.

NoahIles avatar Jan 08 '21 12:01 NoahIles

Thanks for explanation @markusd1984 - you are right. Afaik also it's not possible to do this with re-encoding. I added a point to the lossy issue #372 But to be honest, I think instead of adding many lossy features to losslesscut, I will probably instead create a new app for that.

mifi avatar Jan 18 '21 21:01 mifi

@NoahIles if you're interested in an implementation using setpts, check out autoscrub, which hastens silent intervals.

rpanderson avatar Jun 23 '21 03:06 rpanderson

shouldn't it be possible to losslessly save a clip (60fps, 1sec) to a clip (30fps, 2sec)? all the frames would remain the same, just be played over a different amount of time

tazztone avatar Mar 05 '23 18:03 tazztone

You would think so. After some googling it does seem to be possible by tricking ffmpeg (or other tools) to effectively ignore the FPS value and use some other value instead. And if there is audio, then the audio will have to get sped-up or slowed down, or re-encoded. So maybe it could be possible for LosslessCut to have such a hack also.

  • https://stackoverflow.com/questions/44218327/how-can-i-change-a-video-frame-rate-with-ffmpeg-lossless-and-keeping-the-same-t
  • https://superuser.com/questions/1088382/change-framerate-in-ffmpeg-without-reencoding
  • https://superuser.com/questions/320045/change-the-frame-rate-of-an-mp4-video-with-ffmpeg

mifi avatar Mar 06 '23 04:03 mifi