Here is a quick guide on how to use VLC to stream music on hold. The typical tool used for streaming - mpg123 - allows only mp3 streams over http. Using VLC allows streaming a larger variety of streams including streaming audio from udp or video streams.
Create an executable script vlc.sh somewhere and put the following:
[code]#!/bin/sh
change to yes enable debugging output
DEBUG=no
VLC=/usr/bin/vlc
if [ “$DEBUG” = “yes” ] ; then
VLC="$VLC -vvv --file-logging --logfile /tmp/vlc.log"
else
exec 2>/dev/null
fi
I have been looking for this solution for months and months.
Maybe good to mention: if you are trying to run vlc as root you will encounter problems. However there are workarounds.
I found the volume much higher than my mpg123 streams. You can add --volume to the arguments --volume 80 worked good with the mms stream I was testing.
Audio format s16 works for me, but does anyone know if there are other options that would use less bandwidth/cpu? Or does it not make a difference?