maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Party Animal: GStreamer visualisation! (https://talk.maemo.org/showthread.php?t=34717)

twaelti 2009-11-18 20:29

Party Animal: GStreamer music visualisation!
 
The power of Maemo - now as a party animal!

Another hidden gem discovered: Thanks to the inbuilt GStreamer multimedia framework, I was able to get music visualisation on my N900 :D This also works using TV-Out, so once built into a suitable media player, I guess the N900 can become the center of any party :cool:

http://farm3.static.flickr.com/2747/...9f134030_o.jpg

I also uploaded a short video on YouTube (read the disclaimer about flickering TV - it's my cam, not the N900...)

Here is the pipeline I used:
Code:

gst-launch filesrc location=/media/mmc1/universe.mp3 ! decodebin ! audioconvert ! tee name=myT myT. ! queue ! pulsesink myT. ! queue ! goom ! ffmpegcolorspace ! xvimagesink
I hope for the inbuilt media player, Media Box, Canola or Vagalume to soon feature great visualisations on the N900 ...

pycage 2009-11-18 21:30

Re: Party Animal: GStreamer visualisation!
 
There is already such a plugin for MediaBox buried somewhere deep in my drawer. Time to get it cleaned up and integrated into MediaBox. :)

slaxium 2009-11-18 21:42

Re: Party Animal: GStreamer visualisation!
 
Nice, i'll loving that "phone".
Is it possible to use all visualizations which are available for the normal gstreamer, or does it only work with this one? Of course the is a limitation of Hardware

twaelti 2009-12-08 20:04

Re: Party Animal: GStreamer visualisation!
 
Quote:

Originally Posted by slaxium (Post 381384)
Is it possible to use all visualizations which are available for the normal gstreamer, or does it only work with this one? Of course the is a limitation of Hardware

Sorry for the late reply, but missed your post. But good news: I've played around a bit more, and the two other things that I found are "monoscope" and "spectrum". Hadn't much success with Spectrum, but Monoscope works well!

http://farm3.static.flickr.com/2721/...d2cff48955.jpg
(sorry for the image quality, but it's not possible to take on-device screenshots in this mode)

Coolest thing is to attach Monoscope directly to the Microphone to get real-time voice/microphone waveform analysis:
Code:

gst-launch pulsesrc ! audioconvert ! tee ! queue ! monoscope ! ffmpegcolorspace ! xvimagesink
Try whistling at higher frequencies and watch the wavelength shrink...
Anybody to hook up a signal through the mic line-in?

The power of Maemo :D

nashith 2009-12-08 20:49

Re: Party Animal: GStreamer visualisation!
 
@twaelti, awesome idea about the signal input. Wonder if this would work http://xoscope.sourceforge.net/

vinz486 2010-01-17 23:52

Re: Party Animal: GStreamer visualisation!
 
Works on my Ubuntu box too :-D

Same command line on my pc and on my phone is "the new era" ...

DUDEXYZ 2010-09-12 12:59

Re: Party Animal: GStreamer music visualisation!
 
dude....i dint understand.....can u tell me in detail how to install those visualisation....sorry for my bad english....thanks in advance

AgentZ 2010-09-13 20:28

Re: Party Animal: GStreamer visualisation!
 
Are these easter eggs in the phone or are you downloading something from somewhere? The way I understand it, I can now have visualisation with all my music files is that correct?

MohammadAG 2010-09-13 21:11

Re: Party Animal: GStreamer visualisation!
 
As root:
Code:

apt-get install gstreamer0.10-plugins-good
then run the command he posted in the first post.

allnameswereout 2010-09-13 21:26

Re: Party Animal: GStreamer visualisation!
 
Someone should port Libvisual to Maemo :)

AgentZ 2010-09-13 23:55

Re: Party Animal: GStreamer visualisation!
 
Quote:

Originally Posted by MohammadAG (Post 815246)
As root:
Code:

apt-get install gstreamer0.10-plugins-good
then run the command he posted in the first post.

Ok, ran the code, plugins installed, but it says 6 are out there for upgrade? ran the code from the 1st post; get an error message "gst-launch" not found? What am I missing or not doing correctly?
TIA

pycage 2010-09-14 06:24

Re: Party Animal: GStreamer visualisation!
 
You need gst-tools from extras-devel for gst-launch.

hopla 2010-10-08 10:26

Re: Party Animal: GStreamer visualisation!
 
Quote:

Originally Posted by MohammadAG (Post 815246)
As root:
Code:

apt-get install gstreamer0.10-plugins-good
then run the command he posted in the first post.

And if you want to get the monoscope working:
Code:

apt-get install gstreamer0.10-plugins-good-extra

ug2215 2011-10-29 16:11

Re: Party Animal: GStreamer visualisation!
 
Thanks twaelti!

I do have some questions regarding performance and using the nokia's audio output to create the visualization.

Performance:
I've noticed that the visualizer doesn't tax the CPU much at all but I still got poor framerates. I assume this either means there's a bottleneck with the speed of memory or the speed of the DSP. I've tried clocking the DSP to very high frequencies but can't see a performance change (the framerate still drops low sometimes). Have you messed with performance?
Note: I notice that on the commandline it mentions /home/user not being "ours", I assume this means it's not available. Can we specify a folder that is available to it?

Source Audio:
I'm really enjoying using the microphone as the input to the visualizer but might like to use the device's own output at some point. I've tried specifying the output with
Code:

pulsesrc device=alsa_output.hw_0.monitor
but that doesn't run. Does anyone know what the name of that audio output is on Maemo?

Skaven2k2 2012-09-02 21:48

Re: Party Animal: GStreamer visualisation!
 
Hello, any news about the plugin for MediaBox? :)

Applesaws 2012-09-10 04:09

Re: Party Animal: GStreamer visualisation!
 
Quote:

Originally Posted by ug2215 (Post 1115611)
Source Audio:
I'm really enjoying using the microphone as the input to the visualizer but might like to use the device's own output at some point. I've tried specifying the output with
Code:

pulsesrc device=alsa_output.hw_0.monitor
but that doesn't run. Does anyone know what the name of that audio output is on Maemo?

Code:

pactl list | grep monitor
says that sink.hw0.monitor is the right source (bluetooth devices seem to use sink.hw1.monitor).
And sink.music.monitor will get you exclusively the output of the built-in mediaplayer. However, remember to get rid of the pulsesink output, otherwise you'll just get a bunch of echoing as it tries to play back the output to the same device:
Code:

gst-launch pulsesrc device=sink.hw0.monitor ! audioconvert ! goom ! ffmpegcolorspace ! xvimagesink
should suffice.


All times are GMT. The time now is 01:12.

vBulletin® Version 3.8.8