{{ comp.header "Auto-Editor - Range Syntax" }}
<body>
{{ comp.nav }}
<section class="section">
<div class="container">
<h1>Range Syntax</h1>
<p>Range syntax is a common format used in <code>--add-in</code>, <code>--cut-out</code>, <code>--mark-as-loud</code>, <code>--mark-as-silent</code>, <code>--set-speed-for-range</code> options.</p>
<p>It describes a range in time based on frames starting from 0, the first frame.</p>
<pre><code># Cut out 1 frame
auto-editor example.mp4 --cut-out 0,1

# Cut out 60 frames
auto-editor example.mp4 --cut-out 10,70

# Cuts out no frames
auto-editor example.mp4 --cut-out 0,0</code></pre>
<p>Any number greater or equal to 0 can be used. The constants, `start` and `end` can also be used.</p>
<pre><code>auto-editor example.mp4 --mark-as-loud 72,end</code></pre>
<p>You can describe these ranges using seconds instead of frames.</p>
<pre><code>auto-editor example.mp4 --cut-out 1secs,10secs</code></pre>
<p><code>s</code>, <code>sec</code>, <code>secs</code>, <code>second</code>, <code>seconds</code> can be used interchangeably. Explicit frame units may also be used. (<code>f, frame, frames</code>). Constants do not accept units.</p>
<p>You can also use negative numbers. (i.e <code>-60,end</code> selects the last 60 frames, <code>-10s,-5s</code> selects from 10 seconds to end to 5 seconds to the end)</p>
<p>Range Syntax has a nargs value of '*' meaning it can take any many ranges.</p>
<pre><code>auto-editor example.mp4 --cut-out 0,20 45,60, 234,452</code></pre>
<hr>
<p>The <code>--set-speed-for-range</code> option has an additional argument for speed. The command:</p>
<pre><code>auto-editor example.mp4 --set-speed-for-range 2,0,30</code></pre>
<p>means set the speed of the video to twice as fast (2x) from the 0th frame to the 30th frame.</p>
</div>
</section>
</body>
</html>
