Range Syntax

Range syntax is a common format used in --add-in, --cut-out, --mark-as-loud, --mark-as-silent, --set-speed-for-range options.

It describes a range in time based on frames starting from 0, the first frame.

# 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

Any number greater or equal to 0 can be used. The constants, `start` and `end` can also be used.

auto-editor example.mp4 --mark-as-loud 72,end

You can describe these ranges using seconds instead of frames.

auto-editor example.mp4 --cut-out 1secs,10secs

s, sec, secs, second, seconds can be used interchangeably. Explicit frame units may also be used. (f, frame, frames). Constants do not accept units.

You can also use negative numbers. (i.e -60,end selects the last 60 frames, -10s,-5s selects from 10 seconds to end to 5 seconds to the end)

Range Syntax has a nargs value of '*' meaning it can take any many ranges.

auto-editor example.mp4 --cut-out 0,20 45,60, 234,452

The --set-speed-for-range option has an additional argument for speed. The command:

auto-editor example.mp4 --set-speed-for-range 2,0,30

means set the speed of the video to twice as fast (2x) from the 0th frame to the 30th frame.