What is the right way to get an audio stream?

45 views
Skip to first unread message

Davide Perini

unread,
May 10, 2021, 11:39:30 AM5/10/21
to gstream...@googlegroups.com
Hi all,
I would like to "listen" for the current audio stream, the idea is to
convert this audio stream in something
displayable by a LED strip.

A sort of WU Meter or something that moves accordingly with the music.

I would like to convert that audio to an RGB array basically.

Is this possible with GStreamer Java?
Just give me an hint if possible and I will try to study it :)

Thanks
Davide

Neil C Smith

unread,
May 11, 2021, 4:47:40 AM5/11/21
to gstream...@googlegroups.com
Hi Davide,

On Mon, 10 May 2021 at 16:39, Davide Perini
<perini...@dpsoftware.org> wrote:
> A sort of WU Meter or something that moves accordingly with the music.
...
> Is this possible with GStreamer Java?
> Just give me an hint if possible and I will try to study it :)

If you want audio level (as opposed to spectrum) check out the main
video player example, which has an audio level meter.

Best wishes,

Neil


--
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : Office 4 219 Kensington High Street,
Kensington, London, England, W8 6BD

Davide Perini

unread,
May 11, 2021, 9:34:35 AM5/11/21
to gstream...@googlegroups.com
Thank you for the answer Neil, I appreciate it.

Yes audio level is what I want, I have the video player example running,
love this bindings...
Is it possible to get the audio level from the "running audio output" of
the PC, example: speakers, headphone?

I mean, I would like to get the audio level from everything that is
producing a sound on the PC,
example: spotify, youtube, a videogame, a generic media player, ecc. ecc...

Thank you!
Davide

Neil C Smith

unread,
May 11, 2021, 10:22:02 AM5/11/21
to gstream...@googlegroups.com
On Tue, 11 May 2021 at 14:34, Davide Perini
<perini...@dpsoftware.org> wrote:
> Is it possible to get the audio level from the "running audio output" of
> the PC, example: speakers, headphone?

If it's not audio going through a GStreamer pipeline, then I think
you're going to have to look at mapping to an OS-specific API for this
yourself, or find one, sorry.

Davide Perini

unread,
May 11, 2021, 10:51:30 AM5/11/21
to gstream...@googlegroups.com
If there is a pipeline that is able to screen capture, isn't there a
pipeline that is able to "audio capture"?
Ok, this seems more a question for the gstreamer list more than this
one, sorry for the "off topic". :)

Thank you!!!
Davide

Neil C Smith

unread,
May 11, 2021, 11:00:06 AM5/11/21
to gstream...@googlegroups.com
Hi,

On Tue, 11 May 2021 at 15:51, Davide Perini
<perini...@dpsoftware.org> wrote:
>
> If there is a pipeline that is able to screen capture, isn't there a
> pipeline that is able to "audio capture"?
> Ok, this seems more a question for the gstreamer list more than this
> one, sorry for the "off topic". :)

Yes, that's possibly true. Certainly with the pulse audio source on
Linux you can get access to a monitor. You'll have to feed it into a
fakesink, or possibly appsink if you analyse yourself - you don't want
it output twice. But yes, I'd ask upstream - it's also going to be
platform specific. It's not quite what you were asking previously,
but it might work for you.

Davide Perini

unread,
May 11, 2021, 12:27:20 PM5/11/21
to gstream...@googlegroups.com
Yes my initial question wasn't well made :)
Asked this on the upstram, thank you Neil for the answer and for
maintaining this wonderful binding.

Bye
Davide
Reply all
Reply to author
Forward
0 new messages