FFmpeg Slow Down Video and Keep Audio Sync

This article explains how to use FFmpeg to slow down a video while keeping the audio perfectly in sync. You will learn the specific command-line filters required to adjust the video frame presentation timestamps alongside the audio speed, ensuring a seamless, slowed-down output file.

To slow down both video and audio in FFmpeg, you must use a complex filtergraph (-filter_complex) to modify the speed of both streams simultaneously. The video speed is controlled by the setpts filter, while the audio speed is adjusted using the atempo filter.

The Basic Command (0.5x Speed / Half Speed)

To slow a video down to half-speed (which doubles the duration), use the following command:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" output.mp4

How the Command Works

Slowing Down Video Even Further (e.g., 0.25x Speed)

The atempo filter in FFmpeg only supports values between 0.5 and 2.0. If you want to slow the video down even more, you must chain multiple atempo filters together.

For example, to slow a video down to quarter-speed (4x duration), use this command:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=4.0*PTS[v];[0:a]atempo=0.5,atempo=0.5[a]" -map "[v]" -map "[a]" output.mp4

In this command: * The video PTS is multiplied by 4.0. * The audio is slowed down by cascading two atempo=0.5 filters (\(0.5 \times 0.5 = 0.25\) speed).