Speed Up Video 2x with FFmpeg on Linux

To speed up a video by double its original speed using FFmpeg on Linux, you need to adjust both the video stream and the audio stream to keep them in sync. This is achieved by using the video filter -filter:v "setpts=0.5*PTS" to compress the presentation timestamps by half, and the audio filter -filter:a "atempo=2.0" to double the audio playback speed. Combining these two filters into a single command allows you to efficiently accelerate your media files right from your terminal without losing quality.

The Basic FFmpeg Command

To double the speed of your video and audio simultaneously, open your terminal and run the following command:

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

Understanding the Command Breakdown

Advanced Alternative: Speeding Up Without Re-encoding Audio

If your video does not have audio, or if you plan to discard the audio entirely to save processing time, you can drop the audio track completely. This method is much faster because FFmpeg does not have to re-encode any audio data:

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

The -an flag tells FFmpeg to disable audio recording in the output file, leaving you with a silent, double-speed video.