This example script will stream all mp3 files in the current directory to a local icecast server.
<hr><pre>
package require shout

proc stream {fd1 fd2} {
    puts -nonewline $fd2 &#91;read $fd1 4096&#93;
    if {&#91;eof $fd1&#93;} {
        close $fd1
        nextsong $fd2
    }
}

proc nextsong {shout} {
    global playlist
    if {&#91;llength $playlist&#93; > 0} {
        set playlist &#91;lassign $playlist file&#93;
        set fd &#91;open $file rb&#93;
        fileevent $shout writable &#91;list stream $fd $shout&#93;
        fconfigure $shout -song &#91;file rootname &#91;file tail $file&#93;&#93;
    } else {
        exit
    }
}

set fd &#91;shout -user tcl -mount /tclradio -format mp3 \
  -genre rock -name "Tcl Radio" 8000 hackme&#93;
fconfigure $fd -buffering none

set playlist &#91;glob -nocomplain *.mp3&#93;

nextsong $fd

vwait forever
</pre><hr>