[FFmpeg-user] How to get spectrum data using C api

Ted Park kumowoon1025 at gmail.com
Sat Jan 4 10:56:11 EET 2020


> I'm trying to convert an audio file into a spectrogram to do some
> subsequent audio analysis. Is there anything on the C level to help
> with this?
> 
> The only thing I've found is the showspectrum filter, but this outputs
> a picture. However I'd just like to read out the spectrum data, I'm
> not interested in the visuals.
> 
> How should I approach this?

A fair amount of audio analysis has to be done to generate a spectrogram though. And it represents a fraction of the information that is used to generate it. I’d suggest reading up on the Fourier transform and start at libavcodec/fft.h.


More information about the ffmpeg-user mailing list