Skip to content

auto-generate output filename when not specified#3091

Open
rootvector2 wants to merge 1 commit intoAOMediaCodec:mainfrom
rootvector2:avifenc-auto-output
Open

auto-generate output filename when not specified#3091
rootvector2 wants to merge 1 commit intoAOMediaCodec:mainfrom
rootvector2:avifenc-auto-output

Conversation

@rootvector2
Copy link
Contributor

Fixes #3090

Allow avifenc to auto-generate the output filename when only a single input file is provided and no output is specified. The output name is derived by replacing the input extension with .avif, or appending .avif if the input has no extension.

This behavior only applies when exactly one input file is given and no -o or positional output argument is present, so existing CLI behavior remains unchanged.

Also adds a safeguard to prevent accidentally overwriting the input file when the input already has a .avif extension.

@rootvector2
Copy link
Contributor Author

This PR focuses only on the optional output filename behavior. The other suggestions in the issue (multi-input batch conversion and wildcard handling) may require maintainer guidance since multiple inputs currently have existing semantics (e.g., animations).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Make specifying output filename optional, and make avifenc.exe accept wildcard (*.jpg)

1 participant