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

Опубликовано: 07 Октябрь 2021
на канале: 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
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Смотрите видео How to change the speed of a video | Custom value video speed up and slow down онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The FFMPEG guy 07 Октябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,230 раз и оно понравилось 26 людям.