[FFmpeg-user] How to slow down a video

Ulf Zibis Ulf.Zibis at CoSoCo.de
Tue May 5 14:21:14 EEST 2020


Am 04.05.2020 um 12:56 schrieb Michael Koch:
> Am 04.05.2020 um 11:00 schrieb Ulf Zibis:
> >//>/Am 27.03.20 um 04:06 schrieb Ted Park: />>/Hi, />>//>>>/for video: -vf setpts=0.5*PTS />>>/for audio: -af atempo=2 />>//>>/Actually, he wanted to slow down the video so you probably meant the />>/reciprocal of this, 2*PTS and atempo 1/2 />//>/Thanks alot, this works fine. />//>/Now I want to tweak a little bit more. I want to slow down the video />/by 1.4 and then increase the audio frequency by 1.25. So I did: />/ffmpeg -i in.mp4 -vf setpts=PTS*1.4 -af />/asetrate=48000*1.25,atempo=1/1.25/1.4 out.mp4 />//>/This resulted in really bad audio quality. The reason is maybe, that />/the sampling rate of the output was transformed to 64.000, but I want />/48.000. I guess there is a possibility to get a better result by using />/-af aresample, but I have problems to understand it's syntax. /
> try  -af aresample=48000
Do you mean, I should add this at the end of my filter chain? I can't imagine, that using it singular instead would do what I want.

Am 05.05.2020 um 09:06 schrieb Michael Koch:

> Regarding your question about audio length / sample rate / tempo, see also chapter 3.3 here:
> www.astro-electronic.de/FFmpeg_Book.pdf
Thanks for your hint, I will look at this.

-Ulf



More information about the ffmpeg-user mailing list