Audio filter: atempo
In FFmpeg to adjust the tempo of the audio, we can use the special atempo filter described in the table
Description | Changes audio tempo – the speed of the audio stream. |
Syntax | atempo[=tempo] |
Description of parameter
tempo | float number from the range 0.5 – 2.0, values less than 1.0 slows down and values over 1.0 speed up the tempo, the default value is 1.0 |
For example to hear the input audio with a 2-times faster speed, we can use the command:
ffplay -i speech.mp3 -af atempo=2
For example to synchronize with timestamps the data in the file music.mpg we can use the command:
ffmpeg -i music.mpg -af asyncts=compensate=1 -f mpegts music.ts