How do I speed up slower video framerates with ffmpeg and get full 240fps and no truncated videos? I have a whole bunch of sports video clips that range from 6 to 25 seconds each, all recorded at 240fps but slowed down to 23.97, 25, 29.97 and 30fps (so they're in super slow motion).  I need to speed them back up.

I got the following command:

ffmpeg -i input.mov -vf "setpts=(PTS-STARTPTS)/10" -crf 18 output.mov


...from another stackexchange question.

I was able to use this successfully, but I have 3 questions:

1)  How do I preserve all of the frames?  The resulting video is only 30fps, which means the conversion process dropped the vast majority of frames - I'd like it to actually be a full 240fps.

2)  Some of the videos were truncated at the end.  For example, an 11 second video that originally showed an entire tennis forehand swing ends up stopping before the swing is completed.

3)  I read the documentation for probably a good 30 minutes trying to figure out what "-crf 18" does and for the life of me couldn't - would love if someone could explain this!
Use

ffmpeg -i input.mov -vf "setpts=N/240/TB" -r 240 -crf 18 output.mov


The only thing the setpts filter does is retime frames, but the designated frame rate of the stream is still its original framerate, whatever that is (25,30..). Use the fps filter to change that - the fps filter may also drop or duplicate frames, but not in this case. There's a bug in the fps filter which makes it ineffectual for this purpose. Use output -r.

The default encoder for MOV in FFmpeg is libx264. Its default ratecontrol mode is CRF. Lower values retain more of the original quality but produce larger files - 18 to 28 is a decent range. This has no effect on which frames are included in your output.