<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kjelderg</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kjelderg"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Special:Contributions/Kjelderg"/>
		<updated>2026-04-05T19:04:50Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2007-09-13T16:17:06Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: revert previous change.  Automatically does not properly describe what I was trying to express.  Automagic is a word accepted and used frequently in the open source community.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  '''As the version in ports doesn't yet support streaming to the icecast server''', I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;br /&gt;
== Audioscrobbler support ==&lt;br /&gt;
For audioscrobbler support, I am using mpdscribbler downloaded from http://www.frob.nl/projects/scribble/mpdscribble-0.2.7.tar.gz .  To install it, I exported LDFLAGS=-lc_r and then did this:&lt;br /&gt;
 tar -xf mpdscribble-0.2.7.tar.gz&lt;br /&gt;
 cd mpdscribble-0.2.7&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
After this, the usual setup procedure is to run setup.sh.  Unfortunately the setup.sh script is a bit linuxified so I simply made a config in the following format:&lt;br /&gt;
 username = username&lt;br /&gt;
 password = md5ofmypassword&lt;br /&gt;
 cache = /usr/home/username/.mpdscribble/mpdscribble.cache&lt;br /&gt;
 log = /usr/home/username/.mpdscribble/mpdscribble.log&lt;br /&gt;
 verbose = 2&lt;br /&gt;
Just running mpdscribble after this works for me without trouble.  To get the md5 of a password, the following works:&lt;br /&gt;
 md5 -s 'My super cool password'&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
