[FFmpeg-user] pitch corecting audio?

Moritz Barsnick barsnick at gmx.net
Wed Mar 25 22:26:36 CET 2015


On Wed, Mar 25, 2015 at 11:56:01 -0700, James Heliker wrote:
> I've got content that was originally 23.976 sped up to 25 for european 
> distribution. I need to shift / correct the audio pitch back down to 
> normal without affecting the timing. Is there a filter for FFmpeg that 
> can accomplish this task? I've been reading through the online 
> documentation for things like atempo and asetrate but they don't seem to 
> do what I need.

I think those filters will do what you want:

The original was sped up with a pitch shift. It should have been sped
up without (e.g. with something like atempo), but wasn't. So you - sort
of - could reverse the process and then do it correctly.

  -af asetrate=r=24000/1001/25*<currentrate>,atempo=25*1001/24000

You may want to resample to an acceptable sample rate (depends on the
output format, I guess) by using
  -ar <properrate>
e.g.
  -ar 48000

ffmpeg doesn't seem to have a pitch filter, though atempo should be
something like an inverse operation of that. sox does have a pitch
filter, IIUC. rubberband also shifts pitch. You could separate video
and audio, use sox or rubberband on the audio, and remux. You may risk
losing A/V sync though, due to lost timestamps.

Moritz


More information about the ffmpeg-user mailing list