I am trying to convert a video clip (MP4, yuv420p) from 30 fps to 24 fps. The number of frames is correct so my output should change from 20 minutes at 30fps to 25 minutes at 24fps. Everything else should remain the same.
Try as I might everything I try with ffmpeg converts the frame rate but changes the number of frames to keep the same duration or changes the duration without altering the framerate.
So I have been typically trying things like;
ffmpeg -y -r 30 -i seeing_noaudio.mp4 -r 24 seeing.mp4
(I'm doing this on windows but normally would be on linux). That converts the framerate but drops frames so the total duration is unaltered.
Or I have tried
ffmpeg -y -i seeing_noaudio.mp4 -filter:v "setpts=1.25*PTS" seeing.mp4
Which changes the duration but not the framerate.
Surely I should be able to do this with a single ffmpeg command without having to reencode or even as some people suggested going back to the original raw frames.
Help please
-y
flag indicates "Overwrite output files without asking". I had to go and find what that meant, to ensure I wasn't misunderstanding something here. I think it's immaterial to the question at hand, so should be removed to simplify things for everyone. – Connote-r
, documentation says, "As an input option, ignore any timestamps stored in the file and instead generate timestamps assuming constant frame ratefps
. As an output option, duplicate or drop input frames to achieve constant output frame ratefps
." – Connote-itsscale
input option to rescale input timestamps. For some reason-r
option mentioned by several answers did not work for me (ffmpeg version 4.4.2
) (and one upvoted comment mentioned it btw). – Original