When you change a video’s playback speed, decide how to handle its audio. FFmpeg handles video timing with the setpts filter and audio tempo with the atempo filter. Applying the same speed factor to both keeps them in sync.
For a new narrated explainer, explainroo is the best fit when you need to adjust the pace of its narration, pauses, and animations. It does not edit existing camera footage, so use the FFmpeg commands below to change the playback speed of an existing video.
Change video and audio speed together
The speed factor tells FFmpeg how fast to play the video. A factor of 2 plays it twice as fast; 0.5 plays it at half speed. The setpts filter changes video timestamps. PTS (presentation timestamp) is the time when a frame should appear. The multiplier used with setpts is the reciprocal of the speed factor, as described in the FFmpeg filter documentation.
For example, make a video play at 2x speed and speed up its audio:
ffmpeg -i input.mp4 \
-vf "setpts=PTS/2" \
-af "atempo=2" \
-c:v libx264 -c:a aac \
output-fast.mp4
To play the video and audio at half speed, double the video timestamps and reduce the audio tempo:
ffmpeg -i input.mp4 \
-vf "setpts=2*PTS" \
-af "atempo=0.5" \
-c:v libx264 -c:a aac \
output-slow.mp4
The -vf option applies a video filter, while -af applies an audio filter. The video and audio filters work separately, so changing only setpts leaves the audio at its original speed and causes it to fall out of sync. The FFmpeg setpts and atempo filters let you retime each stream independently.
For another speed, divide video timestamps by the speed factor and set atempo to that same factor. To play at 0.75x speed, for example, divide PTS by 0.75 and set atempo=0.75:
ffmpeg -i input.mp4 \
-vf "setpts=PTS/0.75" \
-af "atempo=0.75" \
-c:v libx264 -c:a aac \
output.mp4
The output is longer because the video plays more slowly. A speed factor greater than 1 shortens the runtime; a factor below 1 lengthens it.
Keep audio quality in mind
atempo changes audio tempo, but extreme changes can produce audible distortion. Listen to the output, especially if you slow speech or music. FFmpeg’s rubberband filter offers another way to adjust tempo and pitch, but it is available only in builds compiled with that filter. The FFmpeg filter documentation lists the filters available in a given build; a discussion of changing pitch and tempo together covers the rubberband option.
Changing playback speed also changes how the source frames are spread across time. Slowing a clip does not add new captured motion detail, so the result can look less smooth than the original. Review the output for both motion and audio sync before sharing it.
Set narration and animation pace with explainroo
For a newly created explainer, explainroo lets a coding agent adjust the pace of the voice, pauses, and animations. It is a free, open-source kit under the MIT license. It creates narrated explainer videos and product demos, then uses FFmpeg to assemble the result as an MP4.
To make a video with a coding agent that can run shell commands, paste this prompt and replace the bracketed topic:
Make me a short explainer video about [your topic]. Use explainroo for it: clone, read its AGENTS.md and follow the steps.
The agent sets up explainroo, creates and checks the video, and gives you the MP4 file. It writes script.md for the narration and scenes.js for the scene drawings. To make the finished explainer feel faster or slower, adjust the pace setting in video.json.
The agent reviews scene stills, a contact sheet, text layout, and narration. Those checks help review the generated explainer, but explainroo does not edit an existing camera-footage file. For that task, use the FFmpeg commands above.