<?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>Yet another web log &#187; Multimedia</title>
	<atom:link href="http://blog.philippheckel.com/category/multimedia/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Thu, 17 Mar 2011 10:04:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Picasa for Linux: Export albums in sort order</title>
		<link>http://blog.philippheckel.com/2011/01/12/picasa-for-linux-export-pictures-in-sort-order/</link>
		<comments>http://blog.philippheckel.com/2011/01/12/picasa-for-linux-export-pictures-in-sort-order/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 19:00:47 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Picasa]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/?p=568</guid>
		<description><![CDATA[As one of the best picture organizers out there, Picasa is (in my opinion) almost complete in terms of features and has a nice look and feel at the same time. Even though Google stopped developing the Linux version after 3.0, it still works perfectly using Wine and a couple of cp-statements. However, as stated [...]]]></description>
			<content:encoded><![CDATA[<p>As one of the best picture organizers out there, <a href="http://picasa.google.com/index.html##">Picasa</a> is (in my opinion) almost complete in terms of features and has a nice look and feel at the same time. Even though Google stopped developing the <a href="http://picasa.google.com/linux/">Linux version</a> after 3.0, it still works perfectly using Wine and <a href="http://www.webupd8.org/2010/04/how-to-install-picasa-36-in-ubuntu.html">a couple of cp-statements</a>.</p>
<p>However, as stated many times by Picasa users and bloggers [<a href="http://blog.alex-kunz.de/2009/01/picasa-exporting-albums-correctly.html">1</a>,<a href="http://www.google.com/support/forum/p/Picasa/thread?tid=46f5680a3047ae21&#038;hl=en">2</a>,<a href="http://www.google.com/support/forum/p/Picasa/thread?tid=6290b10dc34e6de7&#038;hl=en">3</a>,<a href="http://www.google.com/support/forum/p/Picasa/thread?tid=38a72e56f77f06a6&#038;hl=en">4</a>,...], Picasa&#8217;s export function misses a tiny little feature that maintains the sort order of the album when exporting it to a folder. Instead of renaming the pictures to keep them sorted in normal file managers (by name), Picasa just copies the files of an album to one folder and thereby destroys the order. As if that wasn&#8217;t enough, Picasa also overwrites duplicates filenames from different source folders. </p>
<p>This missing feature has even led to small standalone projects that fix this issue, e.g. <a href="http://code.google.com/p/piae/">Picasa Independent Album Exporter (PIAE)</a> and <a href="http://sourceforge.net/projects/picasaorderpres/">Picasa Order Preserver</a>. While both applications do their job, both are a bit heavyweight, and PIAE only works for Windows (and not on Wine). </p>
<p>This post presents a tiny little Perl script that renames pictures of an exported album according to their Picasa sort order.</p>
<p><span id="more-568"></span></p>
<h3 id="toc-download-installation">Download &amp; Installation</h3>
<p>The script requires Perl module <a href="http://search.cpan.org/dist/XML-Simple/">XML::Simple</a> to be installed. In Debian/Ubuntu, install the package <a href="apt://libxml-simple-perl">libxml-simple-perl</a>.</p>
<p>Download the script, save it to your preferred location and make it executable:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libxml-simple-perl
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>picasa-export \
          http:<span style="color: #000000; font-weight: bold;">//</span>blog.philippheckel.com<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2011</span><span style="color: #000000; font-weight: bold;">/</span>01<span style="color: #000000; font-weight: bold;">/</span>picasa-export
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>picasa-export</pre></div></div>

<p>That&#8217;s it for the installation.</p>
<p><strong>Download</strong>: <a href="http://blog.philippheckel.com/uploads/2011/01/picasa-export">Picasa Export 0.1, January 2011</a></p>
<h3 id="toc-usage">Usage</h3>
<p>Using the script is also very simple. Simple export the desired album using Picasa&#8217;s &#8220;Export to HTML Page&#8221; function and call the script with the exported folder as parameter.</p>
<p><strong>Example with &#8220;YourAlbum&#8221;:</strong></p>
<ol>
<li><strong>Picasa</strong>: Click &#8220;Folder&#8221; → &#8220;Export to HTML Page&#8230;&#8221;. Select &#8220;XML Code&#8221; in the template list. Click &#8220;Export&#8221;.</li>
<li><strong>Console</strong>:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ picasa-export ~<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;Picasa\ HTML\ Exports/YourAlbum&quot;</span></pre></div></div>

</li>
</ol>
<p>After that, the new folder &#8220;neworder&#8221; contains the renamed pictures.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2011/01/12/picasa-for-linux-export-pictures-in-sort-order/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Copy videos from Youtube &amp; Co. to your iPod Video with Ubuntu</title>
		<link>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/</link>
		<comments>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 16:22:04 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/07/30/copy-videos-from-youtube-co-to-your-ipod-video-with-ubuntu/</guid>
		<description><![CDATA[Since nearly everybody in the US and more and more Europeans have an iPod and the whole world loves Youtube, wouldn&#8217;t it be nice to copy these flash streaming videos (flv-files) to your iPod Video? &#8212; Yes, it is possible. And I will tell you how. 1st step: Copy the flash video files (capture the [...]]]></description>
			<content:encoded><![CDATA[<p>Since nearly everybody in the US and more and more Europeans have an iPod and the whole world loves Youtube, wouldn&#8217;t it be nice to copy these flash streaming videos (flv-files) to your iPod Video? &#8212; Yes, it is possible. And I will tell you how.</p>
<p><span id="more-8"></span></p>
<h3 id="toc-1st-step-copy-the-flash-video-files-capture-the-flv-files">1<sup>st</sup> step: Copy the flash video files (capture the FLV-files)</h3>
<p>Ubuntu (and I guess nearly every Linux distribution) makes it really easy to download the flash videos which can be streamed on platforms like Youtube and all the others. <em>Bad luck for Windows users.</em></p>
<ul>
<li>Just open your browser (Opera in my case, Firefox does it too)</li>
<li>Go to the website with the video you want to stream</li>
<li>Hit &#8220;Play&#8221;, wait a few seconds and push &#8220;Pause&#8221; so that the video starts to buffer</li>
<li>Now open the <em>/tmp</em>-folder in a file manager like Nautilus or Konquerer</li>
<li>You will find a file with a name like &#8220;Flashzad23&#8243;, in any case something starting with &#8220;Flash&#8221;</li>
<li>Rename this file to &#8220;my-youtube-video.flv&#8221;. This also works when the buffering process has not been finished yet</li>
</ul>
<p>That&#8217;s it. </p>
<p>If you just want to watch the video, it&#8217;s possible to just open it with your favourite player such as VLC, Totem, MPlayer, etc. This also works while it is still buffering! But since you want to copy it to the iPod Video, you need to resize/re-encode it to a <em>m4v</em>- or <em>mov</em>-file.</p>
<h3 id="toc-2nd-step-resizere-encode-the-flv-file-for-the-ipod-video">2<sup>nd</sup> step: Resize/Re-encode the flv-file for the iPod Video</h3>
<p>Unfortunately, I didn&#8217;t find a perfect <em>and</em> fast solution to re-encode flv-videos for the iPod. I will demonstrate two ways, the <em>fast</em> one for movies and series you only want to watch once. And the <em>perfect</em> one for videos you want to keep on the iPod for a longer time.</p>
<h4 id="toc-install-ffmpeg-from-the-medibuntu-repository">Install &#8220;ffmpeg&#8221; from the Medibuntu repository</h4>
<p>For both ways it is at least necessary to install the packages <em>ffmpeg</em> and <em>libavcodec0</em> from the Medibuntu Repository instead of the regular Ubuntu reps. </p>
<p>You can find out how to do this on the <a href="https://help.ubuntu.com/community/Medibuntu">Ubuntu help pages</a>.</p>
<h4 id="toc-the-fast-way">The fast way</h4>
<p>The fast way a one big <em>disadvantage</em>: The iPod isn&#8217;t able to estimate the length of the video. That means it&#8217;s not possible to use the nice diamond control to jump within the video. Regular rewind and fast-forward is still possible anyway.</p>
<p>Luckily, you only need one tool: ffmpeg. Just install it via apt-get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span></pre></div></div>

<p>Basically, just use this command to convert a flv-file to a mov-file (readable/playable by the iPod Video):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;my-youtube-video.flv&quot;</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-vcodec</span> mpeg4 <span style="color: #660033;">-maxrate</span> 1000k \
   <span style="color: #660033;">-b</span> 700k <span style="color: #660033;">-qmin</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-qmax</span> <span style="color: #000000;">5</span> <span style="color: #660033;">-bufsize</span> <span style="color: #000000;">4096</span> <span style="color: #660033;">-g</span> <span style="color: #000000;">300</span> <span style="color: #660033;">-acodec</span> aac <span style="color: #660033;">-ab</span> 192k \
   <span style="color: #660033;">-s</span> 320x240 <span style="color: #660033;">-aspect</span> <span style="color: #000000;">4</span>:<span style="color: #000000;">3</span> <span style="color: #ff0000;">&quot;my-youtube-video.mov&quot;</span></pre></div></div>

<p>To simplify the mass-conversion, I wrote a tiny script which can be copied to your own &#8220;.bin&#8221;-directory (cp. <a href="/2008/05/16/launch-nautilus-with-the-current-working-directory/">this article</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #000000; font-weight: bold;">@</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$file</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-vcodec</span> mpeg4 <span style="color: #660033;">-maxrate</span> 1000k <span style="color: #660033;">-b</span> 700k <span style="color: #660033;">-qmin</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-qmax</span> <span style="color: #000000;">5</span> \
           <span style="color: #660033;">-bufsize</span> <span style="color: #000000;">4096</span> <span style="color: #660033;">-g</span> <span style="color: #000000;">300</span> <span style="color: #660033;">-acodec</span> aac <span style="color: #660033;">-ab</span> 192k <span style="color: #660033;">-s</span> 320x240 <span style="color: #660033;">-aspect</span> <span style="color: #000000;">4</span>:<span style="color: #000000;">3</span> <span style="color: #007800;">$file</span>.mov
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<h4 id="toc-the-perfect-and-slow-way">The perfect (and slow) way</h4>
<p>Well, this way might be the better one since the disadvantage from above doesn&#8217;t occur. Unfortunately, it does take <em>a lot longer</em>. A LOT! But just try it out by yourself.</p>
<p>I found an <a href="/uploads/2008/07/flv2ipod.sh">flv-to-iPod (m4v) encoding script</a> on ubuntu.com written by John Dong. Find instructions and installation hints to the script on the <a href="https://help.ubuntu.com/community/iPodVideoEncoding#Script 1: pypodconv Script">Ubuntu Wiki</a></p>
<h3 id="toc-3rd-and-last-step-transfer-the-video-to-the-ipod">3<sup>rd</sup> and last step: Transfer the video to the iPod</h3>
<p>Use gtkpod or your favorite iPod managing software to transfer the video to your iPod.<br />
I hope this helped a little. Please let me know if you have difficulties or found a better (easier) way to do the conversion!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

