How to change the speed of a video | Custom value video speed up and slow down

Published: 07 October 2021
on channel: The FFMPEG guy
1,230
26

Today, we show how to speed up and slow down a video using a custom value. Parameters can of course be tuned to suit your individual needs.

My other speed up / slow down tutorials:
How to slow down a video and / or audio | Speed Change
   • How to slow down a video and / or aud...  

How to speed up a video and / or audio | Accelerate
   • How to speed up a video and / or audi...  

EXAMPLES
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Speeding up a video by a custom value (= 1.1 in the example)
→ ffmpeg -i input.mp4 -vf "setpts=(PTS-STARTPTS)/1.1" -af atempo=1.1 output01.mp4

with:
-i input.mp4 = Reads file «input.mp4» and …
-vf "setpts = …calls the «setpts» video filter (vf) that changes the Presentation TimeStamp (PTS) of the input video.…
(PTS-STARTPTS) = … considering the start of the video (STARTPTS) as the 0 for timestamping …
1.1 = … and calculating new PTS values that are 1.1 smaller than what they were originally … (i.e. the video will then playback faster)…
-af atempo = … Starts now the audio filter (af) “atempo” …
1.1 = … to accelerate the audio soundtrack by a factor 1.1 … Note: When tempo is greater than 2, atempo will skip some samples rather than blend them in. If this is an issue for you, it is always possible to daisy-chain several instances of atempo to achieve the desired product tempo. See my other “Speed up video tutorial” for more info
output01.mp4 = … and outputs the result to file «output01.mp4»

❷ Slowing down a video by a custom value (= 2 in the example, or 1/0.5)
→ ffmpeg -i input.mp4 -vf "setpts=(PTS-STARTPTS)/0.5" -af atempo=0.5 output02.mp4

with:
-i input.mp4 = Reads file «input.mp4» and …
-vf "setpts" = …calls the «setpts» video filter (vf) that changes the Presentation TimeStamp (PTS) of the input video.…
(PTS-STARTPTS) = … considering the start of the video (STARTPTS) as the 0 for timestamping …
/0.5 = … and calculating new PTS values that are 1/0.5 bigger (= x2) than what they were originally … (i.e. the video will then playback slower)… Note: I use the 1/0.5 here instead of *2 so that we can use the same factor later on for the audio filter
-af atempo = … Starts now the audio filter (af) “atempo” …
0.5 = … to slow down the audio soundtrack by a factor 0.5 …
output02.mp4 = … and outputs the result to file «output02.mp4»
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Clash of Gods - Quincas Moreira
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Watch video How to change the speed of a video | Custom value video speed up and slow down online without registration, duration hours minute second in high quality. This video was added by user The FFMPEG guy 07 October 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,230 once and liked it 26 people.