Saturday, March 19, 2011

Live Internet Radio

Pre Conditions:

uptodate ports collection
Icecast 2.3.1
ICES 2.0.1
FM radio
CPU Pentium 4 512 Ram min
Sound Card on board intel (in addition to Intel's own trial and error yes)
Installation Phase

first login as root to your FreeBSD machine or use sudo

indofreebsd # cd / usr/ports/audio/icecast2

indofreebsd # make install cleanindofreebsd # make install clean

indofreebsd # cd / usr / ports / audio / ICES

indofreebsd # make install clean

here until the installation phase is complete now headed for the stage configuration

Phase configuration:

indofreebsd # vi / usr / local / etc / icecast.xml
----Mulai-----
<icecast>
<limits>
<clients>100</clients>
<sources>2</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>sayaorangganteng</source-password>

<relay-password>sayaorangpalingganteng</relay-password>

<admin-user>admin</admin-user>
<admin-password>sayaorangganteng</admin-password>
</authentication>
<directory>

<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
</directory>
<hostname>indofreebsd.or.id</hostname>

<listen-socket>
<port>82</port>
<bind-address>202.58.70.83</bind-address>
</listen-socket>
<listen-socket>
<port>81</port>
</listen-socket>
<relay>
<server>202.58.70.83</server>
<port>81</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>
<mount>
<mount-name>/auth_example.ogg</mount-name>
<authentication type="url">
<option name="mount_add" value="http://myauthserver.net/notify_mount.php"/>
<option name="mount_remove" value="http://myauthserver.net/notify_mount.php"/>
<option name="listener_add" value="http://myauthserver.net/notify_listener.php"/>
<option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
</authentication>
</mount>
<fileserve>1</fileserve>

<shoutcast-mount>/live.nsv</shoutcast-mount>

<paths>

<basedir>/usr/local/share/icecast</basedir>

<logdir>/usr/local/var/log/icecast</logdir>
<webroot>/usr/local/share/icecast/web</webroot>
<adminroot>/usr/local/share/icecast/admin</adminroot>
<alias source="/foo" dest="/bar"/>

<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>nobody</user>
<group>nogroup</group>
</changeowner>
</security>
</icecast>

<!----selesai----->


The next step involves configuring the ICES


indofreebsd#vi /etc/ices-oss.xml

isi file konfigurasi ices

<?xml version="1.0"?>
<ices>

<!-- run in background -->
<background>1</background>
<!-- where logs go. -->
<logpath>/var/log/ices</logpath>
<logfile>ices.log</logfile>
<!-- size in kilobytes -->
<logsize>2048</logsize>
<!-- 1=error, 2=warn, 3=infoa ,4=debug -->
<loglevel>4</loglevel>
<!-- logfile is ignored if this is set to 1 -->
<consolelog>0</consolelog>

<!-- optional filename to write process id to -->
<!-- <pidfile>/home/ices/ices.pid</pidfile> -->

<stream>
<!-- metadata used for stream listing -->
<metadata>
<name>IndoFreeBSD Live Radio</name>
<genre>Various</genre>
<description>CASANOVA 102 FM BALI</description>
<url>http://indofreebsd.or.id</url>
</metadata>
<input>
<module>oss</module>
<param name="rate">44100</param>
<param name="channels">2</param>

<param name="device">/dev/dsp</param>

<param name="metadata">1</param>
<param name="metadatafilename">test</param>
</input>
<instance>

<hostname>localhost</hostname>
<port>81</port>
<password>sayaorangganteng</password>
<mount>/live.ogg</mount>
<yp>1</yp> <!-- allow stream to be advertised on YP, default 0 -->

<encode>
<quality>0</quality>
<samplerate>22050</samplerate>
<channels>1</channels>
</encode>
<downmix>1</downmix>

<resample>
<in-rate>44100</in-rate>
<out-rate>22050</out-rate>
</resample>
</instance>

</stream>
</ices>
configuration is complete ICES

The next stage Icecast daemon and ICES

indofreebsd # / usr/local/etc/rc.d/icecast2 start

indofreebsd # ICES / etc / ICES-oss.xml &

for the sound card intel for IHC module is loaded at boot time, it is necessary to add the following parameter in / boot / loader.conf:

snd_ich_load = "YES"

if there is an error log to make sure the directory purposes or ICES icescast already made ​​and then try running again

The next stage is the stage of hardware configuration

1. The first stage of tuning the fm radio to the desired frequency (in this case I use a frequency fm bali womanizer 102)
2. Enter the Line Out cable to the line out radio
3. Enter the line out cable to a computer radio that has been modified into a stereo mic jack
until this stage you've finished configuring its hardware

then please try your internet radio by typing the url that you created earlier in the configuration icescast

eg mine

http://indofreebsd.or.id:81

then I click listen and open it with xmms or winamp and a voice came womanizer fm radio bali

so hopefully useful tutorial from my

greetings,

ogeb

0 comments: