Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced commands do not seem to work #3196

Open
scop opened this issue May 6, 2023 · 1 comment
Open

Advanced commands do not seem to work #3196

scop opened this issue May 6, 2023 · 1 comment
Labels

Comments

@scop
Copy link

scop commented May 6, 2023

Describe the bug

Advanced commands do not seem to work.

To Reproduce

$ ./rav1e help advanced
Advanced features

Usage: 

Options:
  -c, --completion <COMPLETION>    Output to stdout the completion definition for the shell [possible values: bash, elvish, fish, powershell, zsh]
  -s, --save-config <SAVE_CONFIG>  Save the current configuration in a toml file
  -l, --load-config <LOAD_CONFIG>  Load the encoder configuration from a toml file
  -h, --help                       Print help information
$ ./rav1e -c bash
error: Found an argument which wasn't expected or isn't valid in this context
$ ./rav1e advanced -c bash
error: One or more required arguments were not provided
$ ./rav1e -s foo
error: Invalid value for one of the arguments
$ ./rav1e advanced -s foo
error: One or more required arguments were not provided
$ 

Expected behavior

Working advanced commands per the help message, and better error messages exactly what argument wasn't expected or valid, or what required argument was not provided, and what value was invalid, and what was expected instead.

Required Information
Toolchain (if is a build problem):

$ cargo --version
$ rustc --version
$ nasm --version # if on x86_64

Version:

$ ./rav1e --version
rav1e 0.6.4 (v0.6.4) (release)
rustc 1.68.2 (9eb3afe9e 2023-03-27) x86_64-unknown-linux-musl
Compiled CPU Features: fxsr,popcnt,sse,sse2,sse3,sse4.1,sse4.2,ssse3
Assembly: Enabled
Threading: Enabled
Unstable Features: Disabled
Compiler Flags: -Ctarget-cpu=x86-64-v2

Operating system:

Linux a94bd5dc0ecb 5.15.0-67-generic #74~20.04.1-Ubuntu SMP Wed Feb 22 14:52:34 UTC 2023 x86_64 GNU/Linux

Console Output
Please paste the console output below if it is relevant,

Snippet here
@scop scop added the bug label May 6, 2023
@barrbrain
Copy link
Collaborator

barrbrain commented May 12, 2023

The advanced commands are not intuitive.

$ rav1e - -o - advanced -c bash
_rav1e() {
...
}

complete -F _rav1e -o bashdefault -o default rav1e

This starts to make a little more sense when using the other commands.

$ rav1e -s10 tests/small_input.y4m -o /dev/null advanced -s config.toml
encoded 5 frames, 250.000 fps, 72.76 Kb/s, elapsed: 0s
$ wc -l config.toml 
57 config.toml
$ rav1e tests/small_input.y4m -o small.ivf advanced -l config.toml
encoded 5 frames, 185.185 fps, 72.76 Kb/s, elapsed: 0s
$ du -sb small.ivf 
1911    small.ivf
$ dav1d -i small.ivf -o small.y4m
dav1d 1.1.0 - by VideoLAN
Decoded 5/5 frames (100.0%) - 5900.00 fps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants