Skip to content

Commit

Permalink
added new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBoothe committed Jan 15, 2021
1 parent 7234bd1 commit a5df4b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ auto-editor example.mp4 --frame_margin 8
- [How to Install Auto-Editor](https://github.com/WyattBlue/auto-editor/blob/master/articles/installing.md)
- [How to Edit Videos With Auto-Editor](https://github.com/WyattBlue/auto-editor/blob/master/articles/editing.md)
- [How to Use Motion Detection in Auto-Editor](https://github.com/WyattBlue/auto-editor/blob/master/articles/motionDetection.md)
- [`--cut_out`, `--ignore`, and Range Syntax](https://github.com/WyattBlue/auto-editor/blob/master/articles/rangeSyntax.md)

## Copyright
Auto-Editor is under the [Public Domain](https://github.com/WyattBlue/auto-editor/blob/master/LICENSE) but contains non-free elements. See [this page](https://github.com/WyattBlue/auto-editor/blob/master/articles/legalinfo.md) for more info.
Expand Down
14 changes: 9 additions & 5 deletions articles/rangeSyntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,30 @@ or used byitself.
auto-editor example.mp4 --ignore 20-30
```

both `--cut_out` and `--ignore` use range syntax so any range that is recognized by `--cut_out` will be recongized `--ignore` or any future option that uses it.
both `--cut_out` and `--ignore` use range syntax so any range that is recognized by `--cut_out` will be recognize `--ignore` or any future option that uses it.

## Range Syntax

Range syntax is a special data type for declaring ranges.

It follows the pattern: `{float}-{float} ...` using a hythen to delimate between the start and end point, and is in seconds instead of the usual "frames" unit.
It follows the pattern: `{float}-{float} ...` using a hyphen to deliminate between the start and end point, and is in seconds instead of the usual "frames" unit.

It can be repeated infinitely. So

```
auto-editor example.mp4 --cut_out 0-10 20-30 40-45
```

is possible.
is possible. In addition, the special values `start` and `end` can be used instead of floats. `end` represents the total length of the video in seconds while `start` is just equivalent to `0`.


### Out-of-bounds and Edge Cases.

Range syntax is gracious on what it allows.
Going out-of-bounds don't cause an error.

You can go out of bounds.
```
auto-editor example.mp4 --cut_out 10-500
```

Using an invalid range, ex (`10-5`) is Undefined Behavior.

0 comments on commit a5df4b4

Please sign in to comment.