Speed up or slow down a video with FFmpeg

Here’s how to double the speed of a video using FFmpeg:

ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" output.mp4

The 0.5 in "setpts=0.5*PTS" tells the video frames (technically their timestamps) how much to multiply by. Use a value greater than 1 to slow down the video.

Check out the official wiki for more methods including how to smooth out the result.