Glam Prestige Journal

Bright entertainment trends with youth appeal.

What is the proper gst-launch sink chain to use any one of the audiovisualizers?

Any other tool that is working?

I've seen the

But before trying to dive into compiling it, maybe there is a way to do it with gstreamer? Or anyone who can confirm that it will compile fine.

1 Answer

You can't use the Gstreamer audiovisualizers as all of them are only creating a frame for a scope-like renderer (i.e. a video sink, such as ximagesink)

Let's take the /usr/share/sounds/ubuntu/stereo/bell.ogg as a sample file.

If I open this file in audacity I can see a preview of the waveform:

enter image description here

But if I use the following pipeline:

gst-launch filesrc location=/usr/share/sounds/ubuntu/stereo/bell.ogg ! decodebin ! audioconvert ! wavescope ! jpegenc ! filesink location=waveform.jpg

I only get a truncated waveform corresponding to the first samples of my file:

enter image description here

sndfile-waveform is as you can guess, the perfect tool for this task but requires to be built from source (It will install ~200MB of dependencies though):

  1. Install all the dependencies

    sudo apt-get build-dep sndfile-tools
    sudo apt-get install octave-signal libsamplerate0-dev git
  2. Clone the sndfile-tools repo

    git clone 
  3. Build sndfile-tools binaries:

    cd sndfile-tools/
    ./autogen.sh
    ./configure
    make
  4. Create a waveform with sndfile-waveform (default channel is 0, it can be changed with the --channel option)

    ./bin/sndfile-waveform /usr/share/sounds/ubuntu/stereo/desktop-login.ogg waveform.png

    The result png file:

enter image description here

The same file in audacity:

enter image description here

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy