<?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>Tue, 24 Aug 2010 05:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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>
