<?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>PHP Architect blog &#187; timecode</title>
	<atom:link href="http://www.php-architect.com/blog/tag/timecode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.php-architect.com/blog</link>
	<description>PHP, MySQL, ZF, Python, Linux, Mac, C++, Java, Flex, Air, ActionScript &#38; apps development.</description>
	<lastBuildDate>Tue, 24 Aug 2010 06:32:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Add &amp; Subtract time code in Python</title>
		<link>http://www.php-architect.com/blog/2009/08/08/how-to-add-subtract-time-code-in-python/</link>
		<comments>http://www.php-architect.com/blog/2009/08/08/how-to-add-subtract-time-code-in-python/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 07:58:20 +0000</pubDate>
		<dc:creator>Me2resh</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[edl]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[timecode]]></category>

		<guid isPermaLink="false">http://www.php-architect.com/blog/?p=167</guid>
		<description><![CDATA[I have been developing some tools for the media production lately, i found a neat way to add or subtract certain amount of seconds to a given time code. for example i have a video that starts from 12:45:05 and i want to add 59 seconds to it and use the new time. from datetime [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I have been developing some tools for the media production lately, i found a neat way to add or subtract certain amount of seconds to a given time code.</p>
<p>for example i have a video that starts from 12:45:05 and i want to add 59 seconds to it and use the new time.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">from datetime import datetime
from datetime import timedelta
&nbsp;
<span style="color: #000000; font-weight: bold;">time</span> = datetime<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2009</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">45</span>, 05, <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">diff</span> = timedelta<span style="color: #7a0874; font-weight: bold;">&#40;</span>seconds = <span style="color: #000000;">59</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
final_time = <span style="color: #000000; font-weight: bold;">time</span> + <span style="color: #c20cb9; font-weight: bold;">diff</span></pre></div></div>

<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.php-architect.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.php-architect.com/blog/2009/08/08/how-to-add-subtract-time-code-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
