1

I have a video file and I want to quadruple the video and audio play speed. I followed the instructions here

https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video

So I tried these commands:

ffmpeg -i 02.mp4 -strict -2 -filter_complex "[0:v]setpts=0.25*PTS[v];[0:a]atempo=2.0[a];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -map "[a]" 02ff.mp4

This command quadrupled the video play speed but only doubled the audio play speed.

So then I tried this:

ffmpeg -i 02.mp4 -strict -2 -filter_complex "[0:v]setpts=0.25*PTS[v];[0:a]atempo=2.0[a];[0:a]atempo=2.0,atempo=2.0[a]" -map "[v]" -map "[a]" -map "[a]" 02ff.mp4

But still the same issue. I've tried a few other variations of this command but I just get errors.

What's the correct command to quadruple video play spdd and audio play speed?

1 Answer 1

3

The audio filters should be chained one after the another. Your syntax generates two audio tracks, each doubled in speed. Also, since you're dealing with one input and one output, you can just use simple filters.

ffmpeg -i 02.mp4 -vf "setpts=0.25*PTS" -af "atempo=2.0,atempo=2.0" 02ff.mp4
2
  • Thanks, I added the -strict -2 filter just after the 02.mp4 to get rid of the error ` The encoder 'aac' is experimental but experimental codecs`. Then everything worked Commented Jan 31, 2019 at 20:31
  • That message is for pre-2016 builds of ffmpeg, so you should upgrade.
    – Gyan
    Commented Feb 1, 2019 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.