<?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>Madabar.techblog &#187; linux</title>
	<atom:link href="http://madabar.com/techblog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://madabar.com/techblog</link>
	<description>If it ain't broke you're not trying hard enough</description>
	<lastBuildDate>Fri, 09 Sep 2011 13:57:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Logitech Harmony Universal Remote Linux Software Support</title>
		<link>http://madabar.com/techblog/2011/09/09/logitech-harmony-universal-remote-linux-software-support/</link>
		<comments>http://madabar.com/techblog/2011/09/09/logitech-harmony-universal-remote-linux-software-support/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 13:46:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AV]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[remote controls]]></category>

		<guid isPermaLink="false">http://madabar.com/techblog/?p=50</guid>
		<description><![CDATA[On a friend&#8217;s recommendation, I purchased a Logitech Harmony universal remote. Some quick searching online suggested that the unofficial community Linux support for this device was decent. It took a bit of extra futzing around to get it working under Linux (Fedora 14 in my case), but I got there in the end. Amazingly it [...]]]></description>
			<content:encoded><![CDATA[<p>On a friend&#8217;s recommendation, I purchased a Logitech Harmony universal remote. Some quick searching online suggested that the unofficial community Linux support for this device was decent.</p>
<p>It took a bit of extra futzing around to get it working under Linux (Fedora 14 in my case), but I got there in the end. Amazingly it supports all my devices (TV, PVR, DVD, RX) despite some of them being ancient and obscure, for example a cheap and cheerful Telefunken DVD player.</p>
<p>Logitech has a web site for configuring and downloading the settings needed to control up to five of your AV devices with the Harmony remote. Unfortunately, the current configuration site balks with an &#8216;unsupported operating system&#8217; / missing plugin error when visited from a browser running on Linux. Time to head off the beaten track&#8230;</p>
<p>The &#8216;congruity&#8217; package provides a graphical setup for the Logitech Harmony. The process still involves configuring the device from a <a href="http://members.harmonyremote.com/" title="http://members.harmonyremote.com/" target="_blank">Logitech website</a>, but at an alternative URL, and some preparation is required:</p>
<ol>
<li>Install the &#8216;congruity&#8217; package. In Fedora: <code>sudo yum install congruity</code></li>
<li>Configure the web browser to ask what to do with download links. In Firefox: Edit->Preferences->General->Downloads->Always ask me where to save files</li>
</ol>
<p>Now go through the following process:</p>
<ol>
<li>Plug in the remote via the provided USB cable.</li>
<li>Visit the URL mentioned above.</li>
<li>Create an account (why do I need to provide my name to program a remote control?)</li>
<li>Skip/ignore the &#8220;you need to update your software&#8221; steps, and eventually a download prompt appears.
<li>Choosing &#8216;open&#8217; rather than &#8216;save&#8217; impressively results in the Congruity graphical setup up launching.</li>
<li>Step through the setup boxes as prompted.</li>
</ol>
<p>However, in my case the remote control detection phrase failed. This was overcome by updating the concordance package from 0.21 to 0.23 and trying again. See further below for the sordid details.</p>
<p>I was then able to select my four devices and program the Harmony remote control unit.</p>
<p>I encountered some teething issues when attempting some tasks with the remote, e.g. the wrong AV input was selected on the TV or the DVD player wouldn&#8217;t switch off, but I pressed the &#8216;help&#8217; button on the remote and it tried some things and made it work! </p>
<p>The only thing I couldn&#8217;t get to work was changing the band (AM/FM) on the radio tuner of the AV receiver (Yamaha RX-V361).</p>
<p>Now, provided the devices are in standby mode, it is a one touch action to have everything setup to watch TV, then another to watch a DVD and so on. This saves a lot of fiddling and lengthy explanations to visitors of how correctly set all the various remotes to watch TV, not to mention removing some clutter.</p>
<p>It&#8217;s a shame that the Linux configuration is not smoother. Perhaps it could work better by separating out the concordance device identification data, and provide a mechanism for updating that alone, without having to recompile or rebuild the whole package.</p>
<p>It&#8217;s also a bit unsettling that future reprogramming of the remote is dependent on Logitech&#8217;s website being operational. It feels all too inevitable that bit-rot will set in once Logitech&#8217;s priorities shift onto newer products.</p>
<p>Nevertheless, it&#8217;s working just well enough for now.</p>
<p>Sordid details:</p>
<p>In different attempts the following errors occurred during the detection phase within the Congruity graphical app:</p>
<pre>LibConcordException: libconcord function 'init_concord' failed with error code 11 ('Error connecting or finding the remote')</pre>
<p>&#8230;and&#8230;</p>
<pre>LibConcordException: libconcord function 'get_identity' failed with error code 1 ('Unknown error')</pre>
<p>Now for the investigative diagnostics:</p>
<p>Running the &#8216;concordance&#8217; command line app to display detected info also failed to find the device in my case: <code>sudo concordance -i</code></p>
<pre>
Concordance 0.21
Copyright 2007 Kevin Timmerman and Phil Dibowitz
This software is distributed under the GPLv3.

ERROR: failed to requesting identity
Requesting Identity: Failed with error 1
</pre>
<p>Digging a bit deeper reveals the relevant USB device ID information, and shows that at some level the operating system is aware of the device:</p>
<p><code>lsusb | grep -i logitech</code></p>
<pre>
Bus 005 Device 006: ID 046d:c122 Logitech, Inc. Harmony 700 Remote
</pre>
<p><code>dmesg</code></p>
<pre>
[ 8041.000104] usb 5-1: new full speed USB device using uhci_hcd and address 6
[ 8042.176170] usb 5-1: New USB device found, idVendor=046d, idProduct=c122
[ 8042.176181] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8042.176189] usb 5-1: Product: Harmony Remote 0-0.2.0
[ 8042.176195] usb 5-1: Manufacturer: Harmony Remote 0-0.2.0
</pre>
<p>Interestingly, while my particular unit was marketed as a &#8220;Logitech Harmony 600 Five-In-One Universal Remote&#8221;, lsusb reports it as a Logitech Harmony 700 Remote.</p>
<p>Some web searching turned up a useful thread on <a href="http://ubuntuforums.org/showthread.php?t=781059&#038;page=15">troubleshooting Harmony software setup with Congruity and Concordance</a>:</p>
<blockquote><p>
i had the same problem.<br />
I bought a Harmony 650, and concordance (0.21) doesnt detect it.<br />
Easy solution: install concordance 0.23&#8243;
</p></blockquote>
<p>Now, I tend to prefer the clean solution to the easy one. In Fedora that involves building and upgrading relevant RPM packages (as opposed to downloading the tarball and doing a make install as root, which doesn&#8217;t have the traceability that RPM packaging gives).</p>
<p>Here is an outline of the steps:</p>
<ol>
<li>Remove the existing packages to avoid conflicts later on: <code>sudo yum remove congruity</code></li>
<li>Install build dependencies: <code>sudo yum install libusb-devel python-devel</code></li>
<li>Download standard Fedora source packages for libconcord and concordance in order to get the .spec files: <code> yumdownloader --source --disablerepo=ifedora --enablerepo=fedora libconcord concordance</code></li>
<li>Download the <a href="http://sourceforge.net/projects/concordance/files/">concordance-0.23.tar.bz source tarball</a> in a web browser.</li>
<li>Edit libconcord.spec and comment out the patch lines, and replace references to version 0.21 with 0.23:
<pre>
#Patch0: libconcord-0.21-mime-type-def.patch
#%patch0 -p1
# Comment out mime file
#%{_datadir}/mime/packages/%{name}.xml
</pre>
<p>The patch lines need to be removed to avoid errors during the rpmbuild phase like the following:</p>
<pre>
Reversed (or previously applied) patch detected!  Assume -R? [n] n

RPM build errors:
    File not found: /home/makerpm/rpmbuild/BUILDROOT/libconcord-0.23-1.fc14.x86_64/usr/share/mime/packages/libconcord.xml
</pre>
<li>Change to &#8220;makerpm&#8221; user <code>su - makerpm</code> and copy the spec files in the SPECS directory and the tarball into the SOURCES directory.</li>
<li>Build the libconcord rpm package: <code>rpmbuild -ba libconcord.spec</code></li>
<li>Install the generated rpm: <code>sudo yum localinstall --nogpgcheck /home/makerpm/rpmbuild/RPMS/x86_64/libconcord-python-0.23-1.fc14.x86_64.rpm</code><br />
If this is not done at this point then the latter rpm building will fail with something like:</p>
<pre>
error: Failed build dependencies:
	libconcord-devel >= 0.23 is needed by concordance-0.23-1.fc14.x86_64
</pre>
</li>
<li>Edit <code>concordance.spec</code> and change all occurrences of the version 0.21 to 0.23</li>
<li>Build the concordance rpm package: <code>rpmbuild -ba SPECS/concordance.spec</code></li>
<li>Install the resultant packages: <code>yum localinstall --nogpgcheck /home/makerpm/rpmbuild/RPMS/x86_64/libconcord-python-0.23-1.fc14.x86_64.rpm</code><br />
<code>yum localinstall --nogpgcheck /home/makerpm/rpmbuild/RPMS/x86_64/concordance-0.23-1.fc14.x86_64.rpm</code>
</li>
<li>Install congruity again, now that the backend has been upgraded: <code>sudo yum install congruity</code></li>
</ol>
<p>Note that I&#8217;ve missed some steps above, e.g. some variant of <code>rpmbuild --rebuild xyz.srpm</code> which is left as an exercise for the reader.</p>
<p>Now the concordance tool will be cleanly installed and should show up the device:</p>
<pre>
[root@orange etc]# concordance -i
Concordance 0.23
Copyright 2007 Kevin Timmerman and Phil Dibowitz
This software is distributed under the GPLv3.

Requesting Identity: 100%                 done
  Model: Logitech Harmony 700 (Molson)
  Firmware Version: 0.2
  Hardware Version: 1.1
  Config Flash Used: 12% (473 of 3904 KiB)
</pre>
<p>The Ubuntu forum thread also mentioned the following which may be required in some cases:<br />
<code>echo 'SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c122", MODE="666"' |tee /etc/udev/rules.d/custom-concordance.rules</code><br />
Also tried changing SYSFS to ATTR, based on warnings in <code>/var/log/messages</code></p>
<p>At this point, the web configuration steps outlined earlier in the post should work, with congruity successfully detecting the Harmony remote, allowing subsequent software setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://madabar.com/techblog/2011/09/09/logitech-harmony-universal-remote-linux-software-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NTSC to PAL DVD conversion in Linux</title>
		<link>http://madabar.com/techblog/2009/04/05/ntsc-to-pal-dvd-conversion-in-linux/</link>
		<comments>http://madabar.com/techblog/2009/04/05/ntsc-to-pal-dvd-conversion-in-linux/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 06:53:30 +0000</pubDate>
		<dc:creator>twegener</dc:creator>
				<category><![CDATA[AV]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://madabar.com/techblog/?p=34</guid>
		<description><![CDATA[I needed to convert a home-made video (well slide-show with soundtrack really) that was sent over from the USA. Attempting to play this on a PAL-only TV results in unwatchable flickering monochrome output. Based on some instructions for DVD format conversion I was able to convert the NTSC disc to PAL using the steps listed [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to convert a home-made video (well slide-show with soundtrack really) that was sent over from the USA. Attempting to play this on a PAL-only TV results in unwatchable flickering monochrome output. Based on some <a href="http://www.linuxforums.org/forum/gaming-games-multimedia-entertainment/6883-legitimate-dvd-copying-pal-ntsc-conversions.html">instructions for DVD</a> <a href="http://osdir.com/ml/video.mjpeg.user/2003-03/msg00318.html">format conversion</a> I was able to convert the NTSC disc to PAL using the steps listed below. This was on a Fedora 10 system with the <a href="http://rpmfusion.org">rpmfusion</a> repos installed. </p>
<pre>
# Note: about 1.3GB of workspace was required to generate 170MB output, in this case a short slide show with sound track.
# 

yum install vobcopy mjpegtools dvdauthor
mkdir video_work
cd video_work
vobcopy -l
mkfifo stream.yuv
mplayer -ao null -noframedrop -vo yuv4mpeg VIDEONAME.vob &#038;
cat stream.yuv|yuvfps -r25:1|yuvscaler -n p -O DVD |mpeg2enc -n p -f 8 -F 3 -o out.m2v
mplayer -ao pcm -vo null -vc dummy VIDEONAME.vob
# Note: 224000 bits per second (224kbits/sec)
ffmpeg -ab 224000 -ac 2 -ar 48000 -i audiodump.wav audiodump.ac3
mplex -f 8 -o ready-to-master.mpg out.m2v audiodump.ac3
mkdir dvdauthor_out
cat &lt;&lt; EOF &gt; dvdauthor.xml
&lt;dvdauthor dest="/data_dir/video_work/dvdauthor_out"&gt;
&lt;vmgm&gt;
&lt;/vmgm&gt;
&lt;titleset&gt;
&lt;titles&gt;
&lt;video /&gt;
&lt;pgc&gt;
&lt;vob file="ready-to-master.mpg" /&gt;
&lt;/pgc&gt;
&lt;/titles&gt;
&lt;/titleset&gt;
&lt;/dvdauthor&gt;
EOF
dvdauthor -x dvdauthor.xml
growisofs -Z /dev/dvd -dvd-video dvdauthor_out
</pre>
]]></content:encoded>
			<wfw:commentRss>http://madabar.com/techblog/2009/04/05/ntsc-to-pal-dvd-conversion-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LightScribe &#8211; meh</title>
		<link>http://madabar.com/techblog/2008/11/27/lightscribe-meh/</link>
		<comments>http://madabar.com/techblog/2008/11/27/lightscribe-meh/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 10:58:03 +0000</pubDate>
		<dc:creator>twegener</dc:creator>
				<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://madabar.com/techblog/2008/11/27/lightscribe-meh/</guid>
		<description><![CDATA[One of tonight&#8217;s tasks was to burn a freshly downloaded Fedora 10 DVD ISO image. My dad gave me some blank LightScribe DVDs a while back, so I thought I&#8217;d give them a try, not having done so before. After a quick look around it appears the only LightScribe labelling software available for Linux is [...]]]></description>
			<content:encoded><![CDATA[<p>One of tonight&#8217;s tasks was to burn a freshly downloaded Fedora 10 DVD ISO image. My dad gave me some blank LightScribe DVDs a while back, so I thought I&#8217;d give them a try, not having done so before. </p>
<p>After a quick look around it appears the only <a href="http://fedorasolved.org/multimedia-solutions/lightscribe-for-linux">LightScribe labelling software available for Linux</a> is proprietary. <a href="http://www.lacie.com/">LaCie</a> provide the software in RPM packages which is nice if you are a Fedora user like me. (Apparently they have tested it with the other major distros, which is nice to see.) It installed fine under Fedora 10 beta, which was a nice surprise given that it was apparently written for Fedora 5. It didn&#8217;t install a menu entry, but firing up the &#8220;LaCie Lightscribe Labeller&#8221;, &#8217;4L-gui&#8217;, provided a reasonably nice experience. </p>
<p>I grabbed some <a href="http://fedoraproject.org/wiki/Artwork/MediaArt/F10">DVD media artwork from the Fedora art team</a>. There were two labels in each image file, so I had to pick one and chop it in half with the GIMP. I then cropped it to remove the alignment patterns, and then did an autocrop to crop to the edge of the DVD label. Then it was a simple matter of importing it in the 4L-gui and selecting &#8216;fit image height to disc&#8217;. </p>
<p>Writing the disc label took a bewilderingly long 15 minutes. I suppose it is effectively doing the same thing as burning a CD, but it&#8217;s a big wait for little reward. The inscribed label is a hazy monochrome image that is below the surface of the disc. </p>
<p>In future I think I&#8217;ll just use a pen. Nevertheless, it&#8217;s interesting to the see the improvement in the quality of Linux software provided by a hardware vendor. It would be even better if they would free the code. This would enable distros to incorporate the software into the main repos, making the experience a bit more streamlined and integrated.</p>
]]></content:encoded>
			<wfw:commentRss>http://madabar.com/techblog/2008/11/27/lightscribe-meh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

