<?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>Florent Thoumie &#187; ffmpeg</title>
	<atom:link href="http://blog.xbsd.org/tag/ffmpeg/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xbsd.org</link>
	<description>Geek stuff follows</description>
	<lastBuildDate>Wed, 23 Mar 2011 12:22:49 +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>Hacking youtube videos for iPhun (and profit)</title>
		<link>http://blog.xbsd.org/2009/05/07/hacking-youtube-videos-for-iphun-and-profit</link>
		<comments>http://blog.xbsd.org/2009/05/07/hacking-youtube-videos-for-iphun-and-profit#comments</comments>
		<pubDate>Thu, 07 May 2009 10:24:06 +0000</pubDate>
		<dc:creator>Florent Thoumie</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Iphone]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[ringtones]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://blog.xbsd.org/?p=213</guid>
		<description><![CDATA[If you&#8217;re not an iPhone owner, then you&#8217;re probably not going to be interested by this post. If you don&#8217;t like custom ringtones then you&#8217;re definitely not going to be interested by this post. If you&#8217;re still reading, I&#8217;ll explain &#8230;<p class="read-more"><a href="http://blog.xbsd.org/2009/05/07/hacking-youtube-videos-for-iphun-and-profit">Read more &#187;</a></p>
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[	<p>If you&#8217;re not an iPhone owner, then you&#8217;re probably not going to be interested by this post. If you don&#8217;t like custom ringtones then you&#8217;re definitely not going to be interested by this post. If you&#8217;re still reading, I&#8217;ll explain you quickly how to convert <a href="http://www.youtube.com/">youtube</a> videos to iphone ringtones.</p>

	<p>This is basically going to be a quick walkthrough rather than a long explanation. Basically you need a way to download the youtube video (like <a href="http://bitbucket.org/rg3/youtube-dl/wiki/Home">youtube-dl</a>) and <a href="http://www.ffmpeg.org/">ffmpeg</a> compiled with faac support.</p>

	<p>For FreeBSD users, this is as simple as installing the two ports: net/youtube_dl and multimedia/ffmpeg (make sure to run &#8216;make config&#8217; and check that <span class="caps">FAAC</span> is on). For MacOS X users, the easiest way will be to download youtube-dl to your home directory (and put it in /usr/local/bin if you wish) and install ffmpeg following <a href="http://www.macosxhints.com/article.php?story=20061220082125312">these</a> instructions. Windows users can install <a href="http://www.iringer.net/" class="broken_link">iRinger</a> (haven&#8217;t tried it but it looks quite nifty).</p>

	<p>Ok, now for the actual information (this is actually pretty easy).</p>

	<p>First, find a video you like (in my case, <a href="http://www.youtube.com/watch?v=2WNrx2jq184">Bird is the word in Family Guy</a>) and download it.</p>

	<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/2WNrx2jq184&#38;hl=en&#38;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2WNrx2jq184&#38;hl=en&#38;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>

<pre>
$ youtube-dl 'http://www.youtube.com/watch?v=2WNrx2jq184'
</pre>

	<p>Then drop the video part and convert the <span class="caps">MPEG</span> stream to <span class="caps">AAC</span>.</p>

<pre>
$ ffmpeg -i 2WNrx2jq184.flv -f ipod -vn birdistheword.m4r
</pre>

	<p>Alright, that&#8217;s it! Wait, I want to get rid of the first few seconds and the last few seconds as well. Let&#8217;s just play it in mplayer (or QuickTime, or iTunes) and find the offset (-ss option) then the length (-t option). The -y option is to force overwrite the output file.</p>

<pre>
$ ffmpeg -i 2WNrx2jq184.flv -f ipod -vn -ss 28.6 -t 44.2 -y birdistheword.m4r
</pre>

	<p>Once this is finished, just send the ringtone to the iPhone, either using scp if your iphone is jailbroken (put it in /Library/Ringtones/) or via iTunes (just drag and drop it in Ringtones, then sync the iPhone). Enjoy!</p>
 <p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.xbsd.org/2009/05/07/hacking-youtube-videos-for-iphun-and-profit/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

