Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter out voice frequency with FFMpeg

Tags:

ffmpeg

Using ffmpeg can i filter out the voice frequency? I checked the voice frequency is somewhere in 300 Hz to 3000 Hz. i just want the music from a mp3 file!

like image 352
shrw Avatar asked Feb 09 '14 12:02

shrw


1 Answers

What you're looking for is the bandreject filter I suppose:

ffmpeg.exe -i song.wav -c:a pcm_s16le -af "bandreject=f=900:width_type=h:w=600" out.wav -y

This command attenuates everything between 900 - 600 = 300 Hz and 900 + 600 = 1500 Hz.For some reason the width value can't be higher than 999 Hz... Bear in mind that the attenuation is not perfect so if you want more attenuation you can chain the filter as many time as you want:

ffmpeg.exe -i song.wav -c:a pcm_s16le -af "bandreject=f=900:width_type=h:w=600, bandreject=f=900:width_type=h:w=600" out.wav -y

I couldn't filter the voice out by applying these numbers though, you'll need to tweak the values.

like image 165
AJ29 Avatar answered Sep 28 '22 17:09

AJ29