简体   繁体   English

使用FFmpeg的音频均衡器

[英]Audio equalizer using FFmpeg

I'm developing audio player using FFmpeg. 我正在使用FFmpeg开发音频播放器。 I want to add audio equaliqer to my app, but I don't know how to do it. 我想向我的应用程序添加音频均衡器,但是我不知道该怎么做。 I know that FFmpeg has a FFT functions, but I have count of samples that not mutch with any power of 2. I also tried to use other FFT libraries, but I have some noise on my audio after equalization. 我知道FFmpeg具有FFT功能,但是我有不算2的幂的样本计数。我也尝试使用其他FFT库,但是均衡后我的音频有些杂音。 Can anybody help me to understand how to use FFmpeg's FFT functions or any oter ways to implement audio-eq using FFmpeg? 有人可以帮助我了解如何使用FFmpeg的FFT函数或使用FFmpeg实现音频等效的其他方法吗?

If you want do use an FFT for fast convolution filtering, don't use the mp3 sample count. 如果要使用FFT进行快速卷积滤波,请不要使用mp3采样数。 Instead, you will need to re-buffer the audio data (perhaps using a circular buffer) to get new buffers of the appropriate size needed for the FFT. 取而代之的是,您将需要重新缓冲音频数据(也许使用循环缓冲区),以获得FFT所需大小合适的新缓冲区。 You will also need to zero-pad the FFT in order to do overlap-add or overlap-save fast convolution FFT filtering. 您还需要对FFT进行零填充,以便进行重叠添加或重叠保存快速卷积FFT滤波。 You will need to compute the length of the impulse response of your desired equalization in order to zero-pad the FFT by the appropriate amount. 您需要计算所需均衡的脉冲响应的长度,以使FFT零填充适当的量。 This may involve modification of the equalization filter in order to get a reasonable (finite) length FFT. 为了获得合理的(有限的)长度FFT,这可能涉及修改均衡滤波器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM