<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gerrit&#039;s work in progress &#187; howto</title>
	<atom:link href="http://blog.wessendorf.org/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.wessendorf.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 09 Jun 2011 01:57:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Music Networking with XMMS2, Icecast2 and Last.fm</title>
		<link>http://blog.wessendorf.org/2009/06/music-networking-with-xmms2-icecast2-and-lastfm/</link>
		<comments>http://blog.wessendorf.org/2009/06/music-networking-with-xmms2-icecast2-and-lastfm/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 05:37:54 +0000</pubDate>
		<dc:creator>gerrit</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[icecast2]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[lifestream]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xmms2]]></category>

		<guid isPermaLink="false">http://blog.wessendorf.org/?p=825</guid>
		<description><![CDATA[In the last few months I haven&#8217;t found much time to listen to music, but I decided this needs to change and I should finally dust off my old music library. About two years ago I signed up for last.fm, the social music network that makes it easy to discover new music and connect with [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop i">I</span>n the last few months I haven&#8217;t found much time to listen to music, but I decided this needs to change and I should finally dust off my old music library. About two years ago I signed up for <a href="http://www.last.fm/user/celeph"><strong>last.fm</strong></a>, the social music network that makes it easy to discover new music and connect with other music fans. I used their software on my Windows box, but I rarely work with this system anymore. After adding several other computers and laptops to the household I didn&#8217;t bother with shared music folders and last-fm anymore. This was then.</p>
<p>Today I&#8217;m trying to setup a server that makes my music available to any of my computers and operating systems in the LAN, and possibly even outside the local network. At the same time I would like to add last.fm again, however, not linked to each individual player, but only once, to the music server.</p>
<p><img src="http://blog.wessendorf.org/wp-content/uploads/2009/06/musicnetwork.png" alt="musicnetwork" title="musicnetwork" width="425" height="445" class="aligncenter size-full wp-image-846" /></p>
<p>I stored my music files on an external <a href="http://www.lacie.com/products/product.htm?pid=10994"><strong>network drive</strong></a>. This music folder is a <a href="http://wiki.samba.org/index.php/Main_Page">Samba</a> share and accessible from other computers on the network.</p>
<p>VLC is known for its network streaming features and I wrote a little about it back in <a href="http://blog.wessendorf.org/software/videolan/">May</a>. While I use it occasionally to stream videos from one computer to another I was looking for a solution that could work better as a permanent configuration, well-suited as a music library. That&#8217;s how I stumbled upon the <em>X-platform Music Multiplexing System 2</em>, <a href="http://wiki.xmms2.xmms.se/wiki/Main_Page"><strong>XMMS2</strong></a>.<span id="more-825"></span></p>
<h3>XMMS2</h3>
<p>XMMS2 is a client-server music platform which can be controlled via command line but also through a variety of other interfaces available on Linux, Windows as well as Mac. It allows you to play and manage your music collection on a local server or across the network. It is free, open-source and extensible with a growing number of plugins. </p>
<p>On my Ubuntu system, it was just a matter of seconds to install XMMS2. Ubuntu&#8217;s repositories already include everything you might need. I browsed the Synaptic package manager for&#8230; </p>
<ul>
<li><tt>xmms2</tt>, the core application with server and command line client interface.</li>
<li><tt>xmms2-plugin-smb</tt>, a Samba transport extension I needed to get access to my music share.</li>
<li><tt>xmms2-scrobbler</tt>, used to submit data to Last.fm</li>
<li><tt>esperanza</tt>, a simple player, xmms2-client and graphical user interface</li>
<li><tt>xmms2-plugin-flac</tt>, to support the flac-format</li>
<li><tt>xmms2-plugin-mp4</tt>, to support the mp4-format</li>
</ul>
<p>XMMS2&#8242;s command line interface is very easy to use thanks to its legible commands and parameters, just to mention a few:</p>
<ul>
<li>To start the server: <code>xmms2-launcher</code></li>
<li>To quit the server: <code>xmms2 quit</code></li>
<li>To add some music: <code>xmms2 add /home/gerrit/Music/track.mp3</code></li>
<li>To add a folder recursively: <code>xmms2 radd /home/gerrit/Music/electronic/</code></li>
<li>To add some music from my samba-share: <code>xmms2 add smb://username:password@edmini/music/electronic/track.mp3</code></li>
<li>To list the contents of the current playlist: <code>xmms2 list</code></li>
<li>To play: <code>xmms2 play</code></li>
<li>To stop playback: <code>xmms2 stop</code></li>
</ul>
<p>If the server is already running and you install new plugins, you may have to restart it before you can use the plugin. You can stop the server with <code>xmms2 quit</code>, or if that doesn&#8217;t work for some reason:</p>
<ol>
<li>find the process-id with  <code>ps aux | grep xmms2d</code> and</li>
<li>kill the process with <code>sudo kill processid</code>.</li>
</ol>
<p>XMMS2 makes it easy to organize music in playlists:</p>
<ul>
<li><code>xmms2 playlist list</code> lists all available playlists</li>
<li><code>xmms2 playlist create myplaylistname</code> creates a new playlist</li>
<li><code>xmms2 playlist load myplaylistname</code> loads an existing playlist</li>
<li><code>xmms2 playlist active</code> shows which playlist is currently active</li>
</ul>
<p>With a separate set of <em>media library</em> commands you can also keep track of your artists, track and album titles, cover images, etc. To display a list of related commands: <code>xmms2 mlib</code>. To search for an artist: <code>xmms2 mlib search artist:"Boards*"</code>. Standard wildcard characters like &#8216;*&#8217; and &#8216;?&#8217; are supported, too. It&#8217;s probably easier to use these mlib functions from an XMMS2 client software other than the command line. With a player like <em>Esperanza</em> you will find an easy-to-use graphical user interface for command line parameters.</p>
<p>To make the XMMS2 daemon reachable from other computers I added a tcp-socket to the configuration <code>nano ~/.config/xmms2/xmms2.conf</code></p>
<pre class="brush:bash;light:true;">
<property name="ipcsocket">unix:///tmp/xmms-ipc-gerrit;tcp://
</property>
</pre>
<p>More details on remote machines can be found in the <a href="http://wiki.xmms2.xmms.se/wiki/FAQ#How_do_I_use_clients_on_remote_machines.3F">FAQ</a>. The default port is 9667. After restarting the xmms2d daemon I was ready to test my configuration from the other computer, a Windows system.</p>
<p>I installed the Windows built of XMMS2 and Esperanza which I found <a href="http://wiki.xmms2.xmms.se/wiki/Windows">here</a>, <a href="http://xmms2.xmms.se/~puzzles/win32/">puzzle&#8217;s win32 folder</a>. I had to make sure to use the version that matches the version of my server, in this example it was <em>XMMS2-DrLecter</em>. </p>
<p>I defined the following environment variable <tt>XMMS_PATH = tcp://192.168.1.43:9667</tt> to let XMMS2 know where to find my music server.</p>
<p>The command-line version of XMMS2 works great on Windows, but I was still experiencing some problems with Esperanza (downloaded Esperanza-0.3.exe) which exited with a runtime error. Whenever I tried to launch Esperanza on Windows, the server responded with <em>&#8220;Client &#8216;Esperanza&#8217; with bad protocol version (1, not 11) connected&#8221;</em>.</p>
<p>This looked like a similar conflict I experienced with the wrong XMMS2 version before, so I looked for another version. I found the DrLecter built Esperanza4-DrL.7z <a href="http://www.schrijnen.nl/auke/">here</a>. This version works great.</p>
<p><img src="http://blog.wessendorf.org/wp-content/uploads/2009/06/esperanzawin.png" alt="Esperanza" title="Esperanza" width="448" height="286" class="aligncenter size-full wp-image-857" /></p>
<p>Now I was ready to play, stop, and control my XMMS2 daemon from my remote computers, may it run Windows or Ubuntu. However, this configuration didn&#8217;t actually stream music from my server to the remote machine. It only served as a channel to remote control the server&#8217;s playlist. The music was still played nowhere but on the server system. </p>
<h3>Icecast2</h3>
<p>Icecast2 is a streaming server, a package that will allow you to setup a simple Internet radio station. It, too, is readily available in Ubuntu&#8217;s repository and can be installed via Synaptic. After installation I updated two configuration files: <code>sudo nano /etc/icecast2/icecast.xml</code></p>
<p>There I defined some passwords where the default was marked with &#8216;<em>hackme</em>&#8216;. I also changed the ports to 9600/9601. No particular reason, other than having the Icecast2 ports relatively close to the XMMS2 default port. You can choose any port there. More details in the <a href="http://www.icecast.org/docs/icecast-2.3.1/icecast2_basicsetup.html">basic setup help</a>. I left all the other settings alone and edited <code>sudo nano /etc/default/icecast2</code> to set <tt>ENABLE=true</tt>. After that I could start Icecast2 with <code>/etc/init.d/icecast2 start</code>.</p>
<p>The Icecast admin-page should now show up with the url <tt>http://localhost:9600</tt>. But there still is no music to stream. In the next step I linked XMMS2 to Icecast, using the&#8230; </p>
<h3>xmms2-plugin-ices</h3>
<p>As part of the Ubuntu repository it was installed in a matter of a few seconds. It needed to be configured in the <em>ices</em> section of <code>nano ~/.config/xmms2/xmms2.conf</code>.</p>
<p>Make sure you stop the daemon before you make any changes, otherwise they might not be visible next time you restart. If you can&#8217;t find an <em>ices</em> section after a fresh installation, you can let XMMS2 and the plugin set a default section up for you. Try restarting the daemon. In the <em>ices</em> section I just set the password and portnumber (9600) to match what I defined for Icecast2 earlier. See also the <a href="http://wiki.xmms2.xmms.se/wiki/Using_ICES_Output">XMMS2 wiki</a>.</p>
<p>This didn&#8217;t want to work in the beginning. I received error messages about insufficient permissions. I think this was caused by the fact that XMMS2 and the plugin both ran as <em>gerrit</em>, Icecast2, however, as <em>root</em>. To solve this problem I copied the Icecast configuration (icecast.xml and admin, web-folders) to my home-folder, and changed the owner of all these files.</p>
<pre class="brush:bash;light:true;">
chown -hR gerrit ~/.icecast
sudo nano /etc/default/icecast2
</pre>
<p>Now I had to point the daemon to the new folder:</p>
<pre class="brush:bash;">
CONFIGFILE="/home/gerrit/.icecast/icecast.xml"

# Name or ID of the user and group the daemon should run under
USERID=gerrit
GROUPID=gerrit
</pre>
<p>Almost done. There still was a warning about the error- and access logfiles in <tt>/var/log/icecast2/</tt>. To solve this I had to change the owner of the log-files <code>chown gerrit /var/log/icecast2/*</code> and restart Icecast2 <code>/etc/init.d/icecast2 start</code></p>
<p>Now I could set the output plugin to <em>ices</em> and start the playback with</p>
<pre class="brush:bash;light:true;">
xmms2 config output.plugin ices
xmms2 play
</pre>
<p>The radio stream is reachable with the following address for favorite media player: <tt>http://localhost:9600/stream.ogg.m3u</tt>, or <tt>http://192.168.1.43:9600/stream.ogg.m3u</tt></p>
<p><img src="http://blog.wessendorf.org/wp-content/uploads/2009/06/vlcwin.png" alt="VLC" title="VLC" width="447" height="146" class="alignnone size-full wp-image-860" /></p>
<p>Having turned the output to Icecast, you won&#8217;t be able to hear any music on the server, unless you open the stream. If you want to return to the standard sound output, use the following command:</p>
<pre class="brush:bash;light:true;">xmms2 config output.plugin alsa</pre>
<p>At this time, both output plugins can&#8217;t be activated together to hear music both on server and remote computer. You can only hear music if you connect to the Icecast server. The <a href="http://wiki.xmms2.xmms.se/wiki/FAQ#Why_can.27t_I_use_multiple_output_plugins_at_the_same_time.3F_I_want_to_listen_to_music_and_act_as_a_stream_source">XMMS2 FAQ</a> explains:</p>
<blockquote><p>The possibility of multiple outputs involves a nontrivial solution. The biggest problem is keeping all of the outputs in sync with each other. Each output must pull audio data from a buffer following the last decoder or effect plugin in the xform chain at a rate determined by the samplerate of the underlying device. For example, streaming audio will have an exact bitrate since no actual audio hardware is used for obtaining audio data, but a soundcard&#8217;s samplerate may vary by a few Hertz with temperature, components, and voltage. We end up with an ever growing buffer (if the buffer holds data longer for slower outputs) or dropped samples (if the data is destroyed after the faster output has read it). </p>
<p>    There are also smaller issues like that the xmms2 daemon takes into account the delays caused by the output plugin when showing the current playtime, but if there are multiple outputs these delays can vary. So one of them would have to be defined as a primary output to keep this feature in use. </p>
<p>    Current plan to resolve the aforementioned problem with concurrent output and stream sourcing is to make it possible for effect plugins to keep a constant input format and stay alive through song changes. That way they can draw the data from the stream itself and it won&#8217;t have synchronizing problems because the whole chain is still simple and one-dimensional.<span class="end"/></p></blockquote>
<p>The current configuration works great now. I have a server that provides a stream of music. This stream is accessible from all other computers, and I am able to control this Internet radio stream using XMMS2 and Esperanza if needed, from any other computer running Linux or Windows. </p>
<p>At this point I could probably stop and let it be, but I want to integrate some web-services and social media tools. While I&#8217;m mostly just experimenting with a new range of Internet applications, I&#8217;m also interested in sharing my music favorites and creating some personal charts of my highlights, the most frequently played tracks, the most important artists, etc. A great tool to link my local music adventures to the web 2.0 world is last.fm.</p>
<h3>Last.fm</h3>
<p><img src="http://blog.wessendorf.org/wp-content/uploads/2009/06/lastfm.png" alt="Last.fm" title="Last.fm" width="442" height="272" class="aligncenter size-full wp-image-862" /></p>
<p>To make my XMMS2/Icecast2 server talk with Last.fm I installed the <em>xmms2-scrobbler</em> plugin&#8230;as usual, from the standard Ubuntu repository. To configure this plugin I followed the instructions I found at <a href="http://sudosys.be/?q=xmms2-scrobbler">sudosys</a>.</p>
<p>The XMMS2 configuration is stored in <tt>~/.config/xmms2</tt>, but the plugin tries to read it in <tt>~/.xmms2</tt>. To work around this, I created a symlink <code>ln -s ~/.config/xmms2 ~/.xmms2</code></p>
<p>Next, I created a new directory for the plugin configuration and created a config file with my credentials:</p>
<pre class="brush:bash;light:true;">
mkdir -p ~/.config/xmms2/clients/xmms2-scrobbler
nano ~/.config/xmms2/clients/xmms2-scrobbler/config
</pre>
<p>added</p>
<pre class="brush:bash;light:true;">
user: MY_LASTFM_USER
password: MY_LASTFM_PASS
</pre>
<p>I created another symlink for the actual xmms2-scrobbler script, so it gets executed when I launch XMMS2.</p>
<pre class="brush:bash;light:true;">
ln -s /usr/bin/xmms2-scrobbler ~/.config/xmms2/startup.d/
</pre>
<p>After restarting XMMS2 your music will show up on your last.fm profile.</p>
<p><img src="http://blog.wessendorf.org/wp-content/uploads/2009/06/facebook.png" alt="Facebook" title="Facebook" width="207" height="263" class="alignright size-full wp-image-863" />Continuing from there you can expand your network by adding other services that access last.fm for your music statistics. On Facebook you can use a <a href="http://apps.new.facebook.com/listening/">last.fm application</a> to display your charts on your page or profile.</p>
<p>You can also integrate your last.fm data into your WordPress site with the <a href="http://www.ibegin.com/labs/wp-lifestream/">LiveStream</a> plugin. There is much more you can do, especially if you write your own applications, but this is how far my own configuration goes right now.</p>
<p>I hope you found any of these notes use- or helpful. As usual, please let me know if I forgot something or made a mistake somewhere. :]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wessendorf.org/2009/06/music-networking-with-xmms2-icecast2-and-lastfm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Headphones with Ubuntu 9.04 and Gateway T-6345u</title>
		<link>http://blog.wessendorf.org/2009/05/headphones-with-ubuntu-904-and-gateway-t-6345u/</link>
		<comments>http://blog.wessendorf.org/2009/05/headphones-with-ubuntu-904-and-gateway-t-6345u/#comments</comments>
		<pubDate>Tue, 26 May 2009 23:07:57 +0000</pubDate>
		<dc:creator>gerrit</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.wessendorf.org/?p=789</guid>
		<description><![CDATA[Ubuntu seemed to work perfectly on the Gateway T-6345u laptop model&#8230;until I plugged my headphones in and found that no sound was coming out of them. I tried a second pair and could make sure there was nothing wrong with the headphones. When I plugged them in while something was playing, I noticed that there [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop u">U</span>buntu seemed to work perfectly on the Gateway T-6345u laptop model&#8230;until I plugged my headphones in and found that no sound was coming out of them. I tried a second pair and could make sure there was nothing wrong with the headphones. When I plugged them in while something was playing, I noticed that there was some sound for a very brief split-second. I could reproduce this effect with both headphones and began to wonder if this could be a software issue.</p>
<p>So I looked around and quickly found discussions about the same or similar symptoms occurring on several releases of Ubuntu, from 8.x up to the 9.04 <em>Jaunty Jackalope</em> release I am using on this laptop. Some suggested to kill PulseAudio, but this didn&#8217;t help at all. It was most likely related to <a href="http://www.alsa-project.org/">ALSA</a>, the <em>Advanced Linux Sound Architecture</em> drivers.</p>
<p>I found <a href="http://ubuntuforums.org/showthread.php?t=806620&#038;highlight=sound+headphones">this thread</a> in the Ubuntu forums revolving around pretty much the same problem I experienced. The solution sounded pretty simple:<span id="more-789"></span></p>
<pre class="brush:bash;light:true;">
head -n 1 /proc/asound/card0/codec*
or
less /proc/asound/card0/codec#0
</pre>
<p>to find out what soundcard or chipset I&#8217;m using. For this Gateway model I got <tt>"Codec: SigmaTel STAC9205"</tt>.</p>
<pre class="brush:bash;light:true;">
zless /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz
</pre>
<p>and looked for the section for <tt>"Module snd-hda-intel"</tt>. In this section I was supposed to find <tt>STAC9205</tt>. I found the following models:</p>
<ul>
<li>ref           Reference board</li>
<li>dell-m42      Dell (unknown)</li>
<li>dell-m43      Dell Precision</li>
<li>dell-m44      Dell Inspiron</li>
</ul>
<pre class="brush:bash;light:true;">
sudo nano /ect/modprobe.d/alsa-base.conf
</pre>
<p>Next I had to configure alsa to use the right model. None of the entries I found fit, but I started with <em>&#8220;ref&#8221;</em>, and added the following line: </p>
<pre class="brush:bash;light:true;">
options snd-hda-intel model=ref
</pre>
<p>I restarted, but nothing changed for me. I tried dell-m42, m43, m44 and even other (Gateway related) models I found in other sections. Sometimes I would get a headphone slider and/or checkbox in the volume control dialog, sometimes not, sometimes I would get no sound at all, and I never managed to get a beep out of my headphones.</p>
<p>I tried to follow some other leads I found in the Ubuntu forums, installed tools, helpers, and libraries, but none of them made a difference. Ultimately, everything led back to alsa.</p>
<p>I downloaded and installed the latest alsa-driver:</p>
<pre class="brush:bash;light:true;">
sudo apt-get install alsaconf
sudo apt-get install alsa-base alsa-utils
sudo apt-get install build-essential linux-headers-$(uname -r)
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.20.tar.bz2
tar -xjf alsa-driver-1.0.20.tar.bz2
cd alsa-driver-1.0.20
./configure
sudo make
sudo make install
</pre>
<p>This didn&#8217;t seem to make much of a difference, so I looked around and tried a <a href='http://blog.wessendorf.org/wp-content/uploads/2009/05/alsaupgrade-10x-rev-117.tar'>script</a> I found <a href="http://ubuntuforums.org/showthread.php?t=1046137">here</a> to download and install the latest snapshot. Again, this first didn&#8217;t seem to make much of a difference. Until I looked at the following list of models:</p>
<pre class="brush:bash;light:true;">
gedit /usr/src/Alsa-1.0.20/alsa-driver-1.0.20/alsa-kernel/Documentation/HD-Audio-Models.txt
</pre>
<p>This file reveals the following list of models for <tt>STAC9205/9254</tt>:</p>
<ul>
<li>ref		Reference board</li>
<li>dell-m42	Dell (unknown)</li>
<li>dell-m43	Dell Precision</li>
<li>dell-m44	Dell Inspiron</li>
<li>eapd		Keep EAPD on (e.g. Gateway T1616)</li>
<li>auto		BIOS setup (default)</li>
</ul>
<p>Compared to the previous version that shipped with Ubuntu, there are two new entries, <tt>eapd</tt> and <tt>auto</tt> now. The <tt>eapd</tt> (<em>external amplifier power down</em>) option looks quite promising, so back to&#8230;</p>
<pre class="brush:bash;light:true;">
sudo nano /etc/modprobe.d/alsa-base.conf
</pre>
<p>and added the following line:</p>
<pre class="brush:bash;light:true;">
options snd-hda-intel model=eapd probe_mask=1 position_fix=1
</pre>
<p>Restart and success! The headphones finally work properly. If you were having similar problems and found this blog in the attempt to find a solution, I hope these steps could help you a bit further in your quest. I can imagine that other headphone issues could perhaps be solved as well, with an alsa-upgrade and adjustments to <tt>alsa-base.conf</tt>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wessendorf.org/2009/05/headphones-with-ubuntu-904-and-gateway-t-6345u/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>VideoLAN</title>
		<link>http://blog.wessendorf.org/2009/05/videolan/</link>
		<comments>http://blog.wessendorf.org/2009/05/videolan/#comments</comments>
		<pubDate>Tue, 26 May 2009 02:08:24 +0000</pubDate>
		<dc:creator>gerrit</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.wessendorf.org/?p=752</guid>
		<description><![CDATA[VideoLAN has been my favorite video player for quite some time already. It&#8217;s free and works on Windows as well as Linux. It plays almost anything you feed it without having to install third-party codecs. It features a nice, clean and functional user-interface and doesn&#8217;t use up many resources. In all this time I never [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop v">V</span>ideoLAN has been my favorite video player for quite some time already. It&#8217;s free and works on Windows as well as Linux. It plays almost anything you feed it without having to install third-party codecs. It features a nice, clean and functional user-interface and doesn&#8217;t use up many resources. In all this time I never used the network streaming features that give this player its &#8220;LAN&#8221; name. This weekend I went to discover some of the magic that is hidden behind the simple, innocent interface.<span id="more-752"></span></p>
<p>I have the following scenario now: On my desktop PC in the upstairs office I run VideoLAN as streaming server on Windows XP. The streaming session is initiated from the menu via <em>Media/Streaming</em> or <em>Ctrl-S</em>.</p>
<p><a href="http://blog.wessendorf.org/wp-content/uploads/2009/05/vlc-streamoutput.gif"><img src="http://blog.wessendorf.org/wp-content/uploads/2009/05/vlc-streamoutput-150x150.gif" alt="vlc-streamoutput" title="vlc-streamoutput" width="150" height="150" class="alignright size-thumbnail wp-image-784" /></a> To make things easy I just use the UDP protocol to the destination address 192.168.0.100 (my downstairs client) and port 1234. As Encapsulation I choose MPEG-TS. I leave all the other settings at their default values.</p>
<p>Before I start to play the stream, I added a web-interface from the menu via Tools/Add Interface/Web Interface. This will allow me to control the player remotely from any web-browser. This worked only on localhost (the server) first. To give other computers access to the streaming server, I have to add their addresses or subnet to the <a href="http://www.videolan.org/developers/vlc/NEWS">hosts</a>-file at <em>C:\Program Files\VideoLAN\VLC\http\.hosts</em></p>
<p>Downstairs I have an Asus EeePC, originally running on Xandros Linux, now on <a href="http://www.geteasypeasy.com/">Easy Peasy</a>, an Ubuntu based operating system optimized for netbooks. The EeePC is connected to the television via an <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16814100010">AVerMedia PC/Mac to TV Converter</a> and uses VideoLAN as a client.</p>
<p>Since the streaming server is already sending the video to its IP address, all I have to do is to start playing the stream, from the menu at <em>Media/Open Network</em> or <em>Ctrl-N</em>. The protocol is UDP and the address can stay empty.</p>
<p>And that&#8217;s it. The video is now playing on the television set. I can also use any of the other laptops or web-enabled devices to launch the remote control interface at <tt>http://streamingserver-address:8080/</tt> and pause, play, adjust volume etc.</p>
<p>So far so good, this works relatively well. However, the video sometimes skips or shows some visible artifacts, which I think are caused by the wireless network range all across the house. I was wondering if I could improve the playback quality by reducing the required bandwidth of the video stream. I experimented with the video and audio codec settings or different encapsulation settings in the stream output dialog box, but none of them really worked. With other settings the player starts to stream, but nothing visible (or audible or both) arrives at the other end. Sometimes VLC doesn&#8217;t start to stream at all, or even crashes with an exception. I have to read more about the individual settings and formats, and how I can activate and control them.</p>
<p>In this scenario above I let one server stream a video to one client with a known IP address. If you set the server to stream to a <a href="http://en.wikipedia.org/wiki/Multicast_address">multicast</a> IP address (e.g. 224.0.2.1), you can use a whole group of clients to play the video stream simultaneously. Not sure how often I will make use of this, but it works impressively well! I once played a video on both EeePCs and two desktop PCs.</p>
<p>The VideoLAN player starts the built-in web-server at port 8080 by default. If this port is already taken by another application, you can change it by launching VLC with the command-line parameter <tt>--http-host host:port</tt>. More information can be found in the <a href="http://www.videolan.org/doc/play-howto/en/ch04.html#id295619">documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wessendorf.org/2009/05/videolan/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharp UXB800 Configuration Notes</title>
		<link>http://blog.wessendorf.org/2008/04/sharp-uxb800-configuration-notes/</link>
		<comments>http://blog.wessendorf.org/2008/04/sharp-uxb800-configuration-notes/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 10:18:15 +0000</pubDate>
		<dc:creator>gerrit</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[fax]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://blog.wessendorf.org/?p=440</guid>
		<description><![CDATA[For a while I used Internet based fax-services to send and receive faxes, but these solutions did not really work for me, because I don&#8217;t use faxes often enough to subscribe and pay for a monthly service. And if I ever use it, I don&#8217;t use it for just one or two pages, but often [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop f">F</span>or a while I used Internet based fax-services to send and receive faxes, but these solutions did not really work for me, because I don&#8217;t use faxes often enough to subscribe and pay for a monthly service. And if I ever use it, I don&#8217;t use it for just one or two pages, but often receive 48 pages or more. So paying the service 75 cents per page was not reasonable either. I was looking into fax/scanner/printer combos and modems, but none of those solutions seemed right for my case.</p>
<p>I knew I need my own fax-machine and I found the Sharp UXB800 fax-machine that was not only very cheap at $80, it can also receive faxes as TIFF and PDF and forward them to an email-address. Perfect for me: no paper and ink wasted.</p>
<p>The fax-machine has one problem, however: It doesn&#8217;t support any of the SMTP authentication methods needed to forward emails through my ISP, and there is no way to upgrade its firmware to add support. I found a workaround relaying the incoming faxes through a mail-server in my home network. This mail-server can be open for the fax-machine and be set up with the proper authentication needed for the ISP mail server.<span id="more-440"></span></p>
<p>First I used the free <a href="http://www.hmailserver.com/">hMailServer</a> for Windows, which worked very nicely and quietly as a background service. Later I decided to switch to a Ubuntu Linux based mail server running in our basement.</p>
<p>The following are a few (<em>raw!</em>) notes, originally just to myself and not really meant as a tutorial. Maybe some of these notes can be useful if you own a UXB800. If I have some time I might create a walk-through with screenshots and photos one day. </p>
<p>In my recent configuration I decided to give the fax-machine a static IP, but it works just as easily with DHCP.</p>
<ul>
<li>In your lan/dsl router, assign a name like <tt>faxmachine</tt> to a static ip-address like <tt>192.168.1.80</tt>. This is optional, dynamically assigned ip-addresses via dhcp work as well. I found it a bit more convenient to treat the fax machine as a static device.</li>
<li>In your fax machine settings, setup machine identification and network:<br />
Use DHCP: <tt>No</tt><br />
IP Address: <tt>192.168.1.80</tt><br />
Subnet Mask: <tt>255.255.255.0</tt><br />
Default Gateway: <tt>192.168.1.1</tt><br />
DNS (Primary): <tt>192.168.1.1</tt><br />
DNS (Secondary): <tt>192.168.1.1</tt><br />
The settings-page can now be reached through <tt>http://faxmachine/</tt>.</li>
<li>In your fax machine settings, setup email:<br />
SMTP Server: <tt>mymailserver</tt><br />
Port number: <tt>25</tt><br />
No POP before SMTP: <tt>No</tt><br />
Sender name: <tt>My Name</tt><br />
Email-address: <tt>myname@mymailserver.mydomain.lan</tt><br />
Email-subject: <tt>Incoming Fax</tt><br />
Message: <tt>My message</tt><br />
File Format: <tt>PDF</tt></li>
<li>You now need to setup a forwarding address. This cannot be done with the web-setup menu, but has to be done on the fax machine itself:</li>
<li>Function/Rcv Fax to E-Mail:<br />
Act. Rcv Fax To Mail: <tt>1 YES</tt><br />
Print received fax: <tt>2 NO</tt><br />
Report Setting: <tt>1 Print Error Only</tt><br />
Forwarding Address: <tt>2 CLEAR</tt><br />
Forewarding Addr. Clr: <tt>01 START</tt><br />
Forewarding Addr. Clr: <tt>STOP</tt><br />
Forwarding Address: <tt>1 SET</tt><br />
Forwarding Addr. Set: <tt>01</tt><br />
Forwarding Addr #01: <tt>START for all</tt><br />
Email # Mode: <tt>myname@myserver.mydomain.lan START STOP STOP</tt></li>
<li>In your web-setup, add the email to the <em>destination management</em> page:<br />
Destination Name: <tt>My Name / Rapid 01</tt><br />
E-mail Address: <tt>myname@myserver.mydomain.lan</tt></li>
</ul>
<h3>Notes</h3>
<p>If I remember right, the mail server worked pretty much out of the box in Ubuntu. On Windows I set up hMailServer as the following before:</p>
<ul>
<li>Installed hMailServer and chose external MySQL database to link to my local server instance.</li>
<li>Database name: <tt>hmailserver</tt></li>
<li>Domain/General/Domain name:<br />
<tt>mydomain.lan &amp; default-settings</tt></li>
<li>Domain/General/Add account:<br />
<tt>myname@mydomain.lan &amp; default-settings</tt></li>
<li>Settings/Protocols: <tt>POP and SMTP</tt></li>
<li>Settings/Protocols/SMTP/Delivery of email:<br />
Hostname: <tt>mymailserver</tt><br />
SMTP relayer: <tt>mail.myisp.domain</tt><br />
Port: <tt>25</tt><br />
Server requires authentication<br />
Username/Password</li>
<li>Settings/Advanced/IP Ranges/Add LAN:<br />
Priority: <tt>25</tt><br />
<tt>192.168.1.15 - 192.168.1.47</tt><br />
Allow connections: <tt>SMTP</tt><br />
Allow deliveries from: <tt>Local to Local, Local to external, External to external</tt><br />
Other: <tt>Forwarding relay</tt></li>
<li>Settings/Advanced/IP Ranges/Edit My Computer:<br />
Priority: <tt>15</tt><br />
<tt>127.0.0.1 - 127.0.0.1</tt><br />
Allow connections: <tt>SMTP, POP</tt><br />
Allow deliveries from: <tt>all</tt><br />
Other: <tt>Spam protection</tt></li>
<li>Settings/Advanced/IP Ranges/Edit Internet:<br />
Priority: <tt>10</tt><br />
<tt>0.0.0.0 - 255.255.255.255</tt><br />
Allow connections: <tt>none</tt><br />
Allow deliveries from: <tt>none</tt><br />
Require authentication: <tt>all</tt><br />
Other: <tt>Spam protection</tt></li>
</ul>
<p>I hope these notes could at least give an idea how to make this fax-machine work. These instructions will probably vary from one network or computer configuration to another.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wessendorf.org/2008/04/sharp-uxb800-configuration-notes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

