<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: FFMPEG get video file duration: Ruby</title>
	<atom:link href="http://www.amityadav.name/ffmpeg-get-video-file-duration-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amityadav.name/ffmpeg-get-video-file-duration-ruby/</link>
	<description>Things to know for effective coding</description>
	<lastBuildDate>Mon, 30 Jan 2012 04:49:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Amit</title>
		<link>http://www.amityadav.name/ffmpeg-get-video-file-duration-ruby/comment-page-1/#comment-19082</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Thu, 11 Aug 2011 18:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.amityadav.name/?p=228#comment-19082</guid>
		<description>&lt;p&gt;This is nice, thanks for sharing :)&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>This is nice, thanks for sharing <img src='http://www.amityadav.name/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magne</title>
		<link>http://www.amityadav.name/ffmpeg-get-video-file-duration-ruby/comment-page-1/#comment-18849</link>
		<dc:creator>magne</dc:creator>
		<pubDate>Thu, 11 Aug 2011 00:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.amityadav.name/?p=228#comment-18849</guid>
		<description>Thanks a lot Amit. One note though. I think it should be times a hundred, instead of ten, if you want the result in milliseconds, like this:
&#160;
duration = &lt;span&gt;(&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;$&lt;span&gt;1&lt;/span&gt;.&lt;span&gt;to_i&lt;/span&gt; &lt;span&gt;*&lt;/span&gt; &lt;span&gt;60&lt;/span&gt; &lt;span&gt;+&lt;/span&gt; $&lt;span&gt;2&lt;/span&gt;.&lt;span&gt;to_i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt; &lt;span&gt;*&lt;/span&gt; &lt;span&gt;60&lt;/span&gt; &lt;span&gt;+&lt;/span&gt; $&lt;span&gt;3&lt;/span&gt;.&lt;span&gt;to_i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt; &lt;span&gt;*&lt;/span&gt; &lt;span&gt;100&lt;/span&gt; &lt;span&gt;+&lt;/span&gt; $&lt;span&gt;4&lt;/span&gt;.&lt;span style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px&quot;&gt;&lt;font color=&quot;#9900cc&quot;&gt;to_i

&lt;/font&gt;&lt;font color=&quot;#9900cc&quot;&gt;# ...
&lt;/font&gt;&lt;font color=&quot;#9900cc&quot;&gt;
return duration.to_s
&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px&quot;&gt;&lt;font color=&quot;#110000&quot;&gt;#&lt;/font&gt;&lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;&quot;#{$2}:#{$3}&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px&quot;&gt;&lt;font color=&quot;#9900cc&quot;&gt;If you rather want the result in seconds, it should be: &lt;/font&gt;&lt;/span&gt;
&lt;span style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px&quot;&gt;&lt;span&gt;
duration = &lt;span&gt;(&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;$&lt;/font&gt;&lt;span&gt;1&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;.&lt;/font&gt;&lt;span&gt;to_i&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;*&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;60&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;+&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; $&lt;/font&gt;&lt;span&gt;2&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;.&lt;/font&gt;&lt;span&gt;to_i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;*&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;60&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;+&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; $&lt;/font&gt;&lt;span&gt;3&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;.&lt;/font&gt;&lt;span&gt;to_i&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;+&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; ($&lt;/font&gt;&lt;span&gt;4&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;.&lt;/font&gt;&lt;span&gt;to_i / 100)&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;
&lt;/font&gt;&lt;span&gt;
return duration.to_s&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt;
&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px&quot;&gt;&lt;font color=&quot;#110000&quot;&gt;#&lt;/font&gt;&lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;font color=&quot;#110000&quot;&gt; &lt;/font&gt;&lt;span&gt;&quot;#{$2}:#{$3}&quot;
&lt;/span&gt;&lt;/span&gt;</description>
		<content:encoded><![CDATA[<p>Thanks a lot Amit. One note though. I think it should be times a hundred, instead of ten, if you want the result in milliseconds, like this:<br />
&nbsp;<br />
duration = <span>(</span><span>(</span>$<span>1</span>.<span>to_i</span> <span>*</span> <span>60</span> <span>+</span> $<span>2</span>.<span>to_i</span><span>)</span> <span>*</span> <span>60</span> <span>+</span> $<span>3</span>.<span>to_i</span><span>)</span> <span>*</span> <span>100</span> <span>+</span> $<span>4</span>.<span style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px"><font color="#9900cc">to_i</p>
<p></font><font color="#9900cc"># &#8230;<br />
</font><font color="#9900cc"><br />
return duration.to_s<br />
</font></span><span><span style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px"><font color="#110000">#</font></span><span>return</span><font color="#110000"> </font><span>&quot;#{$2}:#{$3}&quot;</span></span><br />
<span style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px"><font color="#9900cc">If you rather want the result in seconds, it should be: </font></span><br />
<span style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px"><span><br />
duration = <span>(</span><span>(</span><font color="#110000">$</font><span>1</span><font color="#110000">.</font><span>to_i</span><font color="#110000"> </font><span>*</span><font color="#110000"> </font><span>60</span><font color="#110000"> </font><span>+</span><font color="#110000"> $</font><span>2</span><font color="#110000">.</font><span>to_i</span><span>)</span><font color="#110000"> </font><span>*</span><font color="#110000"> </font><span>60</span><font color="#110000"> </font><span>+</span><font color="#110000"> $</font><span>3</span><font color="#110000">.</font><span>to_i</span><span>)</span><font color="#110000"> </font><span>+</span><font color="#110000"> ($</font><span>4</span><font color="#110000">.</font><span>to_i / 100)</span><font color="#110000"><br />
</font><span><br />
return duration.to_s</span><font color="#110000"><br />
</font></span></span><span><span style="margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px"><font color="#110000">#</font></span><span>return</span><font color="#110000"> </font><span>&quot;#{$2}:#{$3}&quot;<br />
</span></span></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: resha</title>
		<link>http://www.amityadav.name/ffmpeg-get-video-file-duration-ruby/comment-page-1/#comment-1436</link>
		<dc:creator>resha</dc:creator>
		<pubDate>Sat, 24 Oct 2009 07:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.amityadav.name/?p=228#comment-1436</guid>
		<description>I&#039;ve been looking for this..
thank you..</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been looking for this..<br />
thank you..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

