How to speed up sound and video and modify the pitch?

Viewed 2118

I want to increase speed on both the sound and the video, while adding pitch to the audio alone.

I have those two ffmpeg commands, but I don't know how to make them work together.

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.94*PTS[v];[0:a]atempo=1.06[a]" -map "[v]" -map "[a]" output.mkv

and

ffmpeg -i input.mkv -filter:a "atempo=1.06,asetrate=44100*1.25" output.mkv
1 Answers

Combined command:

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.94*PTS[v];[0:a]atempo=1.06,asetrate=44100*1.25[a]" -map "[v]" -map "[a]" output.mkv

Although I assume you want to reset the audio sample rate from 55125 back to 44100:

ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.94*PTS[v];[0:a]atempo=1.06,asetrate=44100*1.25,aformat=sample_rates=44100[a]" -map "[v]" -map "[a]" output.mkv

Alternatively, just add -ar 44100 output option to the first example.

Related