<?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>TheHippo &#187; youtube-dl</title>
	<atom:link href="http://blog.thehippo.de/tag/youtube-dl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thehippo.de</link>
	<description>if (i=1) throw null;</description>
	<lastBuildDate>Tue, 20 Jul 2010 12:36:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to download a YouTube video and convert it to a mp3 file</title>
		<link>http://blog.thehippo.de/2010/02/tools-and-software/download-youtube-video-convert-mp3/</link>
		<comments>http://blog.thehippo.de/2010/02/tools-and-software/download-youtube-video-convert-mp3/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:29:31 +0000</pubDate>
		<dc:creator>Hippo</dc:creator>
				<category><![CDATA[Tools and Software]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[youtube]]></category>
		<category><![CDATA[youtube-dl]]></category>

		<guid isPermaLink="false">http://blog.thehippo.de/?p=186</guid>
		<description><![CDATA[How to download a video from Youtube and convert it into a mp3 file? (Or a mpeg video, or&#8230;). The most complicated part was to actually download the flv-movie. After you got this on your harddrive it is quite easy to perform more conversation to diffent file formats. Here the are my instructions for downloading [...]]]></description>
			<content:encoded><![CDATA[<p>How to download a video from <a title="Youtube" href="http://www.youtube.com" target="_blank">Youtube</a> and convert it into a <a title="Wikipedia: mp3" href="http://en.wikipedia.org/wiki/Mp3" target="_blank">mp3</a> file? (Or a mpeg video, or&#8230;). The most complicated part was to actually download the <a title="Wikipedia: FLV" href="http://en.wikipedia.org/wiki/Flash_Video" target="_blank">flv</a>-movie. After you got this on your harddrive it is quite easy to perform more conversation to diffent file formats. Here the are my instructions for downloading and converting to mp3.<span id="more-186"></span></p>
<h1>Downloading</h1>
<p id="clone-url-https">I used a small python script <a title="youtube-dl" href="http://bitbucket.org/rg3/youtube-dl/src/tip/youtube-dl" target="_blank">youtube-dl</a> for downloading the video data.</p>
<ul>
<li>It is available in the Ubuntu repositories
<pre>sudo apt-get install youtube-dl</pre>
</li>
<li> If you encounter some problems you also could do a source checkout from BitBucket (requires that Mercurial is installed):
<pre>hg clone <a class="linkification-ext" title="Linkification: http://bitbucket.org/rg3/youtube-dl/" href="http://bitbucket.org/rg3/youtube-dl/">http://bitbucket.org/rg3/youtube-dl/</a></pre>
</li>
<li>Download the video from a terminal:
<pre> youtube-dl <a class="linkification-ext" title="Linkification: http://www.tube.com/watch?v=videoid" href="http://www.tube.com/watch?v=videoid">http://www.tube.com/watch?v=videoid</a></pre>
</li>
<li>After the download you will find a videoid.flv in your folder</li>
</ul>
<h1>Getting the audio data</h1>
<p>For extracting the audio data I used <a title="ffmpeg" href="http://www.ffmpeg.org/" target="_blank">ffmpeg</a>.</p>
<ul>
<li>If you haven&#8217;t installed it already:
<pre>sudo apt-get install ffmpeg</pre>
</li>
<li>We will extract the audio data to a simple wave file. This file is gonna be large, so make sure you delete it afterwards.
<pre>ffmpeg -i videoid.flv output.wav</pre>
</li>
</ul>
<h1>Converting to MP3</h1>
<p>For converting the wav file to a mp3 file I used <a title="Lame" href="http://lame.sourceforge.net/" target="_blank">lame</a>.</p>
<ul>
<li>Run (the &#8220;-b&#8221; arguments sets the bitrate of the mp3):
<pre>lame -b 192 -h output.wav output.mp3</pre>
</li>
</ul>
<h2>Notes</h2>
<ul>
<li>There a lot of other ways to get the data. Instead of lame you could use <a title="MPlayer" href="http://www.mplayerhq.hu" target="_blank">mplayer</a>, but this way I alway ended with broken mp3 files.</li>
<li>Instead of converting to wave file you also could create a mpeg video and then create the mp3 file directly from this video.</li>
<li>Lame and also ffmpeg have tons of options available from the command line, which could increase speed and quality of the conversation.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.thehippo.de/2010/02/tools-and-software/download-youtube-video-convert-mp3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.178 seconds -->
