MP3 flash player streaming

Hola gente, acá les dejo un flash que está muy bueno y encima es open source. Lo pueden bajar de acá. Sirve para icecast y showcast, además está muy fácil de manejar y adeministrar.

Se bajan los archivos, viene en tres verciones yo usé la versión buton, pero la slim está buena too. Les dejo acá unos screenshots.

Buton
Buton flash player

Slim

Slim flash player

Extended

Extended flash player

Primero el archivo de configuración de icecast2

<icecast>
<limits>
<clients>100</clients>
<sources>1</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
<authentication>
<source-password>XXXX</source-password>
<relay-password>XXXXXXX</relay-password>
<admin-user>admin</admin-user>
<admin-password>XXXXXXX</admin-password>
</authentication>
<hostname>freemosquito.com.ar</hostname>
<listen-socket>
<port>20069</port>
</listen-socket>
<mount>
<mount-name>/mosquito.mp3</mount-name>
<max-listeners>3000</max-listeners>
<dump-file>/home/www/vhosts/freemosquito.com.ar/mosquito.mp3</dump-file>
<burst-size>65536</burst-size>
</mount>
<fileserve>1</fileserve>
<paths>
<basedir>/usr/share/icecast2</basedir>
<logdir>/usr/local/var/log/icecast</logdir>
<webroot>/usr/share/icecast2/web</webroot>
<adminroot>/usr/share/icecast2/admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
</logging>
<security>
<chroot>0</chroot>
<changeowner>
<user>icecast</user>
<group>icecast</group>
</changeowner>
</security>
</icecast>

Para correr el server ejecutamos:
/usr/bin/icecast2 -b -c /usr/local/etc/mosquito.xml

Para que el flash player funque en linux necesitamos ices0, para codear en mp3, antes de instalar
apt-get install libxml++2.6-dev libshout3-dev

luego:

wget -q “http://downloads.us.xiph.org/releases/ices/ices-0.4.tar.gz”
tar -xzf ices-0.4.tar.gz
cd ices-0.4
./configure && make && make install

y el archivo de configuración de ices0

<?xml version="1.0"?>
<ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices">
<Playlist>
<File>/home/www/vhosts/freemosquito.com.ar/mosquito.txt</File>
<Randomize>1</Randomize>
<Type>builtin</Type>
<Module>ices</Module>
<Crossfade>0</Crossfade>
</Playlist>
<Execution>
<Background>1</Background>
<Verbose>0</Verbose>
<BaseDirectory>/tmp</BaseDirectory>
<Reencode>1</Reencode>
<Samplerate>-1</Samplerate>
<Channels>-1</Channels>
</Execution>
<Stream>
<Server>
<Hostname>localhost</Hostname>
<Port>20069</Port>
<Password>XXXXX</Password>
<Protocol>http</Protocol>
</Server>
 <Mountpoint>/mosquito.mp3</Mountpoint>
<Name>Soluciones Root</Name>
<Description>Free mosquito</Description>
<URL>http://freemosquito.com.ar:20069/mosquito.mp3</URL>
<Bitrate>128</Bitrate>
<Public>1</Public>
</Stream>
</ices:Configuration>

Para correr el cliente

ices -c config.xml
Ahora el archivo de configuración que le pasaremos al musicplayer.

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<location>http://www.solucionesroot.com:20069/mosquito.mp3</location>
<creator>Soluciones Root</creator>
<title>Free mosquito</title>
<info>http://www.solucionesroot.com:20069/mosquito.mp3</info>
</track>
<track>
</playlist>
<?xml version="1.0" encoding="UTF-8"?><playlist version="1" xmlns="http://xspf.org/ns/0/">   <trackList>    <track>     <location>http://www.solucionesroot.com:20069/mosquito.mp3</location>     <creator>Soluciones Root</creator>     <title>Free mosquito</title>     <info>http://www.solucionesroot.com:20069/mosquito.mp3</info>    </track>   <track></playlist>

Bien ahora el código html.

<object
type="application/x-shockwave-flash" width="450" height="150" data="http://www.freemosquito.com.ar/musicplayer.swf?playlist_url=http://www.freemosquito.com.ar/playlist.xspf&autoplay=true&autoload=true&repeat_playlist=true">
<param name="movie"
value="http://www.freemosquito.com.ar/musicplayer.swf?playlist_url=http://www.freemosquito.com.ar/playlist.xspf&autoplay=true&autoload=true&repeat_playlist=true" />
</object>
Probamos en un browser http://www.freemosquito.com.ar/musicplayer.swf?playlist_url=http://www.freemosquito.com.ar/playlist.xspf&autoplay=true&autoload=true&repeat_playlist=true

Y eso es todo amigos, este es el flash que uso en mi página anti mosquito dense una vuelta. Cualquier cosa que necesiten preguntan posteando.

Por si no lo notaron mientras estaban en esta página no les debe haber picado ningún mosquito, puesto que aquí tienen el ejemplo

Si necesitan un hosting de streaming con icecast les recomiendo soluciones root.
Espero les sirva, éxitos.

Tags: , , , , , ,

Comments are closed.