Nahmd,
I needed a solution to a WMA stream "on the fly to make it an OGG stream.
The script in a path for executable programs place to grab the php script in the web server and the mount in the Icecast2 Add Configuration. The different paths must be adapted Maybe.
Unfortunately, currently only listen to one Internerradio that stream. Actually, it can create as many, but unfortunately ended the first, which no longer receives the stream, converting 
What is needed is the following:
- mplayer
- icecast2
- oggenc
- oggfwd
- php
The script to convert
# / Bin / sh
$PATH :/usr/ local /bin export PATH = $ PATH: / usr / local / bin
STREAM = "mms: / / your.radio.fm / stream.wma"
set-e
CLIENT = 0
"$2" != "" ] ; then if ["$ 2"! = ""] then
CLIENT = $ 2
fi
"$3" != "" ] if ["$ 3"! = ""]
then
STREAM = $ 3
fi
echo $STREAM | md5sum | cut -d ' ' -f1 ) MD5 = $ (echo $ STREAM | md5sum | cut-d ''-f1)
TEMP = / tmp / chumbybridge / $ MD5
] || mkdir -p $TEMP [-D $ TEMP] | | mkdir-p $ TEMP
/mplayer.fifo FIFO_MPLAYER = $ TEMP / mplayer.fifo
# FIFO_OGGENC = $ TEMP / oggenc.fifo
/mplayer.log LOG_MPLAYER = $ TEMP / mplayer.log
/oggenc.log LOG_OGGENC = $ TEMP / oggenc.log
/oggfwd.log LOG_OGGFWD = $ TEMP / oggfwd.log
/mplayer.pid PID_MPLAYER = $ TEMP / mplayer.pid
/oggfwd.pid PID_OGGFWD = $ TEMP / oggfwd.pid
"$1" = "start" ] if ["$ 1" = "start"]
then
>> $LOG_MPLAYER echo "connected $ CLIENT">> $ LOG_MPLAYER
] && echo "Run $0 stop first!" && exit [-E $ FIFO_MPLAYER] & & echo "Run $ 0 stop first!" & & Exit
|| exit 1 mkfifo $ FIFO_MPLAYER | | exit 1
"$FIFO_MPLAYER" >> $LOG_MPLAYER 2 >& 1 < /dev/null & mplayer-nocache $ STREAM-quiet-ao pcm: file = "$ FIFO_MPLAYER">> $ LOG_MPLAYER 2> & 1 </ dev / null &
echo $! > $ PID_MPLAYER
sleep 0.3
-o – 2 >> $LOG_OGGENC | oggfwd localhost 8000 hackme /radio1.ogg >> $LOG_OGGFWD 2 >& 1 & oggenc-Q-q $ 1 FIFO_MPLAYER-o - 2>> $ LOG_OGGENC | oggfwd localhost 8000 hackme / radio1.ogg>> $ LOG_OGGFWD 2> & 1 &
echo $! > $ PID_OGGFWD
sleep 0.2
"$1" = "stop" ] elif ["$ 1" = "stop"]
then
echo ">>> Stopping chumstream player <<<"
cat $PID_MPLAYER ) 2 > /dev/null && \ kill $ (cat $ PID_MPLAYER) 2> / dev / null & & \
cat $PID_OGGFWD ) 2 > /dev/null && \ kill $ (cat $ PID_OGGFWD) 2> / dev / null & & \
|| \ rm-rf $ TEMP | | \
echo "Can not stop all processes, please look into $ TEMP and fix it manually"
else
echo "Usage:"
echo "$ 0 start [client_id] [URL]"
echo "$ 0 stop"
fi
The icecast configuration
<mount>
<mount-name> / radio.ogg </ mount-name>
<max-listeners> 10 </ max-listeners>
<burst-size> 65 536 </ burst-size>
<hidden> 0 </ hidden>
> <authentication type = "url">
value = "http://localhost/radio.php" /> <option name = value = "mount_add" /> "http://localhost/radio.php"
value = "http://localhost/radio.php" /> <option name = value = "mount_remove" /> "http://localhost/radio.php"
value = "http://localhost/radio.php" /> <option name = value = "listener_add" /> "http://localhost/radio.php"
value = "http://localhost/radio.php" /> <option name = value = "listener_remove" /> "http://localhost/radio.php"
</ Authentication>
<Mount />
The Php Start / Stop Part
Php
$_POST [ "action" ] == 'listener_add' ) { if ($ _POST ["action"] == 'listener_add') (
( "/usr/local/bin/chumstream.sh start " . $_POST [ "client" ] , $result ) ; $ Tmp =
exec ("/ usr / local / bin / start chumstream.sh. $ _POST [" client "], $ result); ( $_POST [ "action" ] == 'listener_remove' ) { ) Else if ($ _POST ["action"] == 'listener_remove') (
( "/usr/local/bin/chumstream.sh stop " . $_POST [ "client" ] , $result ) ; $ Tmp =
exec ("/ usr / local / bin / chumstream.sh stop". $ _POST ["client"], $ result); )
'icecast-auth-user: 1′ ) ; header ('icecast-auth-user: 1'); 'icecast-auth-message: OK' ) ; header ('icecast-auth-message: OK'); ?>