3

I'm trying to build a system similar to the following diagram: enter image description here

My plan is to configure my Raspberry Pi, depicted as the Mixxx Block in the diagram, to stream audio from a file or a microphone connected to the RPi. The stream should be sent over the internet to an Icecast server, one like listen2myradio.com, which will handle the broadcasting to multiple Listeners.

I found many tutorials on the internet using MPD and MPC connected to an Icecast server. However, all the tutorials I went through have the MPD and Icecast on one RPi, similar to the following diagramenter image description here

I tried to adapt the same instructions found in those tutorials, but replaced stuff like "localhost" with the ip address I got from listen2myradio.

following is how I configured my MPD:

audio_output {
  type            "shout"
  name            "RasPi MPD Stream"
  description     "MPD stream on Raspberry Pi"
  host            "78.126.230.18"
  port            "8129"
  mount           "/stream"
  password        "ICECAST_SOURCE_PASSWORD"
  bitrate         "128"
  format          "44100:16:2"
  encoding        "mp3"
}

However there was no connection to the Icecast server. Executing the command netstat -ltpn gives:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      365/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      366/sshd
tcp6       0      0 :::8000                 :::*                    LISTEN      405/mpd
tcp6       0      0 :::6600                 :::*                    LISTEN      405/mpd
tcp6       0      0 :::5355                 :::*                    LISTEN      365/systemd-resolve
tcp6       0      0 :::22                   :::*                    LISTEN      366/sshd

My question is: what does the address ":::8000" in the netstat above means?

Is there a good tutorial to build a system similar to the one described above? I'm open to any other software other than MPD and Icecast.

Many thanx in advanced!

p.S.: I'm using Archlinux

  • VLC should allow you to capture the mic and stream it to your icecast server, but I'm struggling a wee bit to find an all in one tutorial. The addresses in your netstat are ports currently in use. – goobering Feb 14 '16 at 1:04
  • try to disable IPv6 via sysctl and use IPv4-only. – Alexey Vesnin Feb 14 '16 at 2:41
1

Finally, I managed to get MPD, MPC & Icecast to work together. What I have done, is to go one step back, by experimenting with MPD and MPC to play music locally. Afterwards I tried again the connection to the Icecast server, and it works directly, with the same configuration I posted above.

0

Unfortunately I have neither a USB mic or soundcard to hand that I can test this with. Lots of confirmed reports of everything working well though, so this should at least point the way.

This post describes using VLC to capture an incoming USB mic signal on interface hw(0,0), transcode it to mpeg2 and stream it to an rtp client:

cvlc -vvv alsa://hw:0,0 --sout '#transcode{acodec=mp2,ab=32}:rtp{dst=192.168.1.5,port=1234,sdp=rtsp://192.168.1.5:8085/lily.sdp}'

This post describes transcoding an m3u playlist to MP3 and streaming out to IceCast:

vlc -vvv c:\playlist.m3u --sout "#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:gather:std{access=shout,mux=ogg,dst=source:hackme@domain.co.uk:8000/stream2}" --sout-keep

So. Conflating the two to achieve capturing the mic, transcoding to stereo MP3 (mono can occasionally default to left channel only) at 128kbps/44.1kHz sampling rate we get something that looks a bit like:

cvlc -vvv alsa://hw:0,0 --sout '#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:gather:std{access=shout,mux=ogg,dst=source:hackme@domain.co.uk:8000/stream2}' --sout-keep
  • Thank you for your feedback! I'll try it out, hope it will work :) – aalbashar Feb 14 '16 at 17:12

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.