[Libav-user] Questions with avf_showspectrum.c
rhuang.work at gmail.com
Wed May 21 21:50:07 CEST 2014
Thank you Clement, your answers helped.
On May 15, 2014, at 12:05 AM, Clément Bœsch <u at pkh.me> wrote:
> On Wed, May 14, 2014 at 06:54:45PM -0700, Ricky Huang wrote:
>> Hello all,
>> I am currently examining avf_showspectrum.c and I have a few questions that I am hoping you guys can clarify for me:
>> (This is the command I am running, BTW: ./ffmpeg -i input.mp3 -filter_complex showspectrum=mode=separate:color=intensity:slide=0:scale=cbrt -y output.avi)
>> 1) First it is about the output: I am assuming the plotted image has time horizontally, the frequency range vertically, and the intensity of color as the amplitude. Is that correct?
>> 2) In plot_spectrum_column() function, the code copies some amount of the data to the rdft_data:
>>> s->rdft_data[ch][start + n] = p[n] * s->window_func_lut[start + n];
>> and then performs a av_rdft_calc() on the data. But it's never clear the s->rdft_data array, does this mean the plot is cumulative over time?
> see s->filled, which represents the amount of data loaded in rdft_data. It
> doesn't need to be cleared, the buffer content will be replaced, and when
> it's fully replaced a new av_rdft_calc() will occur. Every sample will be
> used only once, no accumulation.
>> Thanks in advance.
> Clément B.
> Libav-user mailing list
> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user