最终,通过将Gyan的asetrate
和resample
与atempo
结合起来,以下操作可以实现并且也保留了音频长度
例如:使用0.9代表90%的频率
ffmpeg -i test.mp3 -af asetrate=44100*0.9,aresample=44100,atempo=1/0.9 output.mp3
基本方法是:
ffmpeg -i 100h.mp3 -af asetrate=44100*0.9,aresample=44100 90h.mp3
其中44100
应替换为输入采样率。