<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="wordpress/2.3.3" --><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Zen of Linux</title>
	<link>http://linux.goesZen.com</link>
	<description>a place to rant, meditate and then truly go Zen about linux</description>
	<pubDate>Tue, 02 Mar 2010 13:03:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GoesZenLinux" /><feedburner:info uri="goeszenlinux" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Windows XP stuck in endless activation/login loop</title>
		<link>http://linux.goesZen.com/windows-xp-stuck-in-endless-activationlogin-loop.html</link>
		<comments>http://linux.goesZen.com/windows-xp-stuck-in-endless-activationlogin-loop.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 15:10:19 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Activation]]></category>

		<category><![CDATA[cycle]]></category>

		<category><![CDATA[login]]></category>

		<category><![CDATA[logon]]></category>

		<category><![CDATA[loop]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[trouble]]></category>

		<category><![CDATA[unable]]></category>

		<category><![CDATA[windows]]></category>

		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/windows-xp-stuck-in-endless-activationlogin-loop.html</guid>
		<description><![CDATA[Not everyone is using *nix OS on their computers. Recently, I had a problem with another machine that was stuck in an endless loop of the login screen, completely preventing a proper startup of the machine.
The story was that the machine got a few hardware problems after transport which lead to DRAM replacement and changes [...]]]></description>
			<content:encoded><![CDATA[<p>Not everyone is using *nix OS on their computers. Recently, I had a problem with another machine that was stuck in an <em>endless loop of the login screen</em>, completely preventing a proper startup of the machine.</p>
<p>The story was that the machine got a few hardware problems after transport which lead to DRAM replacement and changes in the BIOS config. Booting again afterwards presented a &#8220;Three days left to register&#8221; message on subsequent boots.</p>
<p>Don&#8217;t ask why the activation period passed, but after it was over, the machine asked for product activation on every boot. The logon/login screen, the one with the user accounts on it, came up. A click on one of the accounts made a message window pop-up asking if the user wished to activate, Yes or No. Clicking on either one made the computer boot a bit, presenting the Desktop without icons, then the &#8220;Welcome&#8221;-on-blue screen and - back to the Accounts/Login Screen, starting the cycle over again. Booting into Safe-Mode didn&#8217;t help either as executing <a href="http://www.microsoft.com/genuine/selfhelp/XPPkuinst.aspx?displaylang=en&amp;sGuid=60ff359d-7c20-4397-a160-6a82154c6fde">Windows Product Key Update Tool</a> isn&#8217;t possible in Safe-Mode, basically all Activation activities do not work in Safe-Mode!</p>
<p>Many posts on the net suggest a repair with the Windows Install CD. I even tried deleting the regkey files &#8220;wpd.*&#8221; in C:\Windows\System32 - nothing worked. I was close to wiping XP with a fresh install. Then I found these posts <a href="http://www.eggheadcafe.com/software/aspnet/29691930/windows-xp-activation-loo.aspx">post 1</a> <a href="http://forums.techarena.in/windows-xp-support/984718.htm">post 2</a>. Both told me that the Activation process was somehow damaged and needed simple repair.</p>
<p><strong>The Solution</strong>:<br />
What I did was this:</p>
<ul>
<li>I booted XP into &#8220;Safe-Mode without Network drivers&#8221;. Then did  Start &gt; Run and re-registered some login-related dlls into regserver:</li>
<li>regsvr32.exe licwmi.dll &lt;ENTER&gt;</li>
<li>regsvr32.exe regwizc.dll &lt;ENTER&gt;</li>
<li>regsvr32.exe licdll.dll &lt;ENTER&gt;</li>
</ul>
<p>Additionally, I don&#8217;t know if that made a difference (or if skipping this step would fix the problem without the need to re-activate), I set the registry to ask for activation again:</p>
<ul>
<li>Start &gt;  Run, type &#8220;regedit&#8221; &lt;ENTER&gt;</li>
<li>Viewed the registry key:<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon</li>
<li>Added a  DWORD value to this key  named &#8220;Activation Required&#8221;, and</li>
<li>Set the value of this DWORD to 1 (dword:00000001).</li>
</ul>
<p>After that XP booted again into a state beyond logon and asked me to register. I registered via Phone and tataaa!: Desktop with Icons, everything back to normal.</p>
<p>German translation: <em>Dieser Artikel beschreibt, was die Lösung sein kann, wenn: Windows XP  bootet bis zum Login Screen. Wenn man auf einen Benutzer Account klickt wird man darauf hingewiesen, dass Windows neu aktiviert werden muss. Egal ob man Ja oder Nein wählt, der Rechner lädt kurz, zeigt eventuell den Desktop ohne Icons, gefolgt von &#8220;Welcome/Willkommen&#8221; und kehr dann wieder zurück zum Login Screen ohne den Nutzer ins System zu lassen oder die Aktivierung anzubieten. Man ist effektiv ausgesperrt, in einer Endlosschleife aus Registrierungs-Aufforderungen und Win-Logon. Da eine erneute Aktivierung im Safe-Mode nicht möglich ist, kommt man so auch nicht weiter.</em></p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fwindows-xp-stuck-in-endless-activationlogin-loop.html&amp;title=Windows+XP+stuck+in+endless+activation%2Flogin+loop', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/windows-xp-stuck-in-endless-activationlogin-loop.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Copy DVD: Device or resource busy</title>
		<link>http://linux.goesZen.com/copy-dvd-device-or-resource-busy.html</link>
		<comments>http://linux.goesZen.com/copy-dvd-device-or-resource-busy.html#comments</comments>
		<pubDate>Mon, 21 Dec 2009 11:04:44 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[cd]]></category>

		<category><![CDATA[copy]]></category>

		<category><![CDATA[dvd]]></category>

		<category><![CDATA[rip]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/copy-dvd-device-or-resource-busy.html</guid>
		<description><![CDATA[While wanting to use DVD::Rip, Thoggen DVD Ripper and GnomeBaker to copy (or backup) a DVD today, I encountered the strange &#8220;Error trying to open: device or resource busy&#8221; on my Ubuntu box today.
I solved this by freeing the dvd drive from system access with:
sudo umount /dev/sr0
and everything worked. BTW: I recommend GnomeBaker for easy [...]]]></description>
			<content:encoded><![CDATA[<p>While wanting to use <em>DVD::Rip</em>, <em>Thoggen DVD Ripper</em> and <em>GnomeBaker</em> to copy (or backup) a DVD today, I encountered the strange &#8220;<em>Error trying to open: device or resource busy</em>&#8221; on my Ubuntu box today.</p>
<p>I solved this by freeing the dvd drive from system access with:</p>
<p><em>sudo umount /dev/sr0</em></p>
<p>and everything worked. BTW: I recommend GnomeBaker for easy copies&#8230;</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fcopy-dvd-device-or-resource-busy.html&amp;title=Copy+DVD%3A+Device+or+resource+busy', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/copy-dvd-device-or-resource-busy.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>HTTP Live Streaming to the iPhone</title>
		<link>http://linux.goesZen.com/http-live-streaming-to-the-iphone.html</link>
		<comments>http://linux.goesZen.com/http-live-streaming-to-the-iphone.html#comments</comments>
		<pubDate>Wed, 25 Nov 2009 18:31:48 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[WIP]]></category>

		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[webserver]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[compiling]]></category>

		<category><![CDATA[http]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[live]]></category>

		<category><![CDATA[segmenter]]></category>

		<category><![CDATA[streaming]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/http-live-streaming-to-the-iphone.html</guid>
		<description><![CDATA[Live http streaming (specs here) is essentially a number of short video segments (~10 seconds each) and a permanently updated index file (.m3u8) that tells the iPhone where to fetch the next segment. Each segment is x264 video in a mpeg ts container.
You can setup a working streaming chain using ffmpeg as input, a segmenter [...]]]></description>
			<content:encoded><![CDATA[<p><em>Live http streaming</em> (specs <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-01">here</a>) is essentially a number of short video segments (~10 seconds each) and a permanently updated index file (<em>.m3u8</em>) that tells the iPhone where to fetch the next segment. Each segment is <em>x264</em> video in a <em>mpeg ts</em> container.</p>
<p>You can setup a working streaming chain using ffmpeg as input, a segmenter and a simple http webserver.</p>
<p>First you need to compile the open-source segmenter.c from assembla:</p>
<p>Download the <em>segmenter.c</em> and <em>Makefile</em></p>
<p>If you get this error:</p>
<pre>segmenter.c: In function 'add_output_stream':
segmenter.c:44: error: 'AVCodecContext' has no member named 'ticks_per_frame'
segmenter.c:46: error: 'AVCodecContext' has no member named 'ticks_per_frame'
segmenter.c:54: error: 'AVCodecContext' has no member named 'channel_layout'
segmenter.c:54: error: 'AVCodecContext' has no member named 'channel_layout'
segmenter.c: In function 'main':
segmenter.c:184: error: 'HUGE_VAL' undeclared (first use in this function)
segmenter.c:184: error: (Each undeclared identifier is reported only once
segmenter.c:184: error: for each function it appears in.)
segmenter.c:193: error: 'INT_MAX' undeclared (first use in this function)
segmenter.c:248: warning: implicit declaration of function 'avformat_alloc_context'
segmenter.c:248: warning: assignment makes pointer from integer without a cast
make: *** [all] Error 1</pre>
<p>you need to modify the command-line passed to <em>gcc</em> via the <em>Makefile</em>. So edit Makefile and pass a path to ffmpeg sources to the compiler via the <em>-I</em> flag.<br />
After you passed this one, you might get another error:</p>
<pre>gcc -Wall -I/&lt;path to my ffmpeg&gt;/ffmpeg -g segmenter.c -o segmenter -lavformat -lavcodec -lavutil -lbz2 -lm -lz -lfaac -lmp3lame -lx264 -lfaad
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
make: *** [all] Error 1</pre>
<p>in this case you need the libbz2-dev package. Install with <em>apt-get install libbz2-dev</em></p>
<p>If you still get errors after that, your system libs appear to be a bit messed up and <em>gcc</em> picks up and old <em>libav&lt;something&gt;</em> version from somewhere. A cure should be to build a recent version of ffmpeg with the <em>&#8211;enable-shared</em> flag set, so that new versions of the <em>libav</em> libraries end up being installed in <em>/usr/local/lib</em>.</p>
<p>If your freshly compiled ffmpeg (and subsequently your segmenter) tells you&#8221;<em>ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory</em> then you need to add the shared libraries directory to your shell environment with &#8220;<em>export LD_LIBRARY_PATH=/usr/local/lib</em>&#8220;. Help on that <a href="http://www.troubleshooters.com/linux/prepostpath.htm">here</a>.<br />
Another approach to <em>permanently</em> let the system know where these libs reside is to: as root - create a file <em>/etc/ld.so.conf.d/ffmpeg.conf</em> and put this line into it &#8220;<em>/usr/local/lib</em>&#8220;. Then run the command <em>ldconfig -v</em> to rebuild the library linker environment.<br />
We&#8217;ve also discussed lib linking issues in my <a href="http://linux.goeszen.com/compiling-a-recent-ffmpeg.html">compiling ffmpeg post</a>.</p>
<p>In order to stream proper videos to your audience, regarding video size, take these iPhone specs and some calculations into account:</p>
<pre>480 x 320 iPhone v1 + v2 native Display resolution
640 x 360 common 16:9 video resolution # divide width like this (640 / 16) * 9 = to get height
480 x 270 iPhone 16:9 letterboxed, full width video
320 x 180 iPhone common setting for 16:9 low Quality streaming video</pre>
<p>Now, you need to figure out for which bandwidth you&#8217;l like to transcode your source video. The iPhone can, based on hardware revision and telco provider, consume quite a number of transmission standards:</p>
<pre>3G    iPhone v2, v1 standard cellular data rate, below 100kbps in sum
GPRS  iPhone v2, v1 55-171kbps in sum
EDGE  iPhone v2, v1 108up, 217down, 236kbps in sum
3G                  some tell me &lt;384kbps for audio+video is okay for 3G
UMTS  iPhone v2     348kbps in sum
HSDPA iPhone v2     700-5700kbps in sum
WiFi  iPhone v2</pre>
<p>Use this list with caution. As a general rule of thumb, these bandwidth figures might suffice. But I am no expert here (!) and haven&#8217;t checked them thoroughly. So correct me if I am wrong. A better comparison might be <a href="http://en.wikipedia.org/wiki/List_of_device_bandwidths">here</a>. 192kbps video+audio streams should be playlable on most iPhones.</p>
<p>Encoding videos for segmentation with ffmpeg should be a no brainer. But it turned out it is trickier than thought. Some useful command lines are shared <a href="http://groups.google.com/group/iphonewebdev/browse_thread/thread/565affe7ae04e299">here</a>, <a href="http://www.dudek.org/blog/82">here</a>  and <a href="http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/">here</a>. One particular thing I ran into was the error &#8220;dts &lt; pcr &#8221; which resulted in invalid segments and thus an invalid stream. <a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-August/021585.html">Other</a> <a href="http://archives.free.net.ph/message/20091111.062002.7afd483d.en.html">users</a> are getting this error as well. A <a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-July/073110.html">bit of explanation</a> is here. There are some related issues on the ffmpeg issue tracker, e.g. <a href="http://roundup.ffmpeg.org/roundup/ffmpeg/issue1279">this</a>.</p>
<p>Sadly, there is no desktop application that supports Apple&#8217;s <em>pantos HTTP Live Streaming</em> standard, at least as of now. This makes it a bit cumbersome for a developer to debug an iPhone stream, at least without an iPhone at hand.<br />
Mplayer is the wonderweapon of media-players and is *nearly* capable of streaming iPhone streams/segments. Start it with:</p>
<pre>mplayer -playlist http://example.com/path/to/playlist.m3u8</pre>
<p>and it will play the first segment and choke on subsequent ones. But as mplayer can play any shit thrown at it, it will even play segments that the iPhone won&#8217;t play. So this is really for basic testing only.</p>
<p>Note:<br />
The ioncannon posts got a working combination of ffmpeg and segementation together - using mp3 for audio. Still, I don&#8217;t know why my tests with aac as audio encoder (as the <a href="http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/HTTPStreamingArchitecture/HTTPStreamingArchitecture.html#//apple_ref/doc/uid/TP40008332-CH101-SW2">original specs</a> require) were so unsuccessful.</p>
<p>Further reading:<br />
<a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-01">draft-pantos-http-live-streaming-01 - HTTP Live Streaming</a><br />
<a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming">draft-pantos-http-live-streaming-02 - HTTP Live Streaming</a><br />
<a href="http://en.wikipedia.org/wiki/HTTP_Live_Streaming">HTTP Live Streaming - Wikipedia</a></p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fhttp-live-streaming-to-the-iphone.html&amp;title=HTTP+Live+Streaming+to+the+iPhone', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/http-live-streaming-to-the-iphone.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Building vlc</title>
		<link>http://linux.goesZen.com/building-vlc.html</link>
		<comments>http://linux.goesZen.com/building-vlc.html#comments</comments>
		<pubDate>Thu, 05 Nov 2009 12:45:19 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[webserver]]></category>

		<category><![CDATA[building]]></category>

		<category><![CDATA[compiling]]></category>

		<category><![CDATA[source]]></category>

		<category><![CDATA[vlc]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/building-vlc.html</guid>
		<description><![CDATA[Compiling a recent/up-to-date vlc from source, from the latest SVN can be a pain as vlc has LOTS of dependencies. It can be, but it must not. Below I&#8217;m goint to present a number of strategies to take the hurdles and get a (more of less) working version of a recent vlc.
I&#8217;d like you to [...]]]></description>
			<content:encoded><![CDATA[<p><em>Compiling</em> a recent/up-to-date <em>vlc</em> from source, from the latest SVN can be a pain as vlc has LOTS of dependencies. It can be, but it must not. Below I&#8217;m goint to present a number of strategies to take the hurdles and get a (more of less) working version of a recent vlc.</p>
<p>I&#8217;d like you to note that it might be relevant which version of Linux you are running, for example vlc versions newer than 0.8.6 tend to be not compilable under Debian 4.0 Etch without customizations. That&#8217;s why Debian Etch has this ancient 0.8.6a version onboard. <a href="http://forum.videolan.org/viewtopic.php?f=13&amp;t=53007">See</a> and <a href="http://www.linuxforen.de/forums/showthread.php?p=1675695">here</a>. The main reason for this is that newer versions of vlc rely on libraries that in turn are not compilable on Etch as well.</p>
<p>Having said this, this post here is my experience <em>compiling vlc on debian 4.0 etch</em> and I got a <em>very recent</em> version of vlc compiled and working!</p>
<p>The <a href="http://wiki.videolan.org/UnixCompile">UnixCompile</a> vlc docs page should be an excellent guide. Before you read on, read it over at videolan.org!</p>
<h3>Strategy 1: Use the build system</h3>
<p>Yes, vlc relies on many libs. Knowing this, the vlc developers thankfully added a contribs system in the vlc dirs that makes adding missing libraries, or libriaries you wouldn&#8217;t like to install on your system, a breeze.<br />
Just in case you don&#8217;t know, a compile relies on <a href="http://wiki.videolan.org/Contrib_Status">libs</a> available from the environment, your system. To get through the build you can install these libs via apt-get, or tell the compiler to look for the libs in another than the standard location. This location is, eg., the vlc contribs dir. Using the build system will populate this path. It might be useful to have another look at <a href="http://linux.goeszen.com/how-do-i-compile-stuff.html">How do I compile stuff</a> or<a href="http://wiki.videolan.org/UnixCompile"> vlc Wiki UnixCompile</a> or <a href="http://wiki.videolan.org/User:J-b#VLC_configure_line">ConfigureLine</a>.</p>
<p>Using the build system is, according to the <a href="http://wiki.videolan.org/UnixCompile">UnixCompile</a> docs, for a &#8220;distro that is really bad and doesn&#8217;t provide the libs&#8221;, as you normally would install required libs with <em>apt-get build-dep vlc</em>. As Debian Etch is a bit behind, I like to call using the contribs system chosing the &#8220;universal approach&#8221;&#8230;</p>
<p>What&#8217;s a &#8220;contribs system&#8221;? Basically it is a subdir in your vlc-sources dir - put all the lib sources you&#8217;ll need to build vlc here and configure will find them. Or let the &#8220;contribs system&#8221; do this for you:</p>
<ol>
<li>&gt;  cd extras/contrib</li>
<li>&gt; ./bootstrap</li>
<li>&gt; make</li>
</ol>
<p>For the guide below, I worked with this <a href="http://repo.or.cz/w/vlc.git/snapshot/85baa88705c2319c8716114f19cfadc836659c4d.tar.gz">git snapshot version</a> from the mirror repo.</p>
<p>Still, keep this quote from <a href="http://mailman.videolan.org/pipermail/vlc-devel/2009-May/060487.html">here</a> in mind:</p>
<pre>The contribs are a way to supplement bad OS/distros which don't
provide a simple way to get the libs and development files. It's full
of hack and patches and initially designed for MacOSX and win. So it's
possible that iconv is not correctly build on unix.</pre>
<h4>The fribidi error</h4>
<p>If the build system approach exits with an error, as it did for me (the<em> fribidi</em> lib just won&#8217;t compile and broke the make), then you forgot to make sure automake and autoconf is installed (see this <a href="http://forum.videolan.org/viewtopic.php?f=13&amp;t=34264&amp;start=0">thread</a> here). So do:</p>
<p><em>apt-get install automake autoconf</em></p>
<p>wipe your vlc build dir and start over. It should run through now. If you still experience fribidi errors, try this <a href="http://forum.videolan.org/viewtopic.php?f=13&amp;t=56801">thread</a>.</p>
<h4>The out of registers error while building ffmpeg</h4>
<p>The next error I got was: &#8220;error: can&#8217;t find a register in class &#8216;GENERAL_REGS&#8217; while reloading &#8216;asm&#8217;&#8221; when it got to ffmpeg. <strike>First a look at <a href="http://conshell.net/wiki/index.php/Ffmpeg_%28Compile_Problems%29">ffmpeg compile problems</a> might help.<br />
The solutions seems to be enable our gcc to handle <a href="http://forum.videolan.org/viewtopic.php?f=12&amp;t=61172&amp;p=206057">inline assembler</a> code the way it should and provide <a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-June/048836.html">enough registers</a>. This seems related to the -O(&#8221;oh&#8221;) switch, optimized code and &#8220;<a href="http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-November/047221.html">-fomit-frame-pointer</a>&#8220;.</strike></p>
<p><strike>Look at what the extras/contrib&#8217;s make passes to ffmpeg, it should be quite a long ./configure string. Copy it to clipboard, traverse manually into extra/contrib/src/ffmpeg and do: &lt;the ./configure string&gt;  plus &#8220;-O3&#8243; in the extra-cflags category. On my system it looked like:</strike></p>
<p><strike><em>./configure &#8211;prefix=/&lt;some path&gt;/vlc/extras/contrib &#8211;extra-cflags=&#8221;<strong>-O3</strong> -I/&lt;some path&gt;/vlc/extras/contrib/include  -DNDEBUG -isystem /&lt;some path&gt;/vlc/extras/contrib/include </em><strong>-fomit-frame-pointer</strong><em>&#8221; &#8211;extra-ldflags=&#8221;-L/&lt;some path&gt;/vlc/extras/contrib/lib &#8220;  &#8211;enable-libmp3lame &#8211;enable-libgsm &#8211;enable-pic &#8211;disable-debug &#8211;enable-gpl &#8211;enable-postproc <strong>&#8211;disable-yasm</strong> &#8211;disable-ffserver &#8211;disable-ffmpeg &#8211;disable-ffplay &#8211;disable-devices &#8211;disable-protocols &#8211;disable-network &#8211;disable-shared &#8211;enable-static &amp;&amp; make &amp;&amp; make install-libs install-headers</em></strike></p>
<p>The next error I got was: &#8220;<em>libavcodec/x86/h264dsp_mmx.c: In function &#8216;put_h264_qpel4_h_lowpass_3dnow&#8217; &#8230; error: can&#8217;t find a register in class &#8216;GENERAL_REGS&#8217; while reloading &#8216;asm&#8217;</em>&#8221; when it got to ffmpeg. As it seems this much encountered error has to do with the Debian Etch version of gcc and the type of badly written code some gcc versions allow and some don&#8217;t. Subsequently leading to a lack of registers and other hickups, especially in combination with some code passages related to CPU optimizations, mmx and inline assembler code.</p>
<p>The solutions are manyfold. For some users, raising the number of available registers with the -O (&#8221;O as in Oscar&#8221;) flag solves it, e.g. -O. Others disable frame-pointer with -fomit-frame-pointer to free up another register. <a href="http://www.gossamer-threads.com/lists/mythtv/users/384264">Others</a> take PIC out of the mix by omiting the <font size="2" color="black" face="Verdana,Arial,Helvetica"><font size="2" color="black" face="Verdana,Arial,Helvetica">-DPIC -fPIC </font></font>combo in their configure string. Omitting the flag &#8211;enable-pic does the same trick.<br />
A clean solution for me was to disable the mmx optimizations, as my compile hung there, by adding the &#8211;disable-mmx flag (<a href="http://article.gmane.org/gmane.comp.video.ffmpeg.devel/46436/">via</a>) - although I do not know if this considerably slows down my resulting vlc further down the lane.</p>
<p>Here are the steps:</p>
<ol>
<li>Look at what the <em>extras/contrib</em>&#8217;s make passes to ffmpeg, it should be a quite long <em>./configure</em> string. Copy it to clipboard</li>
<li><strike>traverse manually into extras/contrib/src/ffmpeg and do: &lt;the copied ./configure string&gt; plus &#8220;&#8211;disable-mmx&#8221;.<br />
</strike>Go to <em>extras/contrib/src</em> and open <em>Makefile</em>. Look for the ffmpeg section, and the options Makefile passes to the ffmpeg compile. Should be around line 1040. And let it look like:<br />
FFMPEGCONF += \<br />
<strong>&#8211;disable-mmx \</strong><br />
&#8211;disable-debug \<br />
&#8211;enable-gpl \<br />
&#8211;enable-postproc \<br />
&#8211;disable-ffserver \<br />
&#8211;disable-ffmpeg \<br />
&#8211;disable-ffplay \<br />
&#8211;disable-devices \<br />
&#8211;disable-protocols \<br />
&#8211;disable-network<strike><br />
</strike></li>
<li>After that ffmpeg fully compiles. So <em>cd</em> up again to <em>extras/contrib</em> and continue with <em>make</em>.</li>
</ol>
<h4>The libtool dirac version mismatch error</h4>
<p>After fixing the ffmpeg issue, a few minutes later compilation stopped again with:</p>
<p>libtool: Version mismatch error.  This is libtool 2.2.6, but the<br />
libtool: definition of this LT_INIT comes from an older release.<br />
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6<br />
libtool: and run autoconf again.<br />
make[3]: *** [libdirac_byteio_la-accessunit_byteio.lo] Error 63<br />
make[3]: Leaving directory `/&lt;somedir&gt;/vlc/extras/contrib/src/dirac/libdirac_byteio&#8217;<br />
make[2]: *** [install-recursive] Error 1<br />
make[2]: Leaving directory `/&lt;somedir&gt;/vlc/extras/contrib/src/dirac&#8217;<br />
make[1]: *** [.dirac] Error 2<br />
make[1]: Leaving directory `/&lt;somedir&gt;/vlc/extras/contrib/src&#8217;<br />
make: *** [using-src] Error 2</p>
<p>A quick visit to a search engine brought me to <a href="http://forum.videolan.org/viewtopic.php?f=13&amp;t=66443">this thread</a>. So:</p>
<ol>
<li><em>cd</em> into <em>extras/contrib/src/dira</em>c</li>
<li><em>./bootstrap</em> which worked its magic on <em>aclocal.m4</em></li>
<li><em>cd ../..</em></li>
<li><em>make</em></li>
</ol>
<h4>The pangocairo interruption</h4>
<p>The next stop was:<br />
checking for PANGOCAIRO&#8230; configure: error: Package requirements (pangocairo &gt;= 0.16) were not met:<br />
No package &#8216;pangocairo&#8217; found<br />
Consider adjusting the PKG_CONFIG_PATH environment variable if you<br />
installed software in a non-standard prefix.<br />
Alternatively, you may set the environment variables PANGOCAIRO_CFLAGS<br />
and PANGOCAIRO_LIBS to avoid the need to call pkg-config.<br />
See the pkg-config man page for more details.<br />
make[1]: *** [.tiger] Error 1<br />
make[1]: Leaving directory `/root/vlc/extras/contrib/src&#8217;<br />
make: *** [using-src] Error 2</p>
<p>This is a problem with the <a href="http://mailman.videolan.org/pipermail/vlc-devel/2008-December/054236.html">newly included</a> <a href="http://code.google.com/p/libtiger/">libtiger</a> and <a href="http://code.google.com/p/libkate/">libkate</a> libs and their dependencies.</p>
<p><strike>Open <em>extras/contrib/src/packages.mak</em> in your editor of choice. Go to thes lines for libkate and libtiger and alter the version variables to require more recent ones, like this:</strike></p>
<ol>
<li><strike>&#8230;<br />
KATE_VERSION=0.3.6<br />
KATE_URL=http://libkate.googlecode.com/files/libkate-$(KATE_VERSION).tar.gz<br />
TIGER_VERSION=0.3.3<br />
&#8230;<br />
</strike></li>
<li><strike>Then remove the libkate and libtiger build directories from src:<br />
in <em>extras/contrib/src</em> do <em>rm -r libtiger libkate<br />
</em></strike></li>
<li><strike>cd up into <em>extras/contrib</em> and do <em>make</em></strike></li>
</ol>
<p>Install the <a href="http://www.pango.org/">pango</a> + <a href="http://cairographics.org/download/">cairo</a> combo:</p>
<ol>
<li>First cairo: <em>apt-get install libcairo2 libcairo2-dev</em></li>
<li><strike>Then pango, which requires glib, most recent on Debian Etch is: <em>apt-get install libglib2.0-dev<br />
</em>then on to pango. One newer release that works with this glib is 1.10, so:<br />
</strike></p>
<ul>
<li><strike><em>wget http://ftp.gnome.org/pub/GNOME/sources/pango/1.10/pango-1.10.1.tar.gz</em></strike></li>
<li><strike><em>tar xvf pango-1.10.1.tar.gz</em></strike></li>
<li><strike><em>cd pango-1.10.1.tar.gz</em></strike></li>
<li><strike><em>./configure &amp;&amp; make &amp;&amp; make install</em></strike></li>
</ul>
</li>
<li>Then pango: <em>apt-get install libpango1.0-0 libpango1.0-dev</em></li>
<li>and: no-success!! (Tell me what&#8217;s wrong!)</li>
</ol>
<p>Finally giving up on this, I disabled libkate + libtiger from the contribs system by editing extras/contrib/distro.mak and commenting out the line with <em>.kate</em> <em>.tiger</em>. (Alternatively, if you haven&#8217;t had  run ./bootstrap in the contribs before, edit extras/contrib/src/Distributions/&lt;yourdistro&gt;.mak.) Then running make again, the contribs make exited with &#8216;nothing todo&#8217;. And so -</p>
<p>The contribs system was complete!</p>
<p>In order to finish the vlc build, do:</p>
<ol>
<li><em>cd</em> up into the vlc root directory, e.g. with  <em>cd ../..</em></li>
<li>run <em>./bootstrap</em> which sets the extras/contrib dir as one of the sources for compilation, etc.and spits out files for configure</li>
<li>run configure, sadly with the &#8211;disable-tiger/kate flags: <em>./configure &#8211;disable-tiger &#8211;disable-kate<br />
</em></li>
</ol>
<h4>Final glitches</h4>
<p>Still, some issues arose. With <em>libiconv</em> I got:</p>
<p>/usr/bin/ld: warning: libiconv.so.2, needed by /usr/local/lib/libvlccore.so.4, not found (try using -rpath or -rpath-link)<br />
/usr/local/lib/libvlccore.so.4: undefined reference to `libiconv_open&#8217;<br />
/usr/local/lib/libvlccore.so.4: undefined reference to `libiconv_close&#8217;<br />
/usr/local/lib/libvlccore.so.4: undefined reference to `libiconv&#8217;</p>
<p>although the contribs system properly supplied it. I found it in extras/contrib/lib and thus added the flag <em>&#8211;with-libiconv-prefix=/&lt;path to build dir&gt;/vlc/extras/contrib/lib</em> to my ./configure command. Sometimes it is a bit of a collision between the system&#8217;s libiconv and the one in the crontribs. One <a href="http://mailman.videolan.org/pipermail/vlc-devel/2009-May/060490.html">guy suggested</a> moving away libiconv from contribs - may help someone&#8230;</p>
<p>Which got me a bit further until: &#8220;<em>text/unicode.c:56:3: error: #error No UTF8 charset conversion implemented on this platform!</em>&#8220;. So, additionally adding the <em>&#8211;disable-nls</em> switch, which disables native language support (<a href="http://www.murga-linux.com/puppy/viewtopic.php?p=332266">via</a>), solved this one.</p>
<p>Anyway, after a make &amp;&amp; make install you are done.</p>
<p>If you&#8217;re still stuck, you might want to turn to strategy 2:</p>
<h3>Strategy 2: disable unneeded components that break compilation</h3>
<p>While running the ./configure &amp;&amp; make combination a number of errors will occur if your system - like my Debain 4.0 Etch - is not yet ready for Sid&#8217;s &#8220;unstable&#8221; or Lenny&#8217;s &#8220;testing&#8221; code. A first reflex might be to try to seperately compile these libs, but don&#8217;t waste your time - there&#8217;s a reason why these aren&#8217;t available, for example <em>Qt4</em>, <em>bonjour/avahi</em>, etc. They just don&#8217;t compile.</p>
<p>Anyway, on a server system you might not need the <em>glx</em>, <em>skin2</em>, etc. GUI elements of vlc. For example, I just needed the most up-to-date streaming functionalities of vlc and thus could easily neglect the user-interface bells and whistle.</p>
<p>Proceed as follows:</p>
<ol>
<li>Download one of the newer source-code tars from the ftp archive: <a href="http://download.videolan.org/pub/videolan/vlc/">ftp index here</a><br />
Or even get one of the nightly trunk or branch snapshots: <a href="http://nightlies.videolan.org/build/source/">ftp index here</a></li>
<li>Untar with <em>tar xvf</em></li>
<li>cd into the dir and run <em>./configure</em></li>
<li>Systematically note where the configure breaks, then use a search engine to track down which library this error relates to, for example errors regarding <em>avahi</em> point to the <em>bonjour</em> lib. Sometime configure directly tells you what to disable. Or:</li>
<li>Look for the disable switch with <em>./configure &#8211;help | grep &#8216;&lt;a string from the lib&#8217;s name&gt;&#8217;</em></li>
<li>Then disable this lib by, e.g., <em>./configure &#8211;disable-bonjour</em> and note additonal errors</li>
</ol>
<p>Try different versions of the vlc source code, work your way slowly up the version tree. For me, some versions compile with, some only without x264 enabled. Most versions will need disabled <em>libpostproc</em> (used for some transcoding?), <em>glx</em> (part of GUI), <em>skins2</em> (part of GUI), <em>remoteosd</em> (used when using the remote on screen display), <em>swscale</em> (for transcoding involving rescale), <em>fribidi</em> (an open source multi-language text drawing driver, for subtitles), <em>bonjour</em> (device discovery, like portable mp3 players, related to the avahi daemon/client on Linux), <em>libgcrypt</em> (used to do authentication on remote logins via remote OSD), &#8230;</p>
<p>With some libs like libfaad etc. already installed on my system and this  configure command:</p>
<p><em>./configure &#8211;disable-postproc &#8211;disable-glx &#8211;disable-skins2 &#8211;disable-remoteosd &#8211;disable-swscale &#8211;disable-fribidi &#8211;disable-bonjour &#8211;disable-libgcrypt &#8211;disable-xcb &#8211;disable-v4l2</em><br />
&#8230; I was able tobuild <em>vlc-1.1.0 Yellow Bastard</em> on my Debian Etch / Debian 4.0 system - although it threw a slew of ugly warnings on compile time and later when executed - probably that&#8217;s why it&#8217;s called Yellow Bastard. A previous <em>0.9.9a Grishenko</em> build ran much smoother&#8230;</p>
<p>Some would argue these no-gui vlcs are cripled, but they are sufficient for a (my) server usage.</p>
<h3>Strategy 3: Building an older version (checkout a tag version of vlc from git)</h3>
<p>Of course, our aim is to get a newer version than 0.8.9a on Etch, but even small victories might help here, as the <em>Janus</em> release is especially in streaming and transcoding - due to patents (Debian!) - in regards to encoders (mp3,wma) severly &#8220;broken&#8221;. A cure could be to compile a not-so-recent version. Get it, as shown above, as a git-snapshot from the ftp server or via git directly:</p>
<pre>git clone git://git.videolan.org/vlc.git vlc-git

cd vlc-git

git checkout -b '&lt;some name for this action&gt;' &lt;tag&gt;</pre>
<p>In essence, you get the whole repository, cd into it, then revert it to an older version. A bit of explanation <a href="http://stackoverflow.com/questions/791959/how-to-use-git-to-download-a-particular-tag">here</a>. You can get a list of available tags via &#8220;git tag -l&#8221; after cd into the repository.</p>
<p>Although vlc relies on git as version control, for reference, here is the post on how to <a href="http://linux.goeszen.com/subversion-checkout-a-specific-version.html">checkout older versions from svn</a>.</p>
<h3>Strategy 4: desperately search for readily build vlc packages around the web</h3>
<p>Some users did the hard work for you and provide packages of their compile results. For example, <a href="http://www.grendelman.net/log/?page=read&amp;f=1&amp;t=28">this site</a> gives advice on how to get the amd64 package of a 0.9.8a vlc. Anyway, this advice here provided as &#8216;untested&#8217; since it didn&#8217;t help me.</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fbuilding-vlc.html&amp;title=Building+vlc', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/building-vlc.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>ffmpeg - audio and video length difference issues</title>
		<link>http://linux.goesZen.com/ffmpeg-audio-and-video-length-difference-issues.html</link>
		<comments>http://linux.goesZen.com/ffmpeg-audio-and-video-length-difference-issues.html#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:43:07 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[audio]]></category>

		<category><![CDATA[ffmpeg]]></category>

		<category><![CDATA[issues]]></category>

		<category><![CDATA[length]]></category>

		<category><![CDATA[problem]]></category>

		<category><![CDATA[runtime]]></category>

		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/ffmpeg-audio-and-video-length-difference-issues.html</guid>
		<description><![CDATA[When you use ffmpeg to, for example, extract audio and video as seperate streams, or if you import it into Blender&#8217;s fabulous NLE, the Sequence Editor, you might encounter a different length of the audio and video part of the video. Call this audio video offset, audio video mismatch or simply audio video runtime/length difference [...]]]></description>
			<content:encoded><![CDATA[<p>When you use ffmpeg to, for example, extract audio and video as seperate streams, or if you import it into <a href="http://wiki.blender.org/index.php/Doc:Manual/Sequencer">Blender&#8217;s fabulous NLE, the Sequence Editor</a>, you might encounter a different length of the audio and video part of the video. Call this <em>audio video offset</em>, <em>audio video mismatch</em> or simply<em> audio video runtime/length difference</em> (this sentence to allow users find this post here&#8230;).</p>
<p>Having a look at ffmpeg&#8217;s command-line output when -i identifying or converting such a video, you are likely to see something like: &#8220;<em>Seems stream 1 codec frame rate differs from container frame rate: 59.99 (11998/200) -&gt; 30.00 (30/1)</em>&#8221; This is a good hint at that the video is somehow screwed up on the encoder side. And this is not uncommon, I saw it on .mp4 videos downloaded from YouTube etc. Also, it seems as if some containers are prone to &#8220;forgetting&#8221; about fps rates of their elements&#8230;</p>
<p>A look at <a href="http://ffmpeg.org/ffmpeg-doc.html">ffmpeg&#8217;s docs</a> tells us that there is (might be) a cure for this:</p>
<dl>
<dt>`-vsync <var>parameter</var>&#8216; </dt>
<dd> Video sync method. Video will be stretched/squeezed to match the timestamps, it is done by duplicating and dropping frames. With -map you can select from which stream the timestamps should be taken. You can leave either video or audio unchanged and sync the remaining stream(s) to the unchanged one. </dd>
<dt>`-async <var>samples_per_second</var>&#8216; </dt>
<dd> Audio sync method. &#8220;Stretches/squeezes&#8221; the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction</dd>
<dd>
</dd>
</dl>
<p>A scenario where these options are useless is, let&#8217;s say, where you extract the audio in one step, and the video in another, so ffmpeg can&#8217;t adjust the two against each other. In this case, I found out that relying on the extracted audio length is a good solution as it appears that ffmpeg seldomly (at least it never happened to me) speeds up/ slows down audio - it&#8217;s always played at the right rate, whereas the video often receives a speedup/slowdown. So you need to find a way to adjust the video&#8217;s length to the audio-length-reference. In my case I did this by adding a speed control effect in Blender&#8217;s SequenceEditor and setting the lenth of video to be == the length of audio.</p>
<p><strong>A look around</strong><br />
(other users wrangling with this problem and their ideas/solutions):</p>
<ul>
<li><a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-February/023801.html">[Ffmpeg-devel] Seems stream 1 codec frame rate differs from</a></li>
<li><a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-July/021313.html">[FFmpeg-user] codec frame rate differs from container frame rate</a></li>
<li><a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-January/013424.html">[Ffmpeg-user] In FLV codec frame rate differs from container frame</a></li>
<li><a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2008-January/013423.html">[Ffmpeg-user] codec frame rate differs from container frame rate</a></li>
<li><a href="http://www.nabble.com/Seems-stream-0-codec-frame-rate-differs-from-container-frame-rate-td22034964.html">Nabble - libav-users - Seems stream 0 codec frame rate differs</a></li>
</ul>
<p><strong>‎Update<br />
</strong>Today I needed to finally solve this issue and entered another round in tackling this problem. Doing video editing in Blender, I just could not get rid of these audio-video offsets and strips differed in length. A fresh search around the web brought me on another track: <em>fps</em> (<em>framerate</em>/<em>frames per second</em>)!</p>
<p>Some threads (<a href="http://ubuntuforums.org/showthread.php?t=1235076">here</a> and <a href="http://blenderartists.org/forum/showthread.php?p=1189324">here</a>) described exactly what I was experiencing. So I took mplayer to tell me the specs of a few videos, videos where I ran into the problem and videos which Blender imported okay. And voila: all videos that resulted in out of sync audio/video had NTSC framerates of29.xxx. As my Blender project had a fps base of 25fps this naturally resulted in offset video. Audio never differs in length as the audio track doesn&#8217;t know of framerates.</p>
<p>So <em>solutions</em> are:</p>
<ul>
<li>Setting playback to 30fps and a timebase of 1.001 to get the NTSC of 29.97fps.</li>
<li>Or outside of Blender, change the fps rate with, for example ffmpeg. A suitable command would be: <em>ffmpeg -i &lt;inputvideo&gt; -r 25 -sameq &lt;outputvideo&gt;</em>. Sadly, you can&#8217;t use the <em>-acodec copy</em>/<em>-vcodec copy</em> switches if you are changing fps, you need to re-encode&#8230;</li>
</ul>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fffmpeg-audio-and-video-length-difference-issues.html&amp;title=ffmpeg+-+audio+and+video+length+difference+issues', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/ffmpeg-audio-and-video-length-difference-issues.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>FFserver Guide</title>
		<link>http://linux.goesZen.com/ffserver-guide.html</link>
		<comments>http://linux.goesZen.com/ffserver-guide.html#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:10:35 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[WIP]]></category>

		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[ffmpeg]]></category>

		<category><![CDATA[ffserver]]></category>

		<category><![CDATA[streaming]]></category>

		<category><![CDATA[transcoding]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/ffserver-guide.html</guid>
		<description><![CDATA[This post is meant as a FAQ, an introductory guide and a general reference manual for  streaming video with ffmpeg&#8217;s FFserver. It&#8217;s is mainly the stuff I found out while setting up ffserver myself, and fills in some bits the official docs leave out.
Be sure to use a very up-to-date version (and proper combination) of [...]]]></description>
			<content:encoded><![CDATA[<p>This post is meant as a <em>FAQ</em>, an introductory <em>guide</em> and a general reference manual for  streaming video with<a href="http://www.ffmpeg.org/"> ffmpeg</a>&#8217;s <strong>FFserver</strong>. It&#8217;s is mainly the stuff I found out while setting up ffserver myself, and fills in some bits the official docs leave out.</p>
<p>Be sure to use a very up-to-date version (and proper combination) of ffmpeg and ffserver. Refer to <a href="http://linux.goeszen.com/compiling-a-recent-ffmpeg.html">Compiling a recent ffmpeg</a> for that. For Win32 / Win64 users: Yes, you can compile ffserver on Windows (using mingw) and No, I&#8217;ve got <a href="http://lists.mplayerhq.hu/pipermail/ffserver-user/2009-September/000089.html">no</a> precompiled binaries for you.</p>
<p><em>One note before you dive into it: I think FFserver is not really usable yet. Although spending hours getting it to work, my streams broke, stuttered or didn&#8217;t work at all. Until the developers get it right, look into <a href="http://www.videolan.org/vlc/streaming.html">vlc</a>, which is similarly hard to get right but at least can produce usable streams.</em> Comment on this post if your experience with or opinion towards FFserver differs.</p>
<h3>Understanding the basic FFserver concept</h3>
<p>The idea behind ffserver is that it acts as a deflector/repeater for stream data that it gets fed by an instance of ffmpeg. The feeder (ffmpeg) and the deflector/server (ffserver) can run on the same machine, or on two connected machines, based on your setup.</p>
<p>ffmpeg[ reads input video file -&gt; transcodes -&gt; sends to IP:Port ] &#8212;-&gt; ffserver[ running on IP:Port -&gt; receives data -&gt; serves clients with received data]</p>
<p>ffmpeg, although seldomly used in classic transcoding scenarios, is able to transcode to multiple formats at once. This way, ffserver gets enabled to stream one source - transcoded into multiple formats by ffmpeg -as these multiple formats to clients.</p>
<p>ffmpeg and ffserver communicate via a &#8220;pseudo&#8221; file, in most cases named feed1.ffm, the default in the example config file. On connect, ffmpeg reads the parameters ffserver requests from ffserver&#8217;s feed1.ffm file, starts transcoding, and then relays resulting data to ffserver.</p>
<p><a href="http://linux.goesZen.com/files/2009/10/ffserver_status_page.png" title="The FFserver’s status page, being mostly idle here, offering streams."><img src="http://linux.goesZen.com/files/2009/10/ffserver_status_page.png" alt="The FFserver’s status page, being mostly idle here, offering streams." align="middle" height="226" width="302" /></a></p>
<h3>Configuring and starting ffserver itself</h3>
<p><strong>Q: How does it work?</strong><br />
A: The official documentation can be found here: <a href="http://ffmpeg.org/ffserver-doc.html">ffserver Documentation</a>.</p>
<p><strong>Q: Where can I get a sample ffserver config file ffserver.conf?</strong><br />
A: At the ffmpeg.org official website: <a href="http://ffmpeg.org/sample.html">here</a>. But as it seems, not all Streams sections really work. See mytests below.</p>
<p><strong>Q: I get an okay stream by connecting with mplayer. A few seconds or minutes into the stream, it breaks and stops.</strong><br />
A: Check if your ffserver logs an &#8220;<em>invalid stream index</em>&#8221; error. I think this means that the input video is corrupt at this point. ffserver passes it througzh and  makes mplayer hickup and drop the stream. A curing hack would be to try a different video input file and checking if it runs through.</p>
<p><strong>Q: I get &#8220;Unknown AudioCodec: mp3&#8243; error when starting ffserver</strong>.<br />
A: You&#8217;ve got an mp3 stream configured in your ffservcer.conf but your ffmpeg/ffserver version has changed names for mp3. Try setting AudioCodec to &#8220;libmp3lame&#8221;.</p>
<p><strong>Q: What is Stream 0 or Stream 1?</strong><br />
A: Streams are counted up beginning at 0 in your config file, mostly Stream 0 is the Audio stream part embedded in a Stream and Stream 1 the video portion.</p>
<p><strong>Q: I get &#8220;Codecs do not match for stream 0&#8243;.</strong><strong> Or stream 1, etc.</strong><br />
A: This means ahh.. somehow ffserver dislikes your chosen bitrate. See it in the <a href="http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=ffserver.c">source</a>. And: ffserver seems to be a bit inconsistent in parsing options from ffserver.conf, also try a ffserver restart or rearranging the order of Audio and Video declarations in your &lt;Stream&gt; section.</p>
<p><strong>Q: I get &#8220;Codec bitrates do not match for stream 0&#8243;. Or stream 1, etc.</strong><br />
A: This means ahh.. somehow ffserver dislikes your chosen bitrate. See it in the <a href="http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=ffserver.c">source</a>. And: ffserver seems to be a bit inconsistent in parsing options from ffserver.conf, also try a ffserver restart or rearranging the order of Audio and Video declarations in your &lt;Stream&gt; section.</p>
<p><strong>Q: What formats/codecs/containers can ffserver handle/stream?</strong><br />
A: Should be all formats ffmpeg can Encode to: see <em>&gt; ffmpeg -formats</em> for that</p>
<p><strong>Q: May I indent stuff in the ffserver.conf config file for better readability?</strong><br />
A: Seems so. I&#8217;ve done it and it works.</p>
<p><strong>Q: Is streaming from a file still broken?</strong><br />
A: As it seems it is still broken. One of the developers <a href="http://lists.mplayerhq.hu/pipermail/ffserver-user/2009-May/000043.html">admits</a> it is at least not working very well. So far, I haven&#8217;t got it working with a revision 20182 ffserver. Anyway, up-to-date SVN versions seem to break/fix it from time to time. <a href="http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-March/019292.html">Hints</a> indicate that  the 0.5 ffmpeg release is stable in that regard.</p>
<p><strong>Q: What&#8217;s the official ffserver name/spelling?</strong><br />
A: Seems to be <em>FFserver</em>.</p>
<h3>FFmpeg issues when <em>feeding</em> to FFserver</h3>
<p><strong>Q: I get the error: <em>http://localhost:8090/feed1.ffm: I/O error occurred.  Usually that means that input file is truncated and/or corrupted.</em></strong><br />
A: This error in most cases means that ffmpegis completely unable to connect to the feed1.ffm file in the first place. 1. Check if ffserver is really running. 2. Check if you typed the correct IP:Port. 3. Check if you can connect with your browser to http://localhost:8090/stat.html (if you set up this special stream).</p>
<p><strong>Q: I get the error message: <em>http://localhost:8090/feed1.ffm: Unknown format</em></strong>.<br />
A: Usually this means your ffserver.conf file has contradicting settings for &#8220;MaxBandWidth&#8221; and stream bandwidth: for example:  input.avi (=1872kbps) &gt; MaxBandWidth (=400kbps). <a href="http://article.gmane.org/gmane.comp.video.ffmpeg.user/17577">via</a> Try setting MaxBandWidth to a value that has enough headroom, like 10000 and test again.</p>
<p><strong>Q: ffmpeg does not appear to be really doing something, and connecting to the resulting ffserver stream either caches a few % then breaks or doesn&#8217;t connect at all</strong>.<br />
A: Check if your ffmpeg/transcoding machine is fast enough to handle the transcoding, try lowering the input video&#8217;s quality, reduce the transcoding work by leveling source format and destination stream format or migrate to a bigger CPU.</p>
<p><strong>Q: I get &#8220;rc buffer underflow&#8221; error when ffmpeg starts encoding and feeding to ffserver.</strong><br />
A: If we can believe this <a href="http://www.itdp.de/transcode-users/2005-03/msg00026.html">post from 2005</a>, this is no error and occurs on the beginning of encoding. Also might be related to <a href="http://www.itdp.de/transcode-users/2005-03/msg00018.html">this</a>, also from 2005. My experience: ignore it.</p>
<h3>Whishlist (things I think are missing in FFserver)</h3>
<ul>
<li>Even out hickups in incoming feeds/streams (which currently lead to clients loosing connection)</li>
<li>HTTP-Live-Streaming,  see <a href="http://tools.ietf.org/html/draft-pantos-http-live-streaming-01">RFC</a> (currently only Apple&#8217;s and Wowza&#8217;s server have an implmenetation)</li>
<li>Ogg-Video Streaming (.ogg audio streaming is supported, is .ogv?) Icecast does it, halfway&#8230;</li>
</ul>
<h3>Working &lt;Stream&gt; sections</h3>
<p>While trying to get things working, I came across a number of Stream-Settings which worked for my revision20182 ffserver. Some reside here for quick copy&amp;past, in case you want to test them.</p>
<p># works<br />
# &lt;Stream test.swf&gt;<br />
#    Feed feed1.ffm<br />
#    Format swf<br />
#    VideoCodec flv<br />
#    VideoFrameRate 15<br />
#    VideoBufferSize 80000<br />
#    VideoBitRate 100<br />
#    VideoQMin 1<br />
#    VideoQMax 5<br />
#    VideoSize 352&#215;288<br />
#    PreRoll 0<br />
#    Noaudio<br />
# &lt;/Stream&gt;</p>
<p># works, asf seems to be the most stable<br />
#&lt;Stream test.asf&gt;<br />
#    Feed feed1.ffm<br />
#    Format asf<br />
#    VideoFrameRate 15<br />
#    VideoSize 720&#215;480<br />
#    VideoBitRate 256<br />
#    VideoBufferSize 40<br />
#    VideoGopSize 30<br />
#    AudioBitRate 64<br />
#    StartSendOnKey<br />
# &lt;/Stream&gt;</p>
<p># works<br />
# &lt;Stream test.asf&gt;<br />
#    Feed feed1.ffm<br />
#    Format asf<br />
#    VideoFrameRate 15<br />
#    VideoSize 720&#215;480<br />
#    VideoBitRate 728<br />
#    VideoBufferSize 40<br />
#    VideoGopSize 30<br />
#    AudioBitRate 64<br />
#    StartSendOnKey<br />
# &lt;/Stream&gt;</p>
<p># works<br />
# &lt;Stream test.mp3&gt;<br />
#    Feed feed1.ffm<br />
#    Format mp2<br />
#    AudioCodec libmp3lame<br />
#    AudioBitRate 128<br />
#    AudioChannels 1<br />
#    AudioSampleRate 44100<br />
#    NoVideo<br />
# &lt;/Stream&gt;</p>
<p># Real with audio and video at 64 kbits (from example.conf)<br />
# works in mplayer and real-player<br />
# &lt;Stream test.rm&gt;<br />
#    Feed feed1.ffm<br />
#    Format rm<br />
#    AudioBitRate 32<br />
#    VideoBitRate 128<br />
#    VideoFrameRate 25<br />
#    VideoGopSize 25<br />
# &lt;/Stream&gt;</p>
<p># works in mplayer and real-player<br />
# &lt;Stream test.rm&gt;<br />
#    Feed feed1.ffm<br />
#    Format rm<br />
#    VideoBitRate 128<br />
#    VideoFrameRate 25<br />
#    VideoGopSize 25<br />
#    AudioBitRate 64<br />
# &lt;/Stream&gt;</p>
<p># Multipart JPEG (from example conf)<br />
# works, but speeds your video up, setting  FrameRate to 25 for example fixes this<br />
# &lt;Stream test.mjpg&gt;<br />
#    Feed feed1.ffm<br />
#    Format mpjpeg<br />
#    VideoFrameRate 2<br />
#    VideoIntraOnly<br />
#    NoAudio<br />
#    Strict -1<br />
# &lt;/Stream&gt;</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fffserver-guide.html&amp;title=FFserver+Guide', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/ffserver-guide.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Compiling a recent ffmpeg</title>
		<link>http://linux.goesZen.com/compiling-a-recent-ffmpeg.html</link>
		<comments>http://linux.goesZen.com/compiling-a-recent-ffmpeg.html#comments</comments>
		<pubDate>Tue, 06 Oct 2009 23:33:02 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[building]]></category>

		<category><![CDATA[compiling]]></category>

		<category><![CDATA[ffmpeg]]></category>

		<category><![CDATA[source]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/compiling-a-recent-ffmpeg.html</guid>
		<description><![CDATA[Before you start, it might be useful to again read the post How do I compile stuff.
Okay, here is how you build a recent binary of ffmpeg from source. Please be aware that configure switches and library neames tend to change over time and as this post ages might need adjustment.
We will need a very [...]]]></description>
			<content:encoded><![CDATA[<p>Before you start, it might be useful to again read the post <a href="http://linux.goeszen.com/how-do-i-compile-stuff.html">How do I compile stuff</a>.</p>
<p>Okay, here is how you <em>build a recent binary of ffmpeg from source</em>. Please be aware that configure switches and library neames tend to change over time and as this post ages might need adjustment.</p>
<p>We will need a very recent yasm (a rewrite of nasm, etc.), an assembler:<br />
Download yasm from the <a href="http://www.tortall.net/projects/yasm/wiki/Download">official yasm homepage</a>:</p>
<ol>
<li>&gt; wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz</li>
<li>&gt; tar xvf yasm-0.8.0.tar.gz</li>
<li>&gt; cd yasm-0.8.0</li>
<li>&gt; ./configure</li>
<li> &gt; make</li>
<li>&gt; make install</li>
</ol>
<p>cd up again and now we are going to build a recent x264:</p>
<ol>
<li>&gt; aptitude install git-core</li>
<li>&gt; git clone git://git.videolan.org/x264.git</li>
<li>&gt; cd x264</li>
<li>&gt; ./configure &#8211;enable-pthread &#8211;enable-shared &#8211;enable-mp4-output &#8211;enable-pic</li>
<li>&gt; make</li>
<li>&gt; make install</li>
</ol>
<p>On my version of Debian, I got an error on the make step: &#8220;/usr/bin/ld: cannot find -lgpac_static&#8221;. A thread discusion this issue can be found <a href="http://ubuntuforums.org/showthread.php?t=896802">here</a>. As I was unable to get libgpac-dev installed easily (lots of broken packages, unsatisfied dependencies, etc. - not sure if my system is screwed or x264 is too new for my Debian&#8230;) I had to find a different solution - which was to omit &#8220;&#8211;enable-pthread&#8221; on configure. After that make &amp;&amp; make install worked ok.</p>
<p>After that, back to ffmpeg. ffmpeg has quite a few dependencies, so its good to start with some basic libs, everything else configure will tell you (you can search for the missing -dev package with apt-cache search lib&lt;name&gt;):</p>
<ol>
<li>&gt; aptitude install libswscale-dev libavcodec-dev libavformat-dev libvorbis-dev libtheora-dev liblame-dev liblame0  libgsm1-dev libgsm-tools libgsm1 libfaad2-dev libfaac-dev libgpac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libdc1394-13-dev</li>
<li>&gt; svn export svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-trunk<br />
Note 1: If I remember correctly, I checked out version/revision 20182.<br />
Note 2: The now official svn url is: svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg-trunk</li>
<li>&gt; cd ffmpeg-trunk</li>
<li>&gt; ./configure &#8211;enable-gpl &#8211;enable-shared &#8211;enable-pthreads &#8211;enable-libdc1394 &#8211;enable-libfaac &#8211;enable-libfaad &#8211;enable-libgsm &#8211;enable-libmp3lame &#8211;enable-libtheora &#8211;enable-libvorbis &#8211;enable-libx264 &#8211;disable-debug &#8211;enable-nonfree</li>
<li>Think about adding: &#8211;enable-libxvid  &#8211;enable-shared (the latter installs the libav* libs in /usr/local/lib</li>
<li>&gt; make</li>
</ol>
<p>On newer versions of ffmpeg &#8220;&#8211;enable-swscale&#8221; isn&#8217;t needed anymore, its permanently on. We need to set the the nonfree flag, as libfaac breaks the &#8220;free&#8221;. And as it seems, the omitted pthread flag on x264 has no relevance or at least doesn&#8217;t break the build of ffmpeg. (Comments welcome!).</p>
<p>Now: <strong>wait a minute!</strong><br />
As you may have noticed, we did not make install. The build binary is still residing in our ffmpeg-trunk dir, which is quite convenient, as we have a solid, older ffmpeg in /usr/bin and a turbocharged new version here. But there are some caveats - it doesn&#8217;t run out of the box. First we need to symlink some libs into place (otherwise you would get an <em>error on loading shared libraries libavdevice.so.52</em>, for example):<br />
(Be sure to symlink the libs your build actually requests and not blindly copy/paste the lines below, versions may vary!)</p>
<ol>
<li>&gt; ln -s libswscale/libswscale.so.0 ./</li>
<li>&gt; ln -s libavdevice/libavdevice.so.52 ./</li>
<li>&gt; ln -s libavformat/libavformat.so.52 ./</li>
<li>&gt; ln -s libavcodec/libavcodec.so.52 ./</li>
<li>&gt; ln -s libavutil/libavutil.so.50 ./</li>
</ol>
<p>And you need to add another library search path to bash, for example by calling our new ffmpeg like this:</p>
<p>&gt; LD_LIBRARY_PATH=&#8221;/path/to/ffmpeg-trunk&#8221; /path/to/ffmpeg-trunk/ffmpeg &lt;options&gt; &lt;outfile&gt;</p>
<p>or by permanently <a href="http://pwet.fr/man/linux/commandes/posix/export">export</a>&#8216;ing this LD_LIB_PATH with:</p>
<p>&gt; export LD_LIBRARY_PATH=&#8221;/path/to/ffmpeg-trunk&#8221;</p>
<p>A third option, preferred by some users, is to configure with &#8211;prefix=/opt/ffmpeg. This leads to, after make install, ffmpeg ending up under /opt in /opt/ffmpeg and binaries at /opt/ffmpeg/bin which conveneintly finds libraries at /opt/ffmpeg/lib. A bit more elegant that tweaking with ldconfig or the above symlinks/export LD_LIBRARY_PATH.</p>
<p>A nice guide to get a all-feature ffmpeg is <a href="http://juliensimon.blogspot.com/2008/12/howto-compiling-ffmpeg-x264-mp3-xvid.html">here</a>.</p>
<p>Other helpful <em>ffmpeg compiling HOW-TO</em>s are (both slightly out of date):</p>
<ul>
<li><a href="http://blog.edoceo.com/2008/10/building-ffmpeg-on-ubuntu-linux.html">Building ffmpeg on Ubuntu Linux</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=786095">HOWTO: Install and use the latest FFmpeg and x264 </a></li>
</ul>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fcompiling-a-recent-ffmpeg.html&amp;title=Compiling+a+recent+ffmpeg', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/compiling-a-recent-ffmpeg.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>TagFS, tracking progress in the field of semantic file systems</title>
		<link>http://linux.goesZen.com/tagfs-tracking-progress-in-the-field-of-semantic-file-systems.html</link>
		<comments>http://linux.goesZen.com/tagfs-tracking-progress-in-the-field-of-semantic-file-systems.html#comments</comments>
		<pubDate>Sun, 04 Oct 2009 12:38:17 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[WIP]]></category>

		<category><![CDATA[database file system]]></category>

		<category><![CDATA[filesystem]]></category>

		<category><![CDATA[metadata]]></category>

		<category><![CDATA[metafs]]></category>

		<category><![CDATA[semantic web]]></category>

		<category><![CDATA[sematic desktop]]></category>

		<category><![CDATA[tagfs]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/tagfs-tracking-progress-in-the-field-of-semantic-file-systems.html</guid>
		<description><![CDATA[Having an eye on recent developments in the field of storage, data archival and file systems, I think one can say that one of the more interesting approaches towards saving data on disk is the idea to flatten folder hierarchies and in turn introduce a filesystem that is based on tags. Each file can be [...]]]></description>
			<content:encoded><![CDATA[<p>Having an eye on recent developments in the field of storage, data archival and file systems, I think one can say that one of the more interesting approaches towards saving data on disk is the idea to flatten folder hierarchies and in turn introduce a filesystem that is based on tags. Each file can be &#8220;saved&#8221; under different &#8220;categories&#8221; of metadata descriptions, so you never have to search for files in deep directory hierarchies again.</p>
<p>Why using directories to organize files and data is (or can be) a bad idea is nice illustrated on John&#8217;s blog code@work <a href="http://torjo.blogspot.com/2008/03/directories-flawed-concept-example-of.html">here</a>. The basic idea being a number of files belonging to different tags:</p>
<blockquote><p><em>My Test Doc, belonging to Document John’s Report, belonging to Document, Report<br />
Yearly Report, belonging to Document, Report<br />
My Recruiting Report, belonging to HR, Document, Report<br />
Victor’s Resume, belonging to HR, Document, Resume<br />
HR Evaluation, belonging to HR, Document, Report</em></p></blockquote>
<p>Now each of these tags, like &#8220;Document&#8221;, in turn is its own directory, entering it will list you all the files belonging to the &#8220;Document&#8221; group. The concept further clarifies when reading <a href="http://www.unseen-academy.de/metaFSprototype.html">questor&#8217;s tage on it</a>. He also provied a Dokan based prototype of an implementation there. Other <a href="http://www.devdaily.com/blog/post/page-1/tag-based-filesystem">sources</a> discuss the topic, one being an <a href="http://brainstorm.ubuntu.com/idea/9560/">Ubuntu idea</a>, but still, as far as I know, there are few projects beyond a proof-of-concept or early dev stage. Another <a href="http://brainstorm.ubuntu.com/idea/8163">thread discussing the factual implementation</a> points out that &#8220;database oriented filesystems are the future&#8221;.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Semantic_File_System">Wikipedia: Semantic File System</a></li>
<li><a href="http://fi-mihej-en.blogspot.com/">here</a></li>
<li><a href="http://www.content-space.de/dokuwiki/artikel/technik/tag-dateisystem">Ideen für ein Tag-Dateisystem</a></li>
<li><a href="http://de.wikipedia.org/wiki/Assoziative_Dateiverwaltung">de.Wikipedia: Assoziative Dateiverwaltung</a></li>
<li><a href="http://berrueta.net/blog/thoughs-on-semantic-desktop-and-filesystems">Thoughs on Semantic Desktop and filesystems</a></li>
<li><a href="http://lists.semanticdesktop.org/pipermail/nepomuk-kde/2009-April/000348.html">Thoughts on portable metadata</a> (why a central tag repository/db is flawed), also here <a href="http://www.kdedevelopers.org/node/3923">Portable Meta-Information continued</a> and <a href="http://zwabel.wordpress.com/2009/03/29/portable-meta-information/">here</a></li>
<li><a href="http://www.hipc.org/hipc2006/posters/semfs.pdf">Semantic File Retrieval in File Systems &#8212; using Virtual Directories</a></li>
<li><a href="http://data.semanticweb.org/conference/eswc/2009/paper/70/html">The Sile Model - A Semantic File System Infrastructure for the Desktop</a></li>
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.60.4187">Some docs on CiteSeer</a></li>
<li><em>Key-Value-Stores</em>: also related is the idea of <em>non-hierarchical file systems</em>, that completely scrap the folder hierarchies and replace them with a 1-level, key-value db like paradigm accessed via tags/description.
<ul>
<li><a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/">Anti-RDBMS: A list of distributed key-value stores</a></li>
<li><a href="http://www.engineyard.com/blog/2009/mongodb-a-light-in-the-darkness-key-value-stores-part-5/">MongoDB</a></li>
</ul>
</li>
</ul>
<p>Below a list of current projects, beta implementations and the like, in no particular order:</p>
<ul>
<li><a href="http://www.uni-koblenz.de/FB4/Institutes/IFI/AGStaab/Research/SemFS">SemFS</a>, formerly TagFS (University of Karlsruhe)<br />
&#8220;SemFS is a semantic file system based on &#8220;RDF&#8221;:http://www.w3.org/TR/rdf-primer/. On Windows, it can be mounted as a WebDAV drive. For Linux, SemFS can be used as a user level file system via FUSE. SemFs currently supports tagging of files and browsing according to various ontologies.&#8221;, <a href="http://semfs.ontoware.org/pubs/2006-09-iknow2006-tagfs.pdf">described here</a> and <a href="http://semfs.ontoware.org/pubs/2006-09-iknow2006-tagfs-slides.pdf">here in slides</a> - untested, Linux, Win32 in development</li>
<li><a href="http://tech.inhelsinki.nl/dbfs/">DBFS</a> or kdbfs (University of Trente)<br />
&#8220;It is a new type of file system that does away with places where you store your files. Actually do not think of it as a file system, instead think of it as a document system.&#8221;, <a href="http://tech.inhelsinki.nl/dbfs/dbfs-presentation.pdf">described in slides here</a>, includes a custom browser application, untested, Linux only</li>
<li><a href="http://www.tagsistant.net/">Tagsistant</a><br />
&#8220;A reasoning semantic filesystem for Linux and BSD 				&#8220;, also see the <a href="http://en.wikipedia.org/wiki/Tagsistant">Wikipedia page about it</a>, appears to be quite mature, is now based on SQLite - untested</li>
<li><a href="http://wealthandpower.org/stratus/">Stratus</a><br />
&#8220;Stratus is a filesystem overlay that allows you to organize your files by tags, in the style of Flickr, <a href="http://www.youtube.com/">YouT</a>u<a href="http://www.youtube.com/">be</a>, Danbooru, etc.&#8221;, Linux+FUSE+SQLite, (<a href="http://sourceforge.net/projects/stratus/">SF page</a>) - untested</li>
<li><a href="http://rffr.de/nhfs">NHFS</a><br />
&#8220;NHFS allows you to file any file into any number of directories. Likewise, 	you may place any directory into as many directories as you like. NHFS therefore allows 	you to create a nonhierarchical directory structure with polyhierarchically connected 	files.&#8221; Linux+FUSE, untested</li>
<li><a href="http://code.google.com/p/xtagfs/">xtagfs</a><br />
&#8220;XTagFS is a FUSE filesystem that organizes files/folders in Mac OS X using &#8216;Spotlight Comment&#8217; tags. Tags are represented as folders in XTagfs and tagged files are stored as links within them.&#8221; - untested</li>
<li><a href="http://www.deskwork.de/INFOS/LCARS.HTM">LCARS Deskworks</a><br />
a tag based approach under the gui of the Star Trek LCARS desktop - untested</li>
<li><a href="http://nascent.freeshell.org/programming/TagFS/">Nascent&#8217;s TagFS</a><br />
&#8220;This is an attempt at a proof of concept. The idea is to show that browsing 	files via tags is a viable option. This is in alpha and as it is only a 	sim, it is likely to stay that way.&#8221; early stage, Linux - untested</li>
<li><a href="http://code.google.com/p/tag-fs/">tag-fs</a><br />
&#8220;This is a small, userspace filesystem based on tags, rather than on directories.&#8221; - untested</li>
<li><a href="http://metafs.sourceforge.net/">MetaFS</a> &#8221;<br />
MetaFS is an enhanced filesystem layer for Linux. It provides additional information about files (such as MP3 tags) to the user through standard filesystem interfaces (such as extended attributes). It also provides more flexible file management, by building search and other such services into the filesystem itself.&#8221; - untested</li>
<li><a href="http://www.unseen-academy.de/metaFSprototype.html">MetaFS-Prototype</a><br />
From the developer: &#8220;I&#8217;ve implemented tags, but the tags can contain also values. For example the title-tag of an mp3-file can contain 				the title of the music-file. With this enhancement it&#8217;s much easier to filter for tags because you can specifiy two 				things(tag and value).&#8221; - untested</li>
<li><a href="http://code.google.com/p/tagfs/">tagfs</a><br />
&#8220;An AI that will take the tags associated with files to create a hierarchy of tags that would then be browsed&#8221; - untested, work has halted in unusable state</li>
</ul>
<p>Related:</p>
<ul>
<li><a href="http://msdn.microsoft.com/data/winfs/">WinFS</a> (short for Windows Future Storage, see <a href="http://en.wikipedia.org/wiki/WinFS">Wikipedia page</a>)</li>
<li><a href="http://www.apple.com/macosx/tiger/spotlight.html">Apple Spotlight </a></li>
<li><a href="http://www.semanticdesktop.org/ontologies/nfo/">Nepomuk</a></li>
<li><a href="http://facetmap.com/">Facetmap</a></li>
<li><a href="http://www.apple.com/itunes/">iTunes</a> music library browsing</li>
<li><a href="http://www.pldaniels.com/comment/">Comment</a> &#8220;&#8230;stores comments on a per directory basis&#8221;</li>
<li><a href="http://xapian.org/">Xapian</a></li>
<li><a href="https://s3.amazonaws.com/">Amazon S3</a> files are accessed by a key-value approach, leaving the organisation to metadata</li>
</ul>
<p>This page is sort of awork inprogress page, so it might receive updates in the future.<br />
Comments welcome!</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Ftagfs-tracking-progress-in-the-field-of-semantic-file-systems.html&amp;title=TagFS%2C+tracking+progress+in+the+field+of+semantic+file+systems', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/tagfs-tracking-progress-in-the-field-of-semantic-file-systems.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Undelete, unerase - file recovery on Linux</title>
		<link>http://linux.goesZen.com/undelete-unerase-file-recovery-on-linux.html</link>
		<comments>http://linux.goesZen.com/undelete-unerase-file-recovery-on-linux.html#comments</comments>
		<pubDate>Fri, 29 May 2009 14:19:14 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[photorec]]></category>

		<category><![CDATA[recovery]]></category>

		<category><![CDATA[undelete]]></category>

		<category><![CDATA[unerase]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/undelete-unerase-file-recovery-on-linux.html</guid>
		<description><![CDATA[Recently, while using an USB memory stick formatted in FAT32, I accidentally deleted a few files. My first idea while sitting on a Windows machine was to seek for a simple utility from the DOS world to get the files back. I thought it would be a no-brainer, but after wading through tons of Google [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while using an USB memory stick formatted in FAT32, I accidentally deleted a few files. My first idea while sitting on a Windows machine was to seek for a simple utility from the DOS world to get the files back. I thought it would be a no-brainer, but after wading through tons of Google spam results, nasty Shareware and fake apps I was near giving up. The final stage was to try an older Version of Norton Utilites&#8217; <em>Unerase</em>, but as I soon found out, it wasn&#8217;t able to &#8220;see&#8221; my USB device&#8230;</p>
<p>The next idea was to take the stick to the Unix/Linux/ Ubuntu world, as the free and open source movement produced quite a few very professional, versatile and useful tools in the domain of data handling and storage device management. (If you don&#8217;t believe me: software raid, ntfs drivers, the SystemRescueCD, &#8230; the list goes on).</p>
<p>So I fired up <em>apt-get</em> and browsed around:</p>
<p><em>recoverjpeg</em><br />
<em>foremost</em></p>
<p>Were the first apps I tried. recoverjpeg was useless for me, as I was looking for a zip file (it returned zero results!).</p>
<p>Next was the mighty foremost, so forensic and versatile that it didn&#8217;t work for me at all (note the cynicism). The other obstacle I soon discovered was that I was trying to recover files from a USB stick, which foremost and many other tools do not read in easily. Or at least these apps were no help in discovering where my USB-stick had been mounted by the system on a lower level (/dev/sdd by the way). /media/USBSTICK, the convenience path supplied by Ubuntu, as path on the command-line to foremost got rejected. And then this annoying &#8220;output directoryis not empty&#8221; error, each time I fired foremost without success it created empty folders in my output dir&#8230;</p>
<p>Further, on other <a href="http://www.lynchconsulting.com.au/blog/index.cfm/2007/9/23/HowTo-recover-jpeg-images-from-corrupt-memory-card">blogs</a>, people kept telling that I first need to copy the USB stick raw and <em>then</em> inspect it:</p>
<blockquote><p><em>sudo dd if=/dev/sdb of=sdcard.img bs=1M</em></p>
<ul>
<li> sudo - used to perform command as root user (i.e. have correct privileges)</li>
<li>dd - command to copy data a byte level</li>
<li>if=/dev/sdb - read data from /dev/sdb - you may need to change this depending on where your memory card it located.</li>
<li>of=sdcard.img - save this to the sdcard.img file in the current directory</li>
<li>bs=1M - Copy it in 1M chunks</li>
</ul>
</blockquote>
<p>Just too lazy to do that. My hope sank and I turned to some more apps. On some thread a guy recommended &#8220;<em>fatback</em>&#8220;, which I downloaded but could not get compiled.</p>
<p>Finally I found <em><strong>photrorec</strong> </em>a helpful and working little app that saved the day for me! Initially developed for photo recovery from removable media (hence the name) the tool finds all types of files. Fire it up and it conveniently displays all mounted devices (no need to know about the structure of the /dev path&#8230;). Select the USB device here. The next screen asks if you know about the type of filesystem - <em>don&#8217;t select &#8220;Windows/PC&#8221; or similar here, as it will limit your results</em> (I don&#8217;t know why)! Select the raw/unformatted option (can&#8217;t quite remember the exact name, it&#8217;s the default. Proceed through the next screens and photorec will spit out all it can undelete from this device, although the names will be lost. And in contrast to foremost, <em>photorec</em> is smart enough to create ascending subdirs in your supplied output path, so you can run it multiple times without changing the output over and over. And it is not CLI only, it has a simple shell GUI!</p>
<p>Thumbs up for photorec!</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fundelete-unerase-file-recovery-on-linux.html&amp;title=Undelete%2C+unerase+-+file+recovery+on+Linux', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/undelete-unerase-file-recovery-on-linux.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>DVD drive won’t play DVDs properly when no region is set</title>
		<link>http://linux.goesZen.com/dvd-drive-wont-play-dvds-properly-when-no-region-is-set.html</link>
		<comments>http://linux.goesZen.com/dvd-drive-wont-play-dvds-properly-when-no-region-is-set.html#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:09:54 +0000</pubDate>
		<dc:creator>tengo</dc:creator>
		
		<category><![CDATA[multimedia]]></category>

		<category><![CDATA[drive]]></category>

		<category><![CDATA[dvd]]></category>

		<category><![CDATA[installation]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[new]]></category>

		<category><![CDATA[setup]]></category>

		<category><![CDATA[vlc]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://linux.goesZen.com/dvd-drive-wont-play-dvds-properly-when-no-region-is-set.html</guid>
		<description><![CDATA[Recently, I installed a dual-boot OS on a brand-new laptop, absolutely fresh system, no OS, no formatted disc. I started with Microsoft XP and after the basic install was complete, I added vlc-0.9.9 to test DVD playback. Surprise: I did not work. Although vlc should be able to playback a DVD without any further decryption [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I installed a dual-boot OS on a brand-new laptop, absolutely fresh system, no OS, no formatted disc. I started with Microsoft XP and after the basic install was complete, I added <a href="http://www.videolan.org/vlc/download-windows.html">vlc-0.9.9</a> to test DVD playback. Surprise: I did not work. Although vlc should be able to playback a DVD without any further decryption drivers, DVD software or costly add-ons, menus were a garbled mess of half-way decompressed video. The DVD was an original, nothing esoteric as a burned DVD or the like. Next I tried a few other DVDs with mixed results, some played a bit of the menu video and sound, some rejected playback altogether.</p>
<p>My first idea was a broken drive - but on a mint new PC? After reading a few forum posts on the net I actually thought about cleaning the lens, but thank god I didn&#8217;t (you will never get a lens clean as it was after manufacture-quality-control-unboxing&#8230;). Fiddling a bit around with Window&#8217;s right-click menu &gt; Drive Properties, I noticed that on the &#8220;DVD-Region&#8221; tab no region was set.</p>
<p>A bit more research on the net brought me to <a href="http://ubuntuforums.org/showthread.php?t=812570">this enlighting post on the Ubuntu forum</a>, which seconds what I found out that same minute myself. Set a region for the drive and magically <em>all problems are gone</em>! As it seems, my OS-free system had been shipped with an undefined-region DVD drive. After the install, I oversaw this fact and the drive produced errors on the hardware-firmware level, before it reached vlc. The same is true for Linux systems - so the next time your brand new DVD drive produces errors, check the region-setting first!</p>
<div style="clear: both;"><a href="http://www.addthis.com/bookmark.php" onclick="window.open('http://www.addthis.com/bookmark.php?pub=&amp;url=http%3A%2F%2Flinux.goesZen.com%2Fdvd-drive-wont-play-dvds-properly-when-no-region-is-set.html&amp;title=DVD+drive+won%26%238217%3Bt+play+DVDs+properly+when+no+region+is+set', 'addthis', 'scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no'); return false;" title="Bookmark using any bookmark manager!" target="_blank"><img src="http://s3.addthis.com/button1-bm.gif" width="125" height="16" border="0" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://linux.goesZen.com/dvd-drive-wont-play-dvds-properly-when-no-region-is-set.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
