-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop all non-keyframes to speed up long footage #2111
Comments
I think you can already do that by clicking on the change speed icon next to the fps in the lower left |
That is close but it still outputs all the frames and just tells the player to speed up. |
It’s not possible to losslessly change the speed without re-encoding or playing existing frames faster afaik, or am i missing something? |
FFMPEG can actually do this by grabbing only the keyframes and copying them, at least for H264. I tried this quickly on a video and it worked (no transcoding involved).
|
Ohh okay cool! Gyan from the ffmpeg team always seems to have the answers 🙌 But then you are at the mercy of the keyframe interval, right? it wouldn't allow "speed up the frame rate by an integer multiple". The resulting file would play only the keyframes and nothing else. That would effectively give a keyframe interval of 1. I think some players have problems playing back videos that only have keyframes (as it requires more bandwidth and cpu to decode keyframes compared to other frames). I agree it would be a cool trick, maybe we can have a tool in the "Tools" menu that allows stripping out non-keyframes from a video using this command. also: even though technically the keyframes don't lose any quality, in a whole it's quite a lossy operation because all non-keyframes are lost 😅 but I guess the main benefit is that the operation would be very fast. |
Yes, I agree it is lossy, but it is fast and less lossy than "cut" right? 😅 For playback, I had made the assumption that it would take less CPU power to play keyframe-only sections, but you are right that the memory/file bandwidth probably jumps a lot. Instead of the tools menu, if a user could click on the "trash" icon in the timeline and have it change to a ">>" or similar for the segment it would be slick. Might be difficult to differentiate the icon click from a seek click? I am poking around the FFMPEG source to see if there is a way to throw out some of the keyframes as well to be able to adjust the speedup |
Yeah, doesn't look like there is a way to do any faster than keyframes only. Still pretty useful level of speed up though. |
I just assumed that rendering a high quality detailed keyframe takes more cpu than calculating the next frame based on an existing frame and a motion vector, but i might be wrong.
That would not be trivial to implement so I probably won't implement it that way for such a niche use case unless it becomes a tremendously popular request.
|
The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first
Description
In the "Export Mode" dropdown, it would be awesome if there were a "Fast Forward Cuts" option. Instead of cutting, it would speed up the frame rate by an integer multiple and merge.
It would be fantastic for quickly cropping down long security camera footage!
To keep export performance, it could:
Thanks, awesome work!
The text was updated successfully, but these errors were encountered: