<?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>arkinEx Codex &#187; ffmpeg</title>
	<atom:link href="http://www.arkinex.com/contains/ffmpeg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arkinex.com</link>
	<description>the place where all my code can be viewed</description>
	<lastBuildDate>Wed, 04 Nov 2009 20:39: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>Convert time (hr:min:secs) into seconds</title>
		<link>http://www.arkinex.com/php/snippets/47/convert-time-into-duration-seconds/</link>
		<comments>http://www.arkinex.com/php/snippets/47/convert-time-into-duration-seconds/#comments</comments>
		<pubDate>Sun, 14 Sep 2008 23:33:47 +0000</pubDate>
		<dc:creator>arkin</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[thumbnail]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[video editing]]></category>

		<guid isPermaLink="false">http://www.arkinex.com/?p=47</guid>
		<description><![CDATA[I wrote this snippet to convert ffmpeg&#8217;s information output time into seconds, i can then determine the 25, 50 and 75 percentages to create 3 different thumbnails of a movie (using ffmpeg also). Heres the snippet: function time2seconds&#40;$time='00:00:00'&#41;&#123; list&#40;$hr,$m,$s&#41; = explode&#40;':', $time&#41;; return &#40; &#40;int&#41;$hr*3600 &#41; + &#40; &#40;int&#41;$m*60 &#41; + &#40;int&#41;$s; &#125; Hope you [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this snippet to convert ffmpeg&#8217;s information output time into seconds, i can then determine the 25, 50 and 75 percentages to create 3 different thumbnails of a movie (using ffmpeg also).</p>
<p>Heres the snippet:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> time2seconds<span style="color: #009900;">&#40;</span><span style="color: #000088;">$time</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'00:00:00'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hr</span><span style="color: #339933;">,</span><span style="color: #000088;">$m</span><span style="color: #339933;">,</span><span style="color: #000088;">$s</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$hr</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3600</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$m</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #000088;">$s</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Hope you find this as useful as I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arkinex.com/php/snippets/47/convert-time-into-duration-seconds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
