diff --git a/README.md b/README.md index 9fdc4ce..8c0a45d 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Utility commands for working with ffmpeg in nushell. - `ffprobe` multiple files at once - Use `streams`, `streams video`, and `streams audio` to filter `ffprobe` output - get the `dimensions` of a video stream as a record +- Tab-completion for filter options. i.e. `fps --round` will yield `zero inf down up near` - Apply and parse complex filters to a video (Work In Progress) ## Setup diff --git a/README.md.tmpl b/README.md.tmpl index 6de976b..7076f82 100644 --- a/README.md.tmpl +++ b/README.md.tmpl @@ -14,6 +14,7 @@ Utility commands for working with ffmpeg in nushell. - `ffprobe` multiple files at once - Use `streams`, `streams video`, and `streams audio` to filter `ffprobe` output - get the `dimensions` of a video stream as a record +- Tab-completion for filter options. i.e. `fps --round` will yield `zero inf down up near` - Apply and parse complex filters to a video (Work In Progress) ## Setup diff --git a/filters.nu b/filters.nu index 29de1d3..f0457ef 100755 --- a/filters.nu +++ b/filters.nu @@ -29,8 +29,7 @@ export def fps [ --output (-o): list: = [] --start-time (-s) # Assume the first PTS should be the given value, in seconds. # This allows for padding/trimming at the start of stream. By default, no assumption is made about the first frame’s expected PTS, so no padding or trimming is done. For example, this could be set to 0 to pad the beginning with duplicates of the first frame if a video stream starts after the audio stream or to trim any frames with a negative PTS. - --round (-r): string # Timestamp (PTS) rounding method. -# Possible values are: "zero", "inf", "down", "up", "near". + --round (-r): string@fps-round-options # Timestamp (PTS) rounding method. use completion to view available options. --eof-action (-e): string # Action performed when reading the last frame. Possible values are: "round", "pass" fps: string = '25' # The desired output frame rate. It accepts expressions containing the following constants: # "source_fps": The input’s frame rate @@ -44,6 +43,15 @@ export def fps [ ] } +def fps-round-options [] { + [ + 'zero' + 'inf' + 'down' + 'up' + 'near' + ] +} export def split [ --input (-i): list: = [] output: list