[FFmpeg-trac] #8919(avfilter:new): Setting 'fscale=log' together w/ 'start>0' will mess up the scaling of the y-axis in showspectrum(pic)
FFmpeg
trac at avcodec.org
Tue Oct 6 11:52:17 EEST 2020
#8919: Setting 'fscale=log' together w/ 'start>0' will mess up the scaling of the
y-axis in showspectrum(pic)
-------------------------------------+-------------------------------------
Reporter: rkleinert | Type: defect
Status: new | Priority: normal
Component: avfilter | Version: git-
Keywords: | master
showspectrum, showspectrumpic | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
== Summary of the bug: ==
In the 'showspectrum' and 'showspectrumpic'-functions you can choose to
scale the y-axis (frequencies) either linear or logarithmic (parameter
'fscale'). Also you can define the range of the y-axis (parameters 'start'
and 'stop'). If you choose logarithmic scaling and start at y=0Hz
('start=0') the y-axis is scaled correctly; i.e. the proportions from one
mark on the axis to the next in equal distances stays constant. If you
however choose anything else than 'start=0' the scaling is entirely wrong.
The ratio between the individual, equidistant marks on the y-axis will
start somewhere above 2 at the higher values and decrease to 1 further
down at the bottom of the axis.
== TL;DR: ==
Setting parameter 'fscale=log' together with 'start>0'will mess up the
scaling of the y-axis in showspectrum(pic)
== How to reproduce: ==
The exact way of calling the function doesn't seem to matter. It's just
about the situation explained above. I used this example to verify:
{{{
#!div style="font-size: 80%"
Sample Code:
ffmpeg -i input.wav -filter_complex
"showspectrumpic=size=700x400:mode=combined:color=rainbow:scale=sqrt:fscale=log:legend=1:start=500:stop=20000"
output.png
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8919>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list