How to Speed up Video in FFmpeg [with Bonus Tip]

Sasha updated on Aug 16, 2024 to AI Article

To speed up the video playback, FFmpeg speed-up video commands are fast and accurate. The post talks about FFmpeg speed-up video and slow-down video. Also, find an easier alternative to FFmpeg to speed up the videos.

FFmpeg is an open-source and free software to process audio, video, and multimedia files. It is a command-line tool widely used for editing audio, video, transcoding, concatenating, video scaling, post-production, effects, and standards compliance. However, one needs to explore various commands to process the multimedia files. In this post, we will see how FFmpeg speed-up video works and how FFmpeg commands speed up and slow down the video.

Speed up/Slow Down Video in FFmpeg

PTS, abbreviated as Presentation Timestamp, is used to speed up or slow down the video with FFmpeg. You need to scale up/down the PTS of each video frame to get the desired results.

The setpts stands for set presentation timestamp and sets the PTS filter command to adjust the frame timestamps, which alters the playback speed. Learn the same with examples for speeding up and slowing down videos with FFmpeg.

Speed up Video in FFmpeg

To speed up a video, we reduce its overall playback. When we process a 20-minute long video with 3/4 (0.75) PTS, the output video will be 15 minutes in length. Similarly, if you do it by 1/2, the final video length will be 10 minutes.

To speed up the video, we multiply the PTS with a value less than 1.0. The command to set the 0.75 PTS to speed up the video will look like this:

ffmpeg -i input.mp4 -vf "setpts=0.75*PTS" output.mp4

The command re-encodes the setpts value to 0.75, speeding the video playback and making the length 15 minutes. The -vf indicates that FFmpeg should apply a video filter. The input and output files are the names of the input and output video files. Here are some examples:

  • setpts=0.5*PTS- to speed up the playback by 2 times.
  • setpts=0.25*PTS- to speed up the playback by 4 times.

Slow down Video in FFmpeg

Slowing down the video playback is the same as speeding up, except the PTS should be greater than 1.0. The setpts will take any value over 1.0 (positive floating point number) as an argument and do the job.

ffmpeg -i input.mp4 -vf "setpts=2.0*PTS" output.mp4

The "setpts=2.0*PTS" argument slows the video by two times. To slow down YouTube videos without changing pitch, you need to use setpts above 1.0. A 10-minute YouTube video will be 20 minutes long after processing using the FFmpeg. Here are a few other examples:

  • setpts=0.25*PTS- Plays the video four times slower than the input.

Bonus: Change Video Playback Speed Online

FFmpeg is a powerful and reliable tool for video and audio processing. All major editing platforms use FFmpeg in the backend to process the audio. However, many do not prefer using FFmpeg because of its complexity. With EaseUS Speed Changer, you don't have to remember complex commands and can change your playback speed with a simple UI.

Upload the video file on the website, use the speed slider to speed up MP3, MP4, and all supported video and audio formats, and download the output video. Along with speed, you can change the pitch of song and volume to furnish the audio. The interface is simple and multiple language support is available. Upload your video on Speed Changer and speed up/slow down the video.

To Conclude

FFmpeg lets users edit the audio and video with command line software. The post discusses FFmpeg speed up video commands to alter the playback speed of videos. Also, learn how to slow down video with FFmpeg. If you find it difficult to remember commands and don't want to download the software for a simple process, EaseUS Speed Changer is always there to help. Upload and change the playback speed to slow down or speed up the video.

FAQs on FFmpeg Speed up Video

Here are some command queries people ask about the FFmpeg speed up video.

1. How can I speed up an existing video?

Many software tools allow you to speed up an existing video online. Upload your video using tools like EaseUS Speed Changer, adjust the speed, and process to speed up the video playback speed.

2. How to increase conversion speed in FFmpeg?

FFmpeg re-encodes all the audio and video streams whenever you try to process them. So, add a -c option to the command to tell FFmpeg to copy the streams without re-encoding to increase the conversion speed.

3. Is FFmpeg faster with GPU?

Yes, GPU acceleration gives FFmpeg great advantages. Encoding and decoding with GPUs becomes faster even for HD content, saving time with an increase in conversion rate.

FFmpeg is a complex command line tool, but once you master it, the video and audio processing becomes way faster. Share the post with your friends and colleagues if you find it helpful.