Every single resource I have looked up on how to do this has led me to exactly what I don't want, which is changing the framerate of a video in the sense of slowing it down.
If I want to, for example, change a 60FPS video to a 24FPS video with ffmpeg, NOT in the sense of lengthening the video but in the sense of removing frames, what is the command I should use?
Or, is that fundamentally impossible with most codecs without re-encoding (unless they are all i-frames)?
+ Reply to Thread
Results 1 to 3 of 3
-
-
See this recent thread
https://forum.videohelp.com/threads/401563-000131-redundant-frames -
Decimating 60 fps to 24 fps will give you jerky video. But if you must: "-vf fps=24".
And yes, you have to reencode. Remember that high compression codecs get a lot of their compression by not repeating parts of the picture that haven't changed -- to reconstruct a frame they copy parts of other frames. If some of those other frames are gone you can't reconstruct the frame. Here's a simple example using a very simple ipppp sequence with a single reference frame (each p frame only includes the changes from the previous frame). Consider a sequence of 5 frames, an i frame followed by 4 p frames.
The i frame can stand alone, it contains everything needed to reproduce that frame -- similar to the way a JPEG image contains everything needed to reconstruct a picture. But p1 only contains the changes between i0 and p1. p2 only contains the changes from p1 to p2. p3 only contains the changes from p2 to p3, etc. When the video is decompressed the decoder first decompresses the i frame and displays it. Then it adds the changes for p1 and displays that (ie, the data for p1 are instructions that say "copy i0, then add these changes...). Then the changes for p2 (copy p1 and and these changes...), etc.Code:i0 p1 p2 p3 p4
If you decimate that to (60p to 24p):
p2 can no longer be reconstructed because p1 is gone. p1 is required to reconstruct p2.Code:i0 p2
And if your decimation removes the I frame:
The entire GOP cannot be reconstructed.Code:p1 p3
Last edited by jagabo; 28th Apr 2021 at 07:38.
Similar Threads
-
ffmpeg -framerate
By koberulz in forum Newbie / General discussionsReplies: 2Last Post: 5th Jun 2020, 13:51 -
Wrong framerate during FFMPEG concatenation
By qo4on in forum Newbie / General discussionsReplies: 21Last Post: 28th Apr 2020, 07:57 -
lossless framerate change with ffmpeg?
By BabaG in forum Video ConversionReplies: 7Last Post: 8th Feb 2020, 20:53 -
FFMPEG, VP9 and Google Developers
By Drag in forum EditingReplies: 2Last Post: 16th Oct 2018, 08:44 -
FFmpeg transcode .m3u8 return (401 Unauthorized authorization failed)
By qoraiche in forum Video Streaming DownloadingReplies: 3Last Post: 9th Nov 2017, 20:42



Quote