2

I want to change the frequency of my videos. I think I can do this with ffmpeg equalizer but i couldn't find any documents about that. My video's name is video1.mp4

Thank you.

4
  • What do you want to do, exactly? What do you mean by, "change the frequency of my videos"?
    – llogan
    Jan 1, 2014 at 23:10
  • I want to add some noise and change octave, slope, Q-Factor, Hz. I have to try all of them one by one. I am trying something on my videos so i don't know which one is suitable for my project.
    – iwocan
    Jan 1, 2014 at 23:27
  • Why couldn't you find documentation about it? The equalizer filter is fairly well documented. What have you already tried?
    – slhck
    Jan 2, 2014 at 7:28
  • There is no examples about that and i don't know how to write the code with those information.
    – iwocan
    Jan 2, 2014 at 13:05

1 Answer 1

11

I would strongly encourage you to read the documentation. Even if there is no example, there is a specific description of how filters are defined on the command line.

A filter is represented by a string of the form: filter_name=arguments (…)

arguments is a string which contains the parameters used to initialize the filter instance

  • A :-separated list of key=value pairs.

So, the equalizer filter takes these (required) arguments:

  • f – central frequency in Hz
  • width_type – for defining the bandwidth, can be one of h (Hz), q (Q), o (octave) or s (slope).
  • w – the value of the chosen bandwidth
  • g – the gain

Now let's put that all together. For example, you can use this command to attenuate 10 dB at 1000 Hz with a bandwidth of 200 Hz:

ffmpeg -i input.wav -af "equalizer=f=1000:width_type=h:width=200:g=-10" output.wav

Or, for equalizing 2 octaves from 440 Hz (i.e., 220–880 Hz), with a gain of 5 dB (beware of clipping!):

ffmpeg -i input.wav -af "equalizer=f=440:width_type=o:width=2:g=5" output.wav

And if you want to combine these two, separate them by a ,:

ffmpeg -i input.wav -af "equalizer=f=440:width_type=o:width=2:g=5,equalizer=f=1000:width_type=h:width=200:g=-10" output.wav
3
  • 2
    I sent a patch to include some examples in the documentation.
    – slhck
    Jan 3, 2014 at 8:44
  • Thank you @slhck .These examples helped me a lot. I have another question about audio filters on ffmpeg. Is the time stretching possible on ffmpeg? This link explains what is time-stretch.
    – iwocan
    Jan 4, 2014 at 2:12
  • 1
    See Tool to bulk speed up/convert an audio file
    – slhck
    Jan 4, 2014 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .