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:
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.jpgI only get a truncated waveform corresponding to the first samples of my file:
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):
Install all the dependencies
sudo apt-get build-dep sndfile-tools sudo apt-get install octave-signal libsamplerate0-dev gitClone the sndfile-tools repo
git cloneBuild sndfile-tools binaries:
cd sndfile-tools/ ./autogen.sh ./configure makeCreate a waveform with
sndfile-waveform(default channel is 0, it can be changed with the--channeloption)./bin/sndfile-waveform /usr/share/sounds/ubuntu/stereo/desktop-login.ogg waveform.pngThe result png file:
The same file in audacity: