I've been searching for an answer here on Stack Overflow and googling everywhere... even though it seems like it should be a very simple command line to me, I just can't find an answer anywhere.
I would like to change the frame rate of a video from 23.976fps to 24fps with FFmpeg, lossless and keeping the total number of frames.
To make it simpler:
Let's say I have a 25fps video with a total lenght of 100 frames.
How can I change it's frame rate to 50fps, with FFmpeg, lossless and keeping the same total lenght of 100 frames?
This was so far the best solution I came across with (which can be found here):
Extract the frames as rawvideo:
ffmpeg -i input.mov -f rawvideo -b 50000000 -pix_fmt yuv420p -vcodec rawvideo -s 1920x1080 -y temp.raw
Recreate the video with new framerate:
ffmpeg -f rawvideo -b 50000000 -pix_fmt yuv420p -r 24 -s 1920x1080 -i temp.raw -y output.mov
Note 1: I had to remove "-b 50000000" when recreating the video with the new frame rate, in order to get it to work properly.
It did exactly what I intended it to do, but I'm still wondering if there is any simpler way to do this? I've tried to pipe them together in one line only, as suggested in the same post, but couldn't get it to work.
Note 2: Even though it does exactly what I wanted it to do, I've just later realized there is quality loss using this method, which I would prefer to avoid.
Thanks everyone in advance!