[http://www.icecast.org/ Icecast homepage]&lt;br /&gt;
&lt;br /&gt;
[http://musicpd.org/ MusicPD homepage]&lt;br /&gt;
&lt;br /&gt;
[http://www.frob.nl/scribble.html mpdscribble homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;br /&gt;
[[Category:FreeBSD Multimedia]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User_talk:Quiet</id>
		<title>User talk:Quiet</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User_talk:Quiet"/>
				<updated>2005-12-20T11:31:59Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: How wiki's user talk works&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wonder how this works ....&lt;br /&gt;
&lt;br /&gt;
== how what works? ==&lt;br /&gt;
&lt;br /&gt;
talk pages?&lt;br /&gt;
--[[User:Dave|Dave]] 13:41, 16 Dec 2005 (EST)&lt;br /&gt;
&lt;br /&gt;
== How wiki's user talk works ==&lt;br /&gt;
&lt;br /&gt;
Sorry Mr. Dave, I was just seeing how the wikiing works as I am a wiki newbie, as it were.  BTW, love the idea of a freebsd wiki.  Any word on if this will become official or officially recognised?&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User_talk:Quiet</id>
		<title>User talk:Quiet</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User_talk:Quiet"/>
				<updated>2005-12-16T02:21:35Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wonder how this works ....&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Kjelderg</id>
		<title>User:Kjelderg</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Kjelderg"/>
				<updated>2005-12-16T02:20:47Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;freenode's ##freebsd is where I usually am.&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Kjelderg</id>
		<title>User:Kjelderg</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Kjelderg"/>
				<updated>2005-12-16T02:20:17Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About me ==&lt;br /&gt;
freenode's ##freebsd is where I usually am.&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Kjelderg</id>
		<title>User:Kjelderg</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Kjelderg"/>
				<updated>2005-12-16T02:19:47Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About me ==&lt;br /&gt;
##freebsd on freenode is where I usually am.&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Kjelderg</id>
		<title>User:Kjelderg</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Kjelderg"/>
				<updated>2005-12-16T02:19:25Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;##freebsd on freenode is where I usually am.&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/High_Resolution_Console</id>
		<title>High Resolution Console</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/High_Resolution_Console"/>
				<updated>2005-12-16T02:18:37Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: tiny corrections on what I saw as incorrect.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you come to FreeBSD after using Linux, one of the first things you may notice is the lack of high-resolution consoles. The default is text-mode 80x25 characters. Although high-resolution is desirable to many, it's certainly not required. If you want to have a 1024x768(or even higher) console resolution, it's fairly easy to set up, just requires a kernel recompile and setting the mode you want to use in the /etc/rc.conf file.&lt;br /&gt;
&lt;br /&gt;
First off, we need to edit the kernel config to add two options. I won't go into too much depth here, as this article isn't about how to config your kernel. For my example I will use the 'GENERIC' kernel config.&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src/sys/i386/conf&lt;br /&gt;
 cp GENERIC VESAKERN&lt;br /&gt;
 vi VESAKERN&lt;br /&gt;
&lt;br /&gt;
add the following lines:&lt;br /&gt;
&lt;br /&gt;
 options      VESA            # Build VESA module into kernel&lt;br /&gt;
 options      SC_PIXEL_MODE   # Allows syscons to act on pixels rather than text&lt;br /&gt;
&lt;br /&gt;
Save &amp;amp; exit&lt;br /&gt;
&lt;br /&gt;
 cd /usr/src&lt;br /&gt;
 make buildkernel KERNCONF=VESAKERN&lt;br /&gt;
 make installkernel KERNCONF=VESAKERN&lt;br /&gt;
&lt;br /&gt;
When that is done, reboot to use the new kernel. Upon reboot, you will notice no change initially. Log in as root and enter:&lt;br /&gt;
&lt;br /&gt;
 vidcontrol -i mode&lt;br /&gt;
&lt;br /&gt;
You should see a long listof all available resolutions, including all of the modes that the video card is capable of. Personally, 1024x768 console is plenty big, or small, depending on how you think about it. On my system the mode number for 1024x768x24 is 280. To test the desired mode, use the following command:&lt;br /&gt;
&lt;br /&gt;
 vidcontrol MODE_280&lt;br /&gt;
&lt;br /&gt;
Your console should jump to that. If it works, great. If the screen goes blank, your card/monitor can't support that, and you need to use something else. You may need to switch to different terminal to try one that works. Once you find a setting that you like, we can add it to /etc/rc.conf.&lt;br /&gt;
&lt;br /&gt;
 allscreens_flags=&amp;quot;MODE_280&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This will tell all terminal screens to use the desired resolution. Go ahead and reboot to try it. You will not see the large screen resolution until rc.conf is processed. This is different to Linux where the bootloader passes the resolution providing for a full boot-sequence in high-resolution. On my system, it jumps to high-resolution just before loading the Linux ABI support.&lt;br /&gt;
&lt;br /&gt;
[[Category : Configuring_FreeBSD]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T16:09:13Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: added links (forgot earlier)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;br /&gt;
== Audioscrobbler support ==&lt;br /&gt;
For audioscrobbler support, I am using mpdscribbler downloaded from http://www.frob.nl/projects/scribble/mpdscribble-0.2.7.tar.gz .  To install it, I exported LDFLAGS=-lc_r and then did this:&lt;br /&gt;
 tar -xf mpdscribble-0.2.7.tar.gz&lt;br /&gt;
 cd mpdscribble-0.2.7&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
After this, the usual setup procedure is to run setup.sh.  Unfortunately the setup.sh script is a bit linuxified so I simply made a config in the following format:&lt;br /&gt;
 username = username&lt;br /&gt;
 password = md5ofmypassword&lt;br /&gt;
 cache = /usr/home/username/.mpdscribble/mpdscribble.cache&lt;br /&gt;
 log = /usr/home/username/.mpdscribble/mpdscribble.log&lt;br /&gt;
 verbose = 2&lt;br /&gt;
Just running mpdscribble after this works for me without trouble.  To get the md5 of a password, the following works:&lt;br /&gt;
 md5 -s 'My super cool password'&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
[http://www.icecast.org/ Icecast homepage]&lt;br /&gt;
[http://musicpd.org/ MusicPD homepage]&lt;br /&gt;
[http://www.frob.nl/scribble.html mpdscribble homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;br /&gt;
[[Category:FreeBSD Multimedia]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Mplayer</id>
		<title>Mplayer</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Mplayer"/>
				<updated>2005-12-15T16:06:11Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: add to the new freebsd multimedia category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Mplayer''' is a movie player that is capable of playing a wide variety of video formats. Mplayer is the most popular movie player in the open source market and can play just about any format, but has a history of being difficult to configure. &lt;br /&gt;
&lt;br /&gt;
see also: [[Mplayer Installation]]&lt;br /&gt;
== External links ==&lt;br /&gt;
[http://lists.freebsd.org/pipermail/freebsd-questions/2003-October/023709.html Configuration example]&lt;br /&gt;
&lt;br /&gt;
[http://www.mplayerhq.hu/DOCS/HTML/en/index.html Mplayer documentation]&lt;br /&gt;
&lt;br /&gt;
[http://www.mplayerhq.hu/homepage/design7/news.html Mplayer homepage]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ports and Packages]]&lt;br /&gt;
[[Category:FreeBSD Multimedia]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Category:FreeBSD_Multimedia</id>
		<title>Category:FreeBSD Multimedia</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Category:FreeBSD_Multimedia"/>
				<updated>2005-12-15T16:05:07Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category is intended to relate directly to multimedia on FreeBSD.&lt;br /&gt;
&lt;br /&gt;
note: to add an article to this category, simply append '''&amp;lt;nowiki&amp;gt;[[Category : Ports and Packages]]&amp;lt;/nowiki&amp;gt;''' to the end of your article.&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T16:02:23Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;br /&gt;
== Audioscrobbler support ==&lt;br /&gt;
For audioscrobbler support, I am using mpdscribbler downloaded from http://www.frob.nl/projects/scribble/mpdscribble-0.2.7.tar.gz .  To install it, I exported LDFLAGS=-lc_r and then did this:&lt;br /&gt;
 tar -xf mpdscribble-0.2.7.tar.gz&lt;br /&gt;
 cd mpdscribble-0.2.7&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
After this, the usual setup procedure is to run setup.sh.  Unfortunately the setup.sh script is a bit linuxified so I simply made a config in the following format:&lt;br /&gt;
 username = username&lt;br /&gt;
 password = md5ofmypassword&lt;br /&gt;
 cache = /usr/home/username/.mpdscribble/mpdscribble.cache&lt;br /&gt;
 log = /usr/home/username/.mpdscribble/mpdscribble.log&lt;br /&gt;
 verbose = 2&lt;br /&gt;
Just running mpdscribble after this works for me without trouble.  To get the md5 of a password, the following works:&lt;br /&gt;
 md5 -s 'My super cool password'&lt;br /&gt;
[[Category:Ports and Packages]]&lt;br /&gt;
[[Category:FreeBSD Multimedia]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd:_Offsite_Streaming_Music_Solution</id>
		<title>Icecast and Musicpd: Offsite Streaming Music Solution</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd:_Offsite_Streaming_Music_Solution"/>
				<updated>2005-12-15T15:52:38Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: Icecast and Musicpd: Offsite Streaming Music Solution moved to Icecast and Musicpd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Icecast and Musicpd]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Offsite_Streaming_Music_Solution</id>
		<title>Offsite Streaming Music Solution</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Offsite_Streaming_Music_Solution"/>
				<updated>2005-12-15T15:51:02Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: Offsite Streaming Music Solution moved to Icecast and Musicpd: Offsite Streaming Music Solution&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Icecast and Musicpd: Offsite Streaming Music Solution]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T15:40:01Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;br /&gt;
== Audioscrobbler support ==&lt;br /&gt;
For audioscrobbler support, I am using mpdscribbler downloaded from http://www.frob.nl/projects/scribble/mpdscribble-0.2.7.tar.gz .  To install it, I exported LDFLAGS=-lc_r and then did this:&lt;br /&gt;
 tar -xf mpdscribble-0.2.7.tar.gz&lt;br /&gt;
 cd mpdscribble-0.2.7&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
After this, the usual setup procedure is to run setup.sh.  Unfortunately the setup.sh script is a bit linuxified so I simply made a config in the following format:&lt;br /&gt;
 username = username&lt;br /&gt;
 password = md5ofmypassword&lt;br /&gt;
 cache = /usr/home/username/.mpdscribble/mpdscribble.cache&lt;br /&gt;
 log = /usr/home/username/.mpdscribble/mpdscribble.log&lt;br /&gt;
 verbose = 2&lt;br /&gt;
Just running mpdscribble after this works for me without trouble.  To get the md5 of a password, the following works:&lt;br /&gt;
 md5 -s 'My super cool password'&lt;br /&gt;
[[Category:Ports and Packages]]&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T15:27:58Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;br /&gt;
== Audioscrobbler support ==&lt;br /&gt;
For audioscrobbler support, I am using mpdscribbler downloaded from http://www.frob.nl/projects/scribble/mpdscribble-0.2.7.tar.gz .  To install it, I exported LDFLAGS=-lc_r and then did this:&lt;br /&gt;
 tar -xf mpdscribble-0.2.7.tar.gz&lt;br /&gt;
 cd mpdscribble-0.2.7&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
After this, the usual setup procedure is to run setup.sh.  Unfortunately the setup.sh script is a bit linuxified so I simply made a config in the following format:&lt;br /&gt;
 username = username&lt;br /&gt;
 password = md5ofmypassword&lt;br /&gt;
 cache = /usr/home/username/.mpdscribble/mpdscribble.cache&lt;br /&gt;
 log = /usr/home/username/.mpdscribble/mpdscribble.log&lt;br /&gt;
 verbose = 2&lt;br /&gt;
Just running mpdscribble after this works for me without trouble.  To get the md5 of a password, the following works:&lt;br /&gt;
 md5 -s 'My super cool password'&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T15:20:28Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
== Getting the music to the client ==&lt;br /&gt;
Once icecast and musicpd are running, it's very easy to get music to the client.  I use ssh port-forwarding to do it.&lt;br /&gt;
 ssh -N -L6600:127.0.0.1:6600 username@server &amp;amp;&lt;br /&gt;
 ssh -N -L8000:127.0.0.1:8000 username@server &amp;amp;&lt;br /&gt;
And now to enjoy the tunes and control the server, you can install your favourite ogg-player (I'm currently using xmms-kde) and mpd client (kmp here).&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Icecast_and_Musicpd</id>
		<title>Icecast and Musicpd</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Icecast_and_Musicpd"/>
				<updated>2005-12-15T15:12:15Z</updated>
		
		<summary type="html">&lt;p&gt;Kjelderg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
As my laptop's music collection was getting larger and I was wanting more elbow room, I decided it was finally time to offload most of it to a remote machine and figure out some way to access it easily via the internet.&lt;br /&gt;
== Setting up Icecast2 ==&lt;br /&gt;
The first step was to install Icecast2.  I did this from audio/icecast2 in ports, but it can probably be done via pkg_add instead.  Once installed, it should be configured.  It seems that /usr/local/share/icecast/doc/ has some config examples.  In the configuration file, the &amp;lt;source-password&amp;gt;, &amp;lt;admin-password&amp;gt;, and &amp;lt;bind-address&amp;gt; are the main fields that I changed.  As I want to be the only one listening to this (which is to say didn't want the stream shared via the internet), I set &amp;lt;bind-address&amp;gt; to 127.0.0.1 .  I also changed &amp;lt;user&amp;gt; and &amp;lt;group&amp;gt; to be nobody as I had been starting the server as root.&lt;br /&gt;
== Setting up MusicPD ==&lt;br /&gt;
The second thing I did was set up musicpd.  As the version in ports doesn't yet support streaming to the icecast server, I had to grab the version from their svn (this requires having subversion installed).  Go to a directory of you choosing and try this:&lt;br /&gt;
 svn co https://svn.musicpd.org/mpd/trunk musicpd&lt;br /&gt;
 cd mpd&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
Now, as autogen.sh (probably a way to make it do the right thing) didn't actually do everything quite right for me I had to export LD_FLAGS=-lc_r and then the following:&lt;br /&gt;
 ./configure --with-libFLAC=/usr/local/ --with-ogg=/usr/local/ \&lt;br /&gt;
  --with-vorbis=/usr/local/ --disable-tremor --enable-shout \&lt;br /&gt;
  --enable-ogg --disable-ipv6&lt;br /&gt;
Each of these arguments is for a reason.  FLAC, ogg, and vorbis install in /usr/local/wherever on freebsd and I guess that the script assumes them to be elsewhere.  --disable-tremor is required because tremor and shout are mutually exclusive for mpd.  --enable-shout enables shout protocol streaming (which icecast2 uses) and --disable-ipv6 was necessary to overcome a bug with musicpd on freebsd.  After that:&lt;br /&gt;
 gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
With musicpd installed, there's the task of configuring it.  From the musicpd port, I copied and filled in this startup script:&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # PROVIDE: musicpd&lt;br /&gt;
 # REQUIRE:&lt;br /&gt;
 # BEFORE:&lt;br /&gt;
 # KEYWORD: FreeBSD shutdown&lt;br /&gt;
 &lt;br /&gt;
 # Add the following line to /etc/rc.conf to enable mpd:&lt;br /&gt;
 #&lt;br /&gt;
 #musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 . /etc/rc.subr&lt;br /&gt;
 &lt;br /&gt;
 name=musicpd&lt;br /&gt;
 rcvar=`set_rcvar`&lt;br /&gt;
 &lt;br /&gt;
 config=/usr/local/etc/mpd.conf&lt;br /&gt;
 command=/usr/local/bin/mpd&lt;br /&gt;
 required_files=$config&lt;br /&gt;
 &lt;br /&gt;
 musicpd_flags=&amp;quot;$musicpd_flags $config&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 [ -z &amp;quot;$musicpd_enable&amp;quot; ] &amp;amp;&amp;amp; musicpd_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 [ -z &amp;quot;$musicpd_flags&amp;quot; ]  &amp;amp;&amp;amp; musicpd_flags=&lt;br /&gt;
 &lt;br /&gt;
 load_rc_config $name&lt;br /&gt;
 &lt;br /&gt;
 run_rc_command &amp;quot;$1&amp;quot;&lt;br /&gt;
In /usr/local/etc/mpd.conf I modified the example configuration file (from the doc subdirectory of the svn repository that we checked out earlier) to have the following lines:&lt;br /&gt;
 music_directory         &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 playlist_directory      &amp;quot;/mnt/storageDrive/media/music&amp;quot;&lt;br /&gt;
 db_file                 &amp;quot;/var/mpd/mpd.db&amp;quot;&lt;br /&gt;
 log_file                &amp;quot;/var/mpd/mpd.log&amp;quot;&lt;br /&gt;
 error_file              &amp;quot;/var/mpd/mpd.error&amp;quot;&lt;br /&gt;
 pid_file                &amp;quot;/var/mpd/mpd.pid&amp;quot;&lt;br /&gt;
 audio_output {&lt;br /&gt;
  type            &amp;quot;shout&amp;quot;&lt;br /&gt;
  name            &amp;quot;my cool stream&amp;quot;&lt;br /&gt;
  host            &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
  port            &amp;quot;8000&amp;quot;&lt;br /&gt;
  mount           &amp;quot;/mpd.ogg&amp;quot;&lt;br /&gt;
  password        &amp;quot;sourcepasswordfromicecastconfigfile&amp;quot;&lt;br /&gt;
  bitrate         &amp;quot;128&amp;quot;&lt;br /&gt;
  format          &amp;quot;44100:16:1&amp;quot;&lt;br /&gt;
  user            &amp;quot;source&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 bind_to_address         &amp;quot;127.0.0.1&amp;quot;&lt;br /&gt;
Again, the 127.0.0.1 address as I don't want this control available to everyone on the internet.  Make sure that the password in this file and &amp;lt;source-password&amp;gt; in icecast's configuration file match.  Set the bitrate to be whatever format you would like.  MusicPD will reencode all of your music to that bitrate and ogg format as you listen.&lt;br /&gt;
Now icecast and musicpd should be installed and configured.  To get them to start automagically at boot, Try adding the following to /etc/rc.conf :&lt;br /&gt;
 #for musicpd&lt;br /&gt;
 musicpd_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
 #for icecast&lt;br /&gt;
 icecast_enable=&amp;quot;YES&amp;quot;&lt;/div&gt;</summary>
		<author><name>Kjelderg</name></author>	</entry>

	</feed>