DEV Community

Danny Andreev
Danny Andreev

Posted on

FFMPEG Compress and change playback

I am using ffmpeg to take an mp4 file, compress and increase its playback speed.

ffmpeg -i "%loc%\%fileName%" -filter_complex "[0:v]setpts=0.125*PTS[v];[0:a]atempo=8[a]" -map "[v]" -map "[a]" "%loc%\%folderName%\%folderName% 8xPlayback.mp4"

However I need to create multiple files with different playback speeds (2x,4x,8x,16x,32x,64x... etc)
It seems awfully inefficient to run the command above over and over to get the different playbacks.

Im thinking the most efficient way would be to create a single compressed file and then sample it for 2x, 4x, etc...

How would I go about doing this?

Top comments (0)