Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)

ffmpeg how to change the tempo of an mp3 audio track

Written by John Riselvato - original link

Changing the tempo of an audio file is easy with atempo. This filter only accepts one value, a number between 0.5 and 100. In this example, the audio tempo is increased by 50%:

  $ ffmpeg -i input.mp3 -af "atempo=1.50" output.mp3

So how does 1.50 equal 50%? That’s because any value above 1.0 will increase the tempo and any value below 1.0 will decrease the tempo.

Here the tempo is reduced by 50% instead:

  $ ffmpeg -i input.mp3 -af "atempo=0.50" output.mp3

Reducing the tempo has an issue with making the playback choppy and robotic. This is because changing a tempo is a time-stretch. The audio is slower or faster but the pitch does not change.