Visualization fun with GStreamer

I have a Mini-ITX box connected to my TV. It worked very well on my old CRT TV, but now I have a Full HD TV. It went from 720×576 to 1920×1080: five times the pixel count (exactly!), or over 100MB/s (bytes, not bits of course) of raw video. It’s not all that much, but it’s way more than what the Mini-ITX can handle. With the magic of graphics hardware, however, it can show lower resolutions scaled up to 1920×1080 without breaking a sweat.

I had a lot of issues trying to get some music visualization running on it. There’s no way the poor thing can generate 1920×1080 pixels worth of visualization, let alone push it out to the TV. libvisual, the closest thing to a visualization standard there is, didn’t appear to have simple command line apps that you could point to a music file and hardware scale the visualizations to fullscreen.

There was projectM though, which has a clever system of capturing audio from the Pulse audio system and visualizing it with OpenGL scaling. That way you can use any music playing app you want, at any resolution you care to render and display. Unfortunately, the Openchrome drivers for the VIA hardware and the Qt OpenGL component really hated each other.

But hey, we have GStreamer!

gst-launch-0.10 pulsesrc device=alsa_output.hw_0.monitor ! queue ! audioconvert ! libvisual_infinite ! video/x-raw-rgb,width=640,height=360,framerate=25/1 ! ffmpegcolorspace ! queue ! xvimagesink

Grab audio from the pulse monitor device, run it through libvisual to get a visualization at the specified resolution, and show it through xvideo. All my requirements summed up in about two lines of gstreamer goodness!

3 thoughts on “Visualization fun with GStreamer”

  1. When I try this I get an error stating “no element libvisual_infinite”. I get the same message with libvisual_corona, etc. I do seem to have gstreamer-libvisual installed, though. “gst-inspect libvisual” give me this:

    Plugin Details:
    Name: libvisual
    Description: libvisual visualization plugins
    Filename: /usr/lib/gstreamer-0.10/
    Version: 0.10.21
    License: LGPL
    Source module: gst-plugins-base
    Binary package: GStreamer Base Plugins (Archlinux)
    Origin URL:

    0 features:

    This may be due the way gstreamer and libvisual is packaged and which packages are installed on my linux system (arch), but I think I’ve got all relevant packages. Do you know what I could do to fix or debug this further?

  2. @ Svein Halvor Halvorsen

    This thread seems to be exactly your problem, and it suggests deleting gstreamer related directories from your home dir.

    When working properly, it should say

      libvisual_corona: libvisual libvisual corona plugin plugin v.0.1
      libvisual_bumpscope: libvisual Bumpscope plugin plugin v.0.0.1
      8 features:
      +-- 8 elements

Leave a Reply