FFMPEG change Tone Frequency, keep length (Pitch Audio)
Asked Answered
C

2

16

How can I change the Tone frequency. This Example only pitches it by keeping the old tone frequency and only decrease the length of File.

For Example, I have a constant 100 Herz tone (as mp3) and I want it to change 90 Herz

 ffmpeg -i 100h.mp3 -af atempo=100/90 90h.mp3

This Example doesn't work for me, it sounds the same

inputfile Mp3
outputfile Mp3

Cissie answered 19/11, 2018 at 12:24 Comment(0)
C
23

finally, by combining the asetrate and resample from Gyan, with atempo, the following works and preserves also the audio length

for example: use 0.9 for 90% of the frequenz

 ffmpeg -i test.mp3 -af asetrate=44100*0.9,aresample=44100,atempo=1/0.9 output.mp3
Cissie answered 19/11, 2018 at 14:41 Comment(0)
R
9

Basic method is

ffmpeg -i 100h.mp3 -af asetrate=44100*0.9,aresample=44100 90h.mp3

where 44100 should be replaced with the input sample rate.

Renelle answered 19/11, 2018 at 13:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.