[Bug 787238] New: Spectrum plugin shows magnitudes that are way too small

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Sep 4 09:31:00 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787238

            Bug ID: 787238
           Summary: Spectrum plugin shows magnitudes that are way too
                    small
    Classification: Platform
           Product: GStreamer
           Version: 1.8.3
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: r.felgenhauer at wenzel-elektronik.de
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 359057
  --> https://bugzilla.gnome.org/attachment.cgi?id=359057&action=edit
Source code to reproduce the issue

The spectrum plugin shows extremely inaccurate values for the magnitudes of the
audio.

I have created an example application (file attached) which is a modified copy
of the spectrum example from
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-spectrum.html

The changes I've made:
- Exchange the fakesink for a filesink and export a wavefile
- Only show bands which have a magnitude > threshold / 2
- Set spectrum bands to 1024, audio frequency to 48000
- Globally defined threshold

The messages I receive look consistently like this:

New spectrum message, endtime 0:01:20.800000000
band 255 (freq 5988.28): magnitude -17.337473 dB phase 0.785320
band 256 (freq 6011.72): magnitude -13.766866 dB phase -2.356143
band 257 (freq 6035.16): magnitude -25.419439 dB phase 0.785200

One can see that the max. magnitude is -13.8 dB @ 6012 Hz.

Now importing the wave file into Audacity and using its spectrum visualizer,
one can see that the magnitude of the wave file is actually about -0.6 dB @
6033 Hz.

So the dominant frequency is fairly accurate, but the max. magnitude by far is
not. Since the spectrum plugin does its job in real time and the Audacity
feature does not, I don't expect the same result, but the difference is too
large nonetheless.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list