VideoHelp Forum


Try StreamFab All-in-One and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Chicken McNewblet
    Join Date
    Sep 2009
    Location
    United States
    Search Comp PM
    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)?
    Quote Quote  
  2. 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.

    Code:
    i0 p1 p2 p3 p4
    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.

    If you decimate that to (60p to 24p):

    Code:
    i0 p2
    p2 can no longer be reconstructed because p1 is gone. p1 is required to reconstruct p2.

    And if your decimation removes the I frame:

    Code:
    p1 p3
    The entire GOP cannot be reconstructed.
    Last edited by jagabo; 28th Apr 2021 at 06:38.
    Quote Quote  



Similar Threads