Speeding up/slowing down video using ffmpeg:
-i = input file(mov,mp4,avi,mkv,flv)
-filter:v= video filter
-filter:a= audio filter(The atempo filter is limited to using values between 0.5 and 2.0)
setpts= set presentation timestamp
-r = frame rate
Slowing down:
Video:
ffmpeg -i input.mp4 -filter:v "setpts=2.0*PTS" output.mp4 //half speed
ffmpeg -i input.mp4 -filter:v -r 30 "setpts=2.0*PTS" output.mp4 //half speed with fps 30
(Note: More fps= Large video size)
Audio:
ffmpeg -i input.mkv -filter:a "atempo=2.0" -vn output.mkv
Speeding up:
Video:
ffmpeg -i input.mp4 -filter:v "setpts=2.0*PTS" output.mp4 //2xfaster
Audio:
ffmpeg -i input.mkv -filter:a "atempo=0.5" -vn output.mkv
Download ffmpeg : https://www.ffmpeg.org/download.html
More info :ffmpeg.org
-i = input file(mov,mp4,avi,mkv,flv)
-filter:v= video filter
-filter:a= audio filter(The atempo filter is limited to using values between 0.5 and 2.0)
setpts= set presentation timestamp
-r = frame rate
Slowing down:
Video:
ffmpeg -i input.mp4 -filter:v "setpts=2.0*PTS" output.mp4 //half speed
ffmpeg -i input.mp4 -filter:v -r 30 "setpts=2.0*PTS" output.mp4 //half speed with fps 30
(Note: More fps= Large video size)
Audio:
ffmpeg -i input.mkv -filter:a "atempo=2.0" -vn output.mkv
Speeding up:
Video:
ffmpeg -i input.mp4 -filter:v "setpts=2.0*PTS" output.mp4 //2xfaster
Audio:
ffmpeg -i input.mkv -filter:a "atempo=0.5" -vn output.mkv
Download ffmpeg : https://www.ffmpeg.org/download.html
More info :ffmpeg.org
Typos in your commands:
ReplyDeleteIs:
>Slowing down:
>Video:
>ffmpeg -i input.mp4 -filter:v -r 30 "setpts=2.0*PTS" output.mp4 //half speed with fps 30 (Note: More fps= Large video size)
Should be:
>ffmpeg -i input.mp4 -r 30 -filter:v "setpts=2.0*PTS" output.mp4 //half speed with fps 30 (Note: More fps= Large video size)
Is:
>Speeding up:
>Video:
>ffmpeg -i input.mp4 -filter:v "setpts=2.0*PTS" output.mp4 //2xfaster
Should be:
>ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" output.mp4 //2xfaster