<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Converting Time to Timecode and Percent: Check my math?]]></title><description><![CDATA[<p>So I'm making User Actors based on Media Percent to Time and Media Time to Percent that also take into consideration the speed at which the media is played, and also allow you to convert things to and from timecode.</p>
<p>I keep second-guessing myself on the math, so I wanted to put what I have out here and see if anyone can poke holes in it for me.</p>
<p><strong>Conversion: Time --&gt; Percent or Timecode = you must multiply the percent or timecode value by the absolute value of the speed</strong></p>
<p>T--&gt;P/TC Examples: (Assuming a 10 second video that's 30 fps)</p>
<ol><li>Speed 1, Input: 1 sec --&gt; Output: 10% / 00:00:01:00/30<ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |1| = 10%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |1| = 00:00:01:00/30</li></ol></li><li>Speed -1, Input: 1 sec --&gt; Output: 10% / 00:00:01:00/30 <ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |-1| = 10%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |-1| = 00:00:01:00/30</li></ol></li><li>Speed 2, Input: 0.5 sec --&gt; Output: 10% / 00:00:01:00/30 <ol><li>T--&gt; P: 0.5 sec = 5% of 10 seconds --&gt; 5% x |2| = 10%</li><li>T--&gt; TC: 0.5 sec = 00:00:00:15/30 --&gt; 00:00:00:15/30 x |2| = 00:00:01:00/30</li></ol></li><li>Speed 2, Input: 1 sec --&gt; Output: 20% / 00:00:02:00/30<ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |2| = 20%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |2| = 00:00:02:00/30</li></ol></li><li>Speed -2, Input: 1 sec --&gt; Output: 20% / 00:00:02:00/30 <ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |-2| = 20%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |-2| = 00:00:02:00/30</li></ol></li><li>Speed 0.5, Input: 1 sec --&gt; Output: 5% / 00:00:00:15/30<ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |0.5| = 5%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |0.5| = 00:00:00:15/30</li></ol></li><li>Speed -0.5, Input: 1 sec --&gt; Output: 5% / 00:00:00:15/30<ol><li>T--&gt; P: 1 sec = 10% of 10 seconds --&gt; 10% x |-0.5| = 5%</li><li>T--&gt; TC: 1 sec = 00:00:01:00/30 --&gt; 00:00:01:00/30 x |-0.5| = 00:00:00:15/30</li></ol></li><li>Speed 1, Input: 0.5 sec --&gt; Output: 5% / 00:00:00:15/30 <ol><li>T--&gt; P: 0.5 sec = 5% of 10 seconds --&gt; 5% x |1| = 5%</li><li>T--&gt; TC: 0.5 sec = 00:00:00:15/30 --&gt; 00:00:00:15/30 x |1| = 00:00:00:15/30</li></ol></li><li>Speed 0.5, Input: 0.5 sec --&gt; Output: 2.5% / 00:00:00:08/30<ol><li>T--&gt; P: 0.5 sec = 5% of 10 seconds --&gt; 5% x |0.5| = 2.5%</li><li>T--&gt; TC: 0.5 sec = 00:00:00:15/30 --&gt; 00:00:00:15/30 x |0.5| = 00:00:00:08/30</li></ol></li></ol>
<p><strong>Conversion: <br /></strong><strong>Percent --&gt; Time = ((Percentage value x 0.01) x (Total Time Duration)) / (|Speed|) You must divide the time by the absolute value of the speed. <br /></strong><strong>Percent --&gt; Timecode = (Percentage value X 0.01) x (Total Timecode Duration). You don't need to involve speed at all.</strong></p>
<p>P--&gt;T/TC Examples: (Assuming a 10 second video that's 30 fps)</p>
<ol><li>Speed 1, Input: 10% --&gt; Output: 1 sec/ 00:00:01:00/30<ol><li>P--&gt;T: 10% of 10 seconds = 1 sec --&gt; 1 sec x |1| = 1 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.1 = 00:00:01:00/30</li></ol></li><li>Speed -1, Input: 10% --&gt; Output: 1 sec/ 00:00:01:00/30<ol><li>P--&gt;T: 10% of 10 seconds = 1 sec --&gt; 1 sec x |-1| = 1 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.1 = 00:00:01:00/30 </li></ol></li><li>Speed 2, Input: 5% --&gt; Output: 0.25 seconds / 00:00:00:15/30 <ol><li>P--&gt;T: 5% of 10 seconds = 0.5 sec --&gt; (0.5 sec)/(|2|) = 0.25 secs</li><li>P--&gt;TC: 00:00:10:00/30 x 0.05 = 00:00:00:15/30</li></ol></li><li>Speed 2, Input: 20% --&gt; Output: 1 sec / 00:00:02:00/30<ol><li>P--&gt;T: 20% of 10 seconds = 2 seconds --&gt; (2 seconds)/(|2|) = 1 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.2 = 00:00:02:00/30</li></ol></li><li>Speed -2, Input: 20% --&gt; Output: 1 sec / 00:00:02:00/30 <ol><li>P--&gt;T: 20% of 10 seconds = 2 seconds --&gt; (2 seconds)/(|-2|) = 1 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.2 = 00:00:02:00/30 </li></ol></li><li>Speed 0.5, Input: 5% --&gt; Output: 1 sec / 00:00:00:15/30<ol><li>P--&gt;T: 5% of 10 seconds = 0.5 sec --&gt; (0.5 sec)/(|0.5|) = 1 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.05 = 00:00:00:15/30 </li></ol></li><li>Speed -0.5, Input: 5% --&gt; Output: 1 secs / 00:00:00:15/30<ol><li>P--&gt;T: 5% of 10 seconds = 0.5 sec --&gt; (0.5 sec)/(|-0.5|) = 1 sec</li><li>P--&gt;TC:  00:00:10:00/30 x 0.05 = 00:00:00:15/30 </li></ol></li><li>Speed 1, Input: 5% --&gt; Output: 0.5 secs / 00:00:00:15/30 <ol><li>P--&gt;T: 5% of 10 seconds = 0.5 sec --&gt; (0.5 sec)/(|1|) = 0.5 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.05 = 00:00:00:15/30 </li></ol></li><li>Speed 0.5, Input: 2.5% --&gt; Output: 0.5 sec / 00:00:00:15/30<ol><li>P--&gt;T: 2.5% of 10 seconds = 0.25 sec --&gt; (0.25 sec)/(|0.5|) = 0.5 sec</li><li>P--&gt;TC: 00:00:10:00/30 x 0.025 = 00:00:00:8/30</li></ol></li></ol>
<p>If I'm not mistaken, then the math and examples for converting Timecode to Time should be the same, but to convert Timecode to Percentage you'd just divide to total timecode duration by the given timecode value in order to get the percentage value (no speed involved).</p>
<p>Did I do the math correctly?</p>]]></description><link>https://community.troikatronix.com/topic/8030/converting-time-to-timecode-and-percent-check-my-math</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 08:54:43 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/8030.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Jul 2022 13:01:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Converting Time to Timecode and Percent: Check my math? on Wed, 06 Jul 2022 23:36:44 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/88">@citizenjoe</a> said:</p>
<blockquote> It gives me a headache</blockquote>
<p> Me too. After I finish the User Actor, I never want to have to do this math again.</p>]]></description><link>https://community.troikatronix.com/post/49419</link><guid isPermaLink="true">https://community.troikatronix.com/post/49419</guid><dc:creator><![CDATA[Woland]]></dc:creator><pubDate>Wed, 06 Jul 2022 23:36:44 GMT</pubDate></item><item><title><![CDATA[Reply to Converting Time to Timecode and Percent: Check my math? on Wed, 06 Jul 2022 15:19:10 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/1435">@woland</a> said:</p>
<blockquote>I think I've got it figured out at this point though (unless someone tells me I'm wrong).</blockquote>
<p> It gives me a headache... <img class="emojione" src="https://cdn.jsdelivr.net/emojione/assets/png/1f606.png?v=2.2.7" alt="😆" /></p><p>Cheers,</p><p>Hugh</p>]]></description><link>https://community.troikatronix.com/post/49417</link><guid isPermaLink="true">https://community.troikatronix.com/post/49417</guid><dc:creator><![CDATA[CitizenJoe]]></dc:creator><pubDate>Wed, 06 Jul 2022 15:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to Converting Time to Timecode and Percent: Check my math? on Wed, 06 Jul 2022 11:32:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/124">@dusx</a> said:</p>
<blockquote>I think some of what you are looking for is covered there.
</blockquote>
<p> Some, yes, but the tricky thing is accounting for speed. I think I've got it figured out at this point though (unless someone tells me I'm wrong).</p>]]></description><link>https://community.troikatronix.com/post/49413</link><guid isPermaLink="true">https://community.troikatronix.com/post/49413</guid><dc:creator><![CDATA[Woland]]></dc:creator><pubDate>Wed, 06 Jul 2022 11:32:21 GMT</pubDate></item><item><title><![CDATA[Reply to Converting Time to Timecode and Percent: Check my math? on Tue, 05 Jul 2022 19:04:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/1435">@woland</a></p><p>Take a look at these User Actors: <a href="https://troikatronix.com/add-ons/dx-timecode-tools/">https://troikatronix.com/add-o...</a><br />I think some of what you are looking for is covered there.</p>]]></description><link>https://community.troikatronix.com/post/49404</link><guid isPermaLink="true">https://community.troikatronix.com/post/49404</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Tue, 05 Jul 2022 19:04:00 GMT</pubDate></item></channel></rss>