用FFmpeg改变音频音调
广告
{{v.name}}
升高音调,同时速度变快,代码如下
$ ffmpeg -i input.mp3 -af "asetrate=44100*1.5" output_higher_pitch.mp3
升高音调,保持原速,代码如下
$ ffmpeg -i input.mp3 -af "asetrate=44100*1.2, atempo=1/1.2" output_higher_pitch_constant_speed.mp3
降低音调,同时速度变慢,代码如下
$ ffmpeg -i input.mp3 -af "asetrate=44100*0.8" output_lower_pitch.mp3
降低音调,保持原速,代码如下
$ ffmpeg -i input.mp3 -af "asetrate=44100*0.9, atempo=1/0.9" output_lower_pitch_constant_speed.mp3
rubberband 滤镜可以更高质量地实现变调不变速。rubberband 升高 3 个半音,代码如下
$ ffmpeg -i input.mp3 -af "rubberband=pitch=3" output_higher_pitch_rubberband.mp3
rubberband 降低 4 个半音,代码如下
$ ffmpeg -i input.mp3 -af "rubberband=pitch=-4" output_lower_pitch_rubberband.mp3
rubberband 同时改变音调和速度,代码如下
$ ffmpeg -i input.mp3 -af "rubberband=pitch=2.0:tempo=1.5" output_pitch_and_tempo.mp3
友链