# Streaming audio to an icecast server

**URL:** https://discourse.nodered.org/t/streaming-audio-to-an-icecast-server/12856
**Category:** General
**Created:** [3 July 2019 12:46 UTC](https://discourse.nodered.org/t/streaming-audio-to-an-icecast-server/12856 "2019-07-03T12:46:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![b01](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@b01](https://discourse.nodered.org/u/b01)
#### Post date: [3 July 2019 12:46 UTC](https://discourse.nodered.org/t/streaming-audio-to-an-icecast-server/12856/1 "2019-07-03T12:46:58Z")

</div>

hello node-red community,

I'm willing to send an audio stream to an icecast server

I'd like to feed this audio stream with for example Text To Speech object and / or an audio source like another audio stream or file.

When I do that in script / bash, I use a ALSA sound loop virtual device [https://www.alsa-project.org/main/index.php/Matrix:Module-aloop](https://www.alsa-project.org/main/index.php/Matrix:Module-aloop) on which I can send an audio flux with sox/aplay and listen to this flux with ffmpeg which send the stream to icecast with a command like :

```auto
ffmpeg -ac 2 -f alsa -i hw:1,0 -acodec libmp3lame -ab 32k -ac 1 -content_type audio/mpeg -f mp3 icecast://source: ******** @mydomain.org:8000/mystream

```

This command works with an exec node, and if I try with another exec node the command :

```auto
aplay -l

```

It gives in the debug window (which is normal) :

```auto
msg.payload : string[678]
" ****List of PLAYBACK Hardware Devices**** ↵card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]↵ Subdevices: 6/8↵ Subdevice #0: subdevice #0↵ Subdevice #1: subdevice #1↵ Subdevice #2: subdevice #2↵ Subdevice #3: subdevice #3↵ Subdevice #4: subdevice #4↵ Subdevice #5: subdevice #5↵ Subdevice #6: subdevice #6↵ Subdevice #7: subdevice #7↵card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]↵ Subdevices: 8/8↵ Subdevice #0: subdevice #0↵ Subdevice #1: subdevice #1↵ Subdevice #2: subdevice #2↵ Subdevice #3: subdevice #3↵ Subdevice #4: subdevice #4↵ Subdevice #5: subdevice #5↵ Subdevice #6: subdevice #6↵ Subdevice #7: subdevice #7↵"

```

but I didn't found any node or exec command that would allow me to manage an audio flux in node red and then send it to a virtual ALSA device so as to be streamed by the ffmpeg command.

Did anyone already manage to send an audio stream to icecast server ?  
Did I missed an easier solution ?

I'm using Node Red 0.20.6 installed in a LXC ubuntu 18.04 container

Thanks  
++  
Benjamin
