Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Is the Difference Between asetpts and atempo in FFmpeg Audio Filters?

Tags:

ffmpeg

audio

I have been using FFmpeg to slow down or speed up video files (with audio). It seems that to speed up a video, setpts=0.5*PTS should be used. However, when speeding up an audio, asetpts=0.5*PTS and atempo=2.0 are both available. What is the difference between these two options? Which is the better option?

like image 455
Eric Stdlib Avatar asked Oct 29 '22 07:10

Eric Stdlib


1 Answers

Like setpts, asetpts drops or duplicates audio frame to the specified frame rate while atempo changes the speed of audio.

Comparing asetpts=PTS/2 and atempo=2.0, some information is lost when you use in asetpts. Try it and you can hear the difference.

like image 134
simonmysun Avatar answered Jan 02 '23 19:01

simonmysun