HTTP Streaming Audio with Remote Control using CMUS, PulseAudio, and VLC

🕓 Sep 17, 2016

Set-up on your computer

  1. Start CMUS listening on your network
$> cmus --listen=0.0.0.0 # or the ip of an interface
  1. In CMUS, set a password
:set passwd=YOURPASSWORD
  1. Set up pulseaudio to stream via RTP
$> pacmd
load-module module-null-sink sink_name=rtp
load-module module-rtp-send source=rtp.monitor destination=127.0.0.1 port=RTP_PORT loop=1
  1. Set CMUS to output to the newly made sink
pavucontrol & # Change the destination of the cmus application to the "Null sink"
  1. Set vlc to retranscode
clvc ‐‐sout="#transcode{aenc=mp3,ab=256,channels=2}:standard{access=http,mux=ts,dst=IP_ADDDRESS:PORT}}" rtp://@127.0.0.1:RTP_PORT

Hook up with a phone:

  • Android: Cmus Remote (control volume, playback settings, skip, turn off, etc.); VLC for Android: network stream

Works pretty well. Sadly Cmus Remote doesn’t have a search function. But, this is a quick and dirty way to have audio anywhere, but it’s not great for permanent setups